Contents | Prev | Next | Index

iinc

Operation
Increment local variable by constant

iinc
index
const

Forms
iinc = 132 (0x84)

Stack
No change

Description
The index is an unsigned byte that must be a valid index into the local variables of the current frame (§3.6). The const is a immediate signed byte. The local variable at index must contain an int. The value const is first sign-extended to an int, then the local variable at index is incremented by that amount.

Notes
The iinc opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index and increment it by a two-byte immediate value.


Contents | Prev | Next | Index

Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com