|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.backend.CodeSequence
This class reconstructs the code sequence
| Field Summary | |
private InstructionHandle |
codeStart
|
private InstructionHandle |
current
|
private int |
max
|
private Stack |
stack
|
| Constructor Summary | |
CodeSequence()
|
|
| Method Summary | |
void |
close()
Closes the code sequence Generates pending basic blocks code |
InstructionHandle |
getCodeStart()
Returns the first instruction of the sequence |
InstructionHandle |
getCurrent()
Returns the (current) last instruction of the sequence |
void |
jumpToBasicBlock(BasicBlock block)
Adds a basic block and a jump instruction as needed |
void |
plantBasicBlock(BasicBlock block)
Adds a basic block at the end of the sequence |
void |
plantBasicBlock(BasicBlock block,
int max)
Adds a basic block at the end of the sequence |
void |
plantBasicBlock(BasicBlock block,
JumpInstruction jump,
QQuadruple[] transition)
Adds a basic block at the end of the sequence |
void |
plantInstruction(InstructionHandle handle)
Adds an instruction at the end of the sequence |
void |
plantInstruction(Instruction insn)
Adds an instruction at the end of the sequence |
void |
plantQuadruple(QNode node)
Adds a quadruple at the end of the sequence |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private InstructionHandle codeStart
private InstructionHandle current
private int max
private Stack stack
| Constructor Detail |
public CodeSequence()
| Method Detail |
public InstructionHandle getCodeStart()
public InstructionHandle getCurrent()
public void plantInstruction(InstructionHandle handle)
handle - an instruction handlepublic void plantInstruction(Instruction insn)
insn - the instructionpublic void plantQuadruple(QNode node)
node - the node of the quadruplepublic void jumpToBasicBlock(BasicBlock block)
block - the destination (BasicBlock)public void plantBasicBlock(BasicBlock block)
block - the destination (BasicBlock)
public void plantBasicBlock(BasicBlock block,
JumpInstruction jump,
QQuadruple[] transition)
block - the destination (BasicBlock)jump - the jump instruction to this blocktransition - the quadruple MOVE instructions
public void plantBasicBlock(BasicBlock block,
int max)
block - the destination (BasicBlock)max - the maximum position of this block on the original source
this is made to avoid locality problemspublic void close()
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||