Class: Furnace::AVM2::ABC::ControlTransferOpcode
- Inherits:
-
Opcode
- Object
- Opcode
- Furnace::AVM2::ABC::ControlTransferOpcode
show all
- Defined in:
- lib/furnace-avm2/abc/opcodes/control_transfer_opcode.rb
Direct Known Subclasses
AS3IfEq, AS3IfFalse, AS3IfGe, AS3IfGt, AS3IfLe, AS3IfLt, AS3IfNe, AS3IfNge, AS3IfNgt, AS3IfNle, AS3IfNlt, AS3IfStrictEq, AS3IfStrictNe, AS3IfTrue, AS3Jump
Constant Summary
Constants inherited
from Opcode
Opcode::MAP
Instance Attribute Summary collapse
Attributes inherited from Opcode
#sequence
Instance Method Summary
collapse
Methods inherited from Opcode
#ast_type, body, #byte_length, #consumes_context, define_property, #disassemble, #disassemble_parameters, #initialize, mnemonic, #next, #offset, #read, #root, #write
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
9
10
11
|
# File 'lib/furnace-avm2/abc/opcodes/control_transfer_opcode.rb', line 9
def target
@target
end
|
Instance Method Details
#lookup! ⇒ Object
29
30
31
|
# File 'lib/furnace-avm2/abc/opcodes/control_transfer_opcode.rb', line 29
def lookup!
self.target_offset = @target.offset
end
|
#parameters ⇒ Object
5
6
7
|
# File 'lib/furnace-avm2/abc/opcodes/control_transfer_opcode.rb', line 5
def parameters
[ target_offset ]
end
|
#resolve! ⇒ Object
19
20
21
22
23
24
25
26
27
|
# File 'lib/furnace-avm2/abc/opcodes/control_transfer_opcode.rb', line 19
def resolve!
@target = @sequence.opcode_at(target_offset)
if !@target
@target = self
end
end
|
#target_offset ⇒ Object
11
12
13
|
# File 'lib/furnace-avm2/abc/opcodes/control_transfer_opcode.rb', line 11
def target_offset
self.offset + byte_length + body.jump_offset
end
|
#target_offset=(new_offset) ⇒ Object
15
16
17
|
# File 'lib/furnace-avm2/abc/opcodes/control_transfer_opcode.rb', line 15
def target_offset=(new_offset)
body.jump_offset = new_offset - offset - byte_length
end
|