swf: Remove `PushConstant` AVM2 opcode
This commit is contained in:
parent
e6c5ba51e4
commit
2d3b23c719
|
@ -126,7 +126,6 @@ pub enum OpCode {
|
|||
Pop = 0x29,
|
||||
PopScope = 0x1d,
|
||||
PushByte = 0x24,
|
||||
PushConstant = 0x22, // unused
|
||||
PushDouble = 0x2f,
|
||||
PushFalse = 0x27,
|
||||
PushInt = 0x2d,
|
||||
|
|
|
@ -796,9 +796,6 @@ impl<'a> Reader<'a> {
|
|||
OpCode::PushByte => Op::PushByte {
|
||||
value: self.read_u8()?,
|
||||
},
|
||||
OpCode::PushConstant => Op::PushConstant {
|
||||
value: self.read_u30()?,
|
||||
},
|
||||
OpCode::PushDouble => Op::PushDouble {
|
||||
value: self.read_index()?,
|
||||
},
|
||||
|
|
|
@ -509,9 +509,6 @@ pub enum Op {
|
|||
PushByte {
|
||||
value: u8,
|
||||
},
|
||||
PushConstant {
|
||||
value: u32,
|
||||
},
|
||||
PushDouble {
|
||||
value: Index<f64>,
|
||||
},
|
||||
|
|
|
@ -952,10 +952,6 @@ impl<W: Write> Writer<W> {
|
|||
self.write_opcode(OpCode::PushByte)?;
|
||||
self.write_u8(value)?;
|
||||
}
|
||||
Op::PushConstant { value } => {
|
||||
self.write_opcode(OpCode::PushConstant)?;
|
||||
self.write_u30(value)?;
|
||||
}
|
||||
Op::PushDouble { ref value } => {
|
||||
self.write_opcode(OpCode::PushDouble)?;
|
||||
self.write_index(value)?;
|
||||
|
@ -1496,8 +1492,6 @@ pub mod tests {
|
|||
|
||||
assert_eq!(write(Op::PushByte { value: 1 }), b"\x24\x01");
|
||||
|
||||
assert_eq!(write(Op::PushConstant { value: 1 }), b"\x22\x01");
|
||||
|
||||
assert_eq!(
|
||||
write(Op::PushDouble {
|
||||
value: Index::new(1)
|
||||
|
|
Loading…
Reference in New Issue