|
||||||||||
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.JumpInstruction
public class JumpInstruction
This class represents instructions that take a label as argument. Only goto and jsr instructions have wide variants for targets that are too far away to have their relative address stored in a short. For jump instructions except goto and jsr with a target that is too far away, an additional goto_w has to be generated. For example : ifne A B: ... will be transformed into : ifeq B goto_w A B: ... Note that the condition has been inverted in the transformed code.
Field Summary |
---|
Constructor Summary | |
---|---|
JumpInstruction(int opcode,
InstructionAccessor target)
Constructs a new instruction that takes a label as argument. |
Method Summary | |
---|---|
boolean |
canComplete()
Returns true iff control flow can reach the next instruction in textual order. |
void |
dump()
|
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 |
InstructionAccessor |
getTarget()
Return the target of this instruction |
void |
setTarget(InstructionAccessor target)
Sets the target for this instruction |
void |
transformAccessors(AccessorTransformer transformer)
Transforms targets (deferences to actual instructions). |
Methods inherited from class at.dms.classfile.Instruction |
---|
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 JumpInstruction(int opcode, InstructionAccessor target)
opcode
- the opcode of the instructiontarget
- the referenced instructionMethod Detail |
---|
public boolean canComplete()
canComplete
in class Instruction
public void transformAccessors(AccessorTransformer transformer) throws BadAccessorException
transformAccessors
in interface AccessorContainer
transformer
- the transformer used to transform accessors
BadAccessorException
public void setTarget(InstructionAccessor target)
public InstructionAccessor getTarget()
public int getPushedOnStack()
getPushedOnStack
in class Instruction
public byte getReturnType()
getReturnType
in class Instruction
public int getStack()
getStack
in class Instruction
public void dump()
dump
in class Instruction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |