169.

prev contents
wide

next instruction uses 16-bit index

Jasmin Syntax
 wide <instruction> <parameter> [<parameter>] 
Note that the Jasmin assembler automatically widens instructions as necessary - so the wide instruction is optional in Jasmin.

Stack

Before

After
...
...
Description

wide is placed in front of an instruction that accesses a local variable. You use it to extend the range of local variables available to the instruction from 8 bits (i.e. 0-255) to 16 bits (i.e. 0-65535). In addition, for iinc, it increases the increment range. wide is used in conjunction with one of the following opcodes: aload, dload, iload, fload, lload, astore, dstore, istore, fstore, lstore, iinc and ret. See the reference pages of those instructions for more details.

Bytecode

There are two bytecode formats. For aload, dload, iload, fload, lload, astore, dstore, istore, fstore, lstore, and ret, use:

Type

Description
u1
wide opcode = 0xC4 (196)
u1
<opcode>
u2
<varnum>
or, for iinc, use:

Type

Description
u1
wide opcode = 0xC4 (196)
u1
<opcode>
u2
<varnum>
u2
<n>
See Also

aload, iload, fload, dload, lload, astore, istore, fstore, dstore, lstore, iinc, ret

Notes

The opcode that follows wide cannot be the target of a branch.


prev 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