Java Reference
In-Depth Information
Mnemonic
Operation
Operand Stack
if_icmplt Branch if int comparison
value1 < value2 true
;value1;value2 )
if_icmpgt Branch if int comparison
value1 > value2 true
;value1;value2 )
if_icmple Branch if int comparison
value1 value2 true
;value1;value2 )
if_icmpge Branch if int comparison
value1 value2 true
;value1;value2 )
if_acmpeq Branch if reference com-
parison value1 == value2
true
;value1;value2 )
if_acmpne Branch if reference com-
parison value1 != value2
true
;value1;value2 )
goto Branch always
No change
goto_w Branch always (wide in-
dex)
No change
jsr Jump subroutine
) ;address
jsr_w Jump subroutine (wide in-
dex)
) ;address
The above instructions can be added to the code section of a method by sending the
CLEmitter instance the following message:
publicvoidaddBranchInstruction(intopcode,
Stringlabel)
where opcode is the mnemonic of the instruction to be added, and label is the target
instruction label.
Mnemonic
Operation
Operand Stack
ret Return from subroutine
No change
The above instruction can be added to the code section of a method by sending the
CLEmitter instance the following message:
publicvoidaddOneArgInstruction(intopcode,
intarg)
where opcode is the mnemonic of the instruction to be added, and arg is the index of the
local variable containing the return address.
Mnemonic
Operation
Operand Stack
lookupswitch Access jump table by key
match and jump
;key )
The above instruction can be added to the code section of a method by sending the
CLEmitter instance the following message:
 
Search WWH ::




Custom Search