|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.AbstractInstructionAccessor
org.multijava.util.backend.BasicBlock
This class replaces all references to instructions by their associated handle. At the same time, it adds line numbers to the handles and checks if they are references by an instruction, handler or local variable info.
| Field Summary | |
private QTemporary[] |
entryStack
|
private InstructionHandle |
firstInstruction
|
private InstructionHandle[] |
insns
|
private boolean |
marked
|
private BasicBlock |
next
|
private int |
pos
|
private QNode[] |
quads
|
private QTemporary[] |
remainingStack
|
private QQuadruple[][] |
successorAccess
|
private BasicBlock[] |
successors
|
| Constructor Summary | |
BasicBlock(int pos)
Creates a new basic block |
|
| Method Summary | |
void |
attachTo(AccessorContainer container)
Notifies this handle that is has been attached to the specified container. |
void |
buildQuadruples(MethodEnv env)
Builds quadruples |
private BasicBlock[] |
buildSuccessorList()
|
void |
generateQuadruple(CodeSequence seq)
Generates the flow of instructions |
InstructionHandle |
getFirstInstruction()
Returns the first instruction of the basic block |
QNode |
getLastNode()
Returns the last instruction of the basic block |
int |
getPosition()
Returns the position of the BasicBlock in the list |
QNode[] |
getQuadruples()
Returns the quadruples of this block |
QNode[][] |
getSuccessorAccess()
Returns the successors of this block |
QNode[] |
getSuccessorNodes(int pos,
int branch)
Returns the successors of this block |
BasicBlock[] |
getSuccessors()
Returns the successors of this block |
private QQuadruple[] |
getTransition(BasicBlock target)
|
boolean |
isMarked()
Sets this block to be marked |
private void |
optimizeOrder(BasicBlock[] bblocks,
CodeSequence seq)
|
void |
resolveJump()
Resolves the jumps Make jumps point to basic block instead of instructions |
void |
setBody(InstructionHandle[] insns)
Sets the body of this basic block |
void |
setBody(QQuadruple[] quads)
Sets the body of this basic block |
void |
setMarked(boolean marked)
Sets this block to be marked |
void |
setNext(BasicBlock next)
Sets the next basic block in textual order |
String |
toString()
Human readable form |
void |
transformAccessors(AccessorTransformer transformer)
Transforms the accessors contained in this class. |
| Methods inherited from class org.multijava.util.classfile.AbstractInstructionAccessor |
transform |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private InstructionHandle[] insns
private InstructionHandle firstInstruction
private QNode[] quads
private QTemporary[] remainingStack
private QTemporary[] entryStack
private boolean marked
private BasicBlock next
private BasicBlock[] successors
private QQuadruple[][] successorAccess
private int pos
| Constructor Detail |
public BasicBlock(int pos)
| Method Detail |
public int getPosition()
public QNode[] getQuadruples()
public BasicBlock[] getSuccessors()
public QNode[][] getSuccessorAccess()
public QNode[] getSuccessorNodes(int pos,
int branch)
public void setNext(BasicBlock next)
public void setBody(InstructionHandle[] insns)
insns - the array of instructionspublic void setBody(QQuadruple[] quads)
quads - the array of quadruplespublic final InstructionHandle getFirstInstruction()
public final QNode getLastNode()
public void buildQuadruples(MethodEnv env)
public void generateQuadruple(CodeSequence seq)
public void resolveJump()
public void setMarked(boolean marked)
public boolean isMarked()
public String toString()
toString in class Object
private void optimizeOrder(BasicBlock[] bblocks,
CodeSequence seq)
private BasicBlock[] buildSuccessorList()
private QQuadruple[] getTransition(BasicBlock target)
public void transformAccessors(AccessorTransformer transformer)
throws BadAccessorException
transformAccessors in interface AccessorContainertransformer - the transformer used to transform accessors
BadAccessorExceptionpublic void attachTo(AccessorContainer container)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||