Contents Prev Next Up


3.4 Storing Stack Values into Local Variables

istore

Store integer into local variable
 
istore = 54
vindex

Stack: ..., value => ...

value must be an integer. Local variable vindex in the current Java frame is set to value.

istore_<n>

Store integer into local variable
 
istore_<n>

Stack: ..., value => ...

Forms: istore_0 = 59, istore_1 = 60, istore_2 = 61, istore_3 = 62

value must be an integer. Local variable <n> in the current Java frame is set to value.

This instruction is the same as istore with a vindex of <n>, except that the operand <n> is implicit.

lstore

Store long integer into local variable
 
lstore = 55
vindex

Stack: ..., value-word1, value-word2 => ...

value must be a long integer. Local variables vindex and vindex+1 in the current Java frame are set to value.

lstore_<n>

Store long integer into local variable
 
lstore_<n>

Stack: ..., value-word1, value-word2 => ...

Forms: lstore_0 = 63, lstore_1 = 64, lstore_2 = 65, lstore_3 = 66

value must be a long integer. Local variables <n> and <n>+1 in the current Java frame are set to value.

This instruction is the same as lstore with a vindex of <n>, except that the operand <n> is implicit.

fstore

Store single float into local variable
 
fstore = 56
vindex

Stack: ..., value => ...

value must be a single-precision floating point number. Local variable vindex in the current Java frame is set to value.

fstore_<n>

 
fstore_<n>
Store single float into local variable

Stack: ..., value => ...

Forms: fstore_0 = 67, fstore_1 = 68, fstore_2 = 69, fstore_3 = 70

value must be a single-precision floating point number. Local variable <n> in the current Java frame is set to value.

This instruction is the same as fstore with a vindex of <n>, except that the operand <n> is implicit.

dstore

Store double float into local variable
 
dstore = 57
vindex

Stack: ..., value-word1, value-word2 => ...

value must be a double-precision floating point number. Local variables vindex and vindex+1 in the current Java frame are set to value.

dstore_<n>

 
dstore_<n>
Store double float into local variable

Stack: ..., value-word1, value-word2 => ...

Forms: dstore_0 = 71, dstore_1 = 72, dstore_2 = 73, dstore_3 = 74

value must be a double-precision floating point number. Local variables <n> and <n>+1 in the current Java frame are set to value.

This instruction is the same as dstore with a vindex of <n>, except that the operand <n> is implicit.

astore

Store object reference into local variable
 
astore = 58
vindex

Stack: ..., value => ...

value must be a return address or a reference to an object. Local variable vindex in the current Java frame is set to value.

astore_<n>

 
astore_<n>
Store object reference into local variable

Stack: ..., value => ...

Forms: astore_0 = 75, astore_1 = 76, astore_2 = 77, astore_3 = 78

value must be a return address or a reference to an object. Local variable <n> in the current Java frame is set to value.

This instruction is the same as astore with a vindex of <n>, except that the operand <n> is implicit.

iinc

Increment local variable by constant
 
iinc = 132
vindex
const

Stack: no change

Local variable vindex in the current Java frame must contain an integer. Its value is incremented by the value const, where const is treated as a signed 8-bit quantity.


Contents Prev Next Up