|
||||||||||
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.LocalVarInstruction
public class LocalVarInstruction
This class represents instructions that take a local variable as argument. Shortcuts (single byte instructions) are created for the opcodes: iload, fload, aload, lload, dload, istore, fstore, astore, lstore, dstore if the variable index is 0, 1, 2 or 3. An extra wide prefix is automatically added for these instructions if the numeric argument is larger than 255.
Field Summary | |
---|---|
static byte |
KND_LOAD
|
static byte |
KND_RET
|
static byte |
KND_STORE
|
Constructor Summary | |
---|---|
LocalVarInstruction(int opcode,
int index)
Constructs a new instruction that takes a local variable as argument. |
Method Summary | |
---|---|
boolean |
canComplete()
Returns true iff control flow can reach the next instruction in textual order. |
int |
getIndex()
Returns the position of the variable in the local var set |
byte |
getOperandType()
Returns the type of the operand. |
byte |
getOperationKind()
Returns the operation kind. |
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. |
boolean |
isLoad()
|
boolean |
isStore()
|
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 |
Field Detail |
---|
public static final byte KND_LOAD
public static final byte KND_STORE
public static final byte KND_RET
Constructor Detail |
---|
public LocalVarInstruction(int opcode, int index)
opcode
- the opcode of the instructionindex
- the index of the local variableMethod Detail |
---|
public boolean canComplete()
canComplete
in class Instruction
public int getIndex()
public byte getReturnType()
getReturnType
in class Instruction
public byte getOperandType()
public byte getOperationKind()
public boolean isLoad()
public boolean isStore()
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 |