5.

prev next contents
dup2_x2

duplicate two words and insert beneath fourth word

Jasmin Syntax
     dup2_x2 
Stack

Before

After
word1
word1
word2
word2
word3
word3
word4
word4
...
word1

word2

...
Description

Duplicates the top two-word item on the stack and inserts the duplicate before the previous (two-word) item on the stack. Alternatively, this instruction could be used to duplicate two single-word items and insert them before the before the third two-word (or fourth single-word) item on the stack.

Example

 bipush 100 bipush 200 dconst_0 ; stack now contains: ;     0.0 | double-word1 ;     0.0 | double-word2 ;     200   integer2-word1 ;     100   integer1-word1 dup2_x2 ; stack now contains: ;     0.0 | double-word1 ;     0.0 | double-word2 ;     200   integer2-word1 ;     100   integer1-word1 ;     0.0 | double-word1 ;     0.0 | double-word2 
Bytecode

Type

Description
u1
dup2_x2 opcode = 0x5E (94)
See Also

dup, dup2, dup_x1, dup2_x1


prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates


Java Virtual Machine
Java Virtual Machine (Java Series)
ISBN: 1565921941
EAN: 2147483647
Year: 1996
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net