|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.classfile.AbstractInstructionAccessor
at.dms.classfile.Instruction
at.dms.classfile.IincInstruction
public class IincInstruction
Some instructions are perniticky enough that its simpler to write them separately instead of smushing them with all the rest. the iinc instruction is one of them. A wide prefix is automatically added if either the variable index exceeds 256, or the increment value lies outside the range [-128, 127] The VM spec is unclear on how the wide instruction is implemented, but the implementation makes both the constant and the variable index 16 bit values for the wide version of this instruction.
Field Summary |
---|
Constructor Summary | |
---|---|
IincInstruction(int var,
int inc)
Constructs a new iinc instruction |
Method Summary | |
---|---|
boolean |
canComplete()
Returns true iff control flow can reach the next instruction in textual order. |
int |
getIncrement()
Return the value that is added to this variable |
int |
getPushedOnStack()
Returns the size of data pushed on the stack by this instruction |
byte |
getReturnType()
Returns the type pushed on the stack |
int |
getStack()
Return the amount of stack (positive or negative) used by this instruction |
int |
getVariable()
Return the position of this variable in the local var set |
Methods inherited from class at.dms.classfile.Instruction |
---|
dump, getOpcode, getPoppedFromStack, isLiteral |
Methods inherited from class at.dms.classfile.AbstractInstructionAccessor |
---|
deepClone, deepCloneInto, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IincInstruction(int var, int inc)
var
- the index of the variable to be incremented.inc
- value to be added to the variable.Method Detail |
---|
public boolean canComplete()
canComplete
in class Instruction
public int getIncrement()
public int getVariable()
public byte getReturnType()
getReturnType
in class Instruction
public int getPushedOnStack()
getPushedOnStack
in class Instruction
public int getStack()
getStack
in class Instruction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |