istore :
store integer in local variable : index : visitVarInsn()
- Description
- Pops an in off the stack and stores it in local variable <varnum>.
The istore instruction takes a single parameter, <varnum>, an
unsigned integer which indicates which local variable should be used.
<varnum> must be a valid local variable number in the current frame.
- Example
bipush 10 ; push 10 onto the stack
istore 3 ; pop 10 off of the stack and store it in local variable 3
- See also
- lstore fstore dstore astore wide
- Stack
Before
|
After |
value |
... |
... |
... |
- Bytecode
Type
|
Description |
u1
|
istore
opcode = 0x36 (54)
|
u1
|
<varnum> |
There
is also a wide format for this instruction, which supports access to
all local variables from 0 to 65535:
Type
|
Description |
u1 |
wide
opcode = 0xC4 (196)
|
u1
|
istore
opcode = 0x36 (54)
|
u2
|
<varnum> |