65.

prev next contents
dup_x2

duplicate top stack word and insert beneath third word

Jasmin Syntax
     dup_x2 
Stack

Before

After
word1
word1
word2
word2
word3
word3
...
word1

...
Description

Duplicates the top single-word stack item inserts the duplicate three words down.

Example

 dconst_0 bipush 100 ; stack now contains: ;     0.0 | double-word1 ;     0.0 | double-word2 ;     100   integer dup_x2 ; stack now contains: ;     100   integer1 ;     0.0 | double-word1 ;     0.0 | double-word2 ;     100   integer1 
Bytecode

Type

Description
u1
dup_x2 = 0x5B (91)
See Also

dup, dup2, dup_x1, dup2_x2

Notes

This instruction cannot be used if the top item on the stack is a two-word item (i.e. a long or a double-precision float). Use dup2, dup2_x1 or dup2_x2 instead.


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