|
Jode 1.90-CVS Build Aug 6, 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jode.flow.StructuredBlock
net.sf.jode.flow.SequentialBlock
A sequential block combines exactly two structured blocks to a new one. The first sub block mustn't be another sequential block, instead the second sub block should be used for this.
Constructor Summary | |
SequentialBlock()
|
Method Summary | |
void |
checkConsistent()
|
void |
dumpInstruction(TabbedPrintWriter writer)
Print the instruction expressing this structured block. |
StructuredBlock |
getNextBlock(StructuredBlock subBlock)
Returns the block where the control will normally flow to, when the given sub block is finished (not ignoring the jump after this block). |
FlowBlock |
getNextFlowBlock(StructuredBlock subBlock)
|
StructuredBlock[] |
getSubBlocks()
Returns all sub block of this structured block. |
boolean |
isSingleExit(StructuredBlock subBlock)
Tells if the sub block is the single exit point of the current block. |
boolean |
jumpMayBeChanged()
Determines if there is a sub block, that flows through to the end of this block. |
void |
makeDeclaration(java.util.Set done)
Make the declarations, i.e. initialize the declare variable to correct values. |
VariableStack |
mapStackToLocal(VariableStack stack)
This does take the instr into account and modifies stack accordingly. |
java.util.Set |
propagateUsage()
Propagate the used set. |
void |
removeOnetimeLocals()
This method should remove local variables that are only written and read one time directly after another. |
boolean |
replaceSubBlock(StructuredBlock oldBlock,
StructuredBlock newBlock)
Replaces the given sub block with a new block. |
void |
setFirst(StructuredBlock sb)
|
void |
setSecond(StructuredBlock sb)
|
Methods inherited from class net.sf.jode.flow.StructuredBlock |
appendBlock, contains, copyJump, doTransformations, dumpSource, fillInGenSet, flowMayBeChanged, getDeclarables, getNextBlock, getNextFlowBlock, isEmpty, moveJump, needsBraces, prependBlock, removeBlock, removeJump, removePush, replace, setFlowBlock, setJump, setSuccessors, simplify, swapJump, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SequentialBlock()
Method Detail |
public void setFirst(StructuredBlock sb)
public void setSecond(StructuredBlock sb)
public void checkConsistent()
checkConsistent
in class StructuredBlock
public VariableStack mapStackToLocal(VariableStack stack)
mapStackToLocal
in class StructuredBlock
stack
- the stack before the instruction is called
public void removeOnetimeLocals()
removeOnetimeLocals
in class StructuredBlock
public StructuredBlock getNextBlock(StructuredBlock subBlock)
getNextBlock
in class StructuredBlock
public FlowBlock getNextFlowBlock(StructuredBlock subBlock)
getNextFlowBlock
in class StructuredBlock
public boolean isSingleExit(StructuredBlock subBlock)
isSingleExit
in class StructuredBlock
subBlock
- the sub block.
public java.util.Set propagateUsage()
propagateUsage
in class StructuredBlock
public void makeDeclaration(java.util.Set done)
makeDeclaration
in class StructuredBlock
done
- The set of the already declare variables.public void dumpInstruction(TabbedPrintWriter writer) throws java.io.IOException
StructuredBlock
dumpInstruction
in class StructuredBlock
writer
- The tabbed print writer, where we print to.
java.io.IOException
public boolean replaceSubBlock(StructuredBlock oldBlock, StructuredBlock newBlock)
replaceSubBlock
in class StructuredBlock
oldBlock
- the old sub block.newBlock
- the new sub block.
public StructuredBlock[] getSubBlocks()
getSubBlocks
in class StructuredBlock
public boolean jumpMayBeChanged()
jumpMayBeChanged
in class StructuredBlock
|
Jode 1.90-CVS Build Aug 6, 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |