dup2_x1
Stack
Before
|
After
|
| word1
|
word1
|
| word2
|
word2
|
| word3
|
word3
|
| ...
|
word1
|
|
|
word2
|
|
|
...
|
Description
Duplicates the top two-word item on the stack and inserts the duplicate before the previous (single-word) item on the stack. Alternatively, this instruction could also be used to duplicate two single-word items and insert them before the third single-word item on the stack.
Example
bipush 100 dconst_0 ; stack now contains: ; 0.0 | double-word1 ; 0.0 | double-word2 ; 100 integer-word1 dup2_x1 ; stack now contains: ; 0.0 | double-word1 ; 0.0 | double-word2 ; 100 integer-word1 ; 0.0 | double-word1 ; 0.0 | double-word2Bytecode
Type
|
Description
|
|
u1
|
dup2_x1
= 0x5D (93)
|
dup, dup2, dup_x1, dup2_x2