Java Reference
In-Depth Information
Mnemonic
Operation
Operand Stack
dup_x1 Duplicate the top operand
stack value and insert two
values down
;value2;value1 ) ;value1;value2;value1
dup_x2 Duplicate the top operand
stack value and insert two
or three values down
;value3;value2;value1 )
;value1;value3;value2;value1
;value2;value1 ) ;value1;value2;value1
dup2 Duplicate the top one or
two operand stack values
;value2;value1 )
;value2;value1;value2;value1
;value ) ;value;value
dup2_x1 Duplicate the top one or
two operand stack values
and insert two or three
values down
;value3;value2;value1 )
;value2;value1;value3;value2;value1
;value2;value1 ) ;value1;value2;value1
dup2_x2 Duplicate the top one or
two operand stack values
and insert two, three, or
four values down
;value4;value3;value2;value1 )
;value2;value1;value4;value3;value2;value1
;value3;value2;value1 )
;value1;value3;value2;value1
;value3;value2;value1 )
;value2;value1;value3;value2;value1
;value2;value1 ) ;value1;value2;value1
swap Swap the top two operand
stack values
;value2;value1 ) ;value1;value2
The above instructions can be added to the code section of a method by sending the
CLEmitter instance the following message:
publicvoidaddNoArgInstruction(intopcode)
where opcode is the mnemonic of the instruction to be added.
D.5.12
Other Instructions
Mnemonic
Operation
Operand Stack
nop Do nothing No change
athrow Throw exception or error ;objectref ) ;objectref
monitorenter Enter monitor for object ;objectref )
monitorexit Exit monitor for object ;objectref )
The above instructions can be added to the code section of a method by sending the
CLEmitter instance the following message:
publicvoidaddNoArgInstruction(intopcode)
 
Search WWH ::




Custom Search