|
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.InstructionContainer
net.sf.jode.flow.SwitchBlock
This is the structured block for an empty block.
Constructor Summary | |
SwitchBlock(Expression instr,
int[] cases)
|
Method Summary | |
void |
doJumpTrafo()
|
boolean |
doTransformations()
Do simple transformation on the structuredBlock. |
void |
dumpInstruction(TabbedPrintWriter writer)
Print the instruction expressing this structured block. |
StructuredBlock |
findCase(FlowBlock destination)
Find the case that jumps directly to destination. |
java.lang.String |
getLabel()
Returns the label of this block and creates a new label, if there wasn't a label previously. |
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 |
jumpMayBeChanged()
Determines if there is a sub block, that flows through to the end of this block. |
VariableStack |
mapStackToLocal(VariableStack stack)
This does take the instr into account and modifies stack accordingly. |
void |
mergeBreakedStack(VariableStack stack)
Is called by BreakBlock, to tell us what the stack can be after a break. |
StructuredBlock |
prevCase(StructuredBlock block)
Find the case that precedes the given case. |
void |
removePush()
This is called after mapStackToLocal to do the stack to local transformation. |
void |
setBreaked()
Is called by BreakBlock, to tell us that this block is breaked. |
void |
setSuccessors(Jump[] jumps)
Sets the successors of this structured block. |
Methods inherited from class net.sf.jode.flow.InstructionContainer |
fillInGenSet, getDeclarables, getInstruction, makeDeclaration, removeOnetimeLocals, setInstruction, simplify |
Methods inherited from class net.sf.jode.flow.StructuredBlock |
appendBlock, checkConsistent, contains, copyJump, dumpSource, flowMayBeChanged, getNextBlock, getNextFlowBlock, isEmpty, isSingleExit, moveJump, needsBraces, prependBlock, propagateUsage, removeBlock, removeJump, replace, replaceSubBlock, setFlowBlock, setJump, swapJump, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SwitchBlock(Expression instr, int[] cases)
Method Detail |
public void setSuccessors(Jump[] jumps)
setSuccessors
in class StructuredBlock
public boolean doTransformations()
StructuredBlock
doTransformations
in class InstructionContainer
public void doJumpTrafo()
public VariableStack mapStackToLocal(VariableStack stack)
mapStackToLocal
in class StructuredBlock
stack
- the stack before the instruction is called
public void mergeBreakedStack(VariableStack stack)
mergeBreakedStack
in interface BreakableBlock
stack
- the stack at the break.public void removePush()
StructuredBlock
removePush
in class StructuredBlock
public StructuredBlock findCase(FlowBlock destination)
public StructuredBlock prevCase(StructuredBlock block)
block
- The sub block of the case, whose predecessor should
be returned.
public StructuredBlock getNextBlock(StructuredBlock subBlock)
getNextBlock
in class StructuredBlock
public FlowBlock getNextFlowBlock(StructuredBlock subBlock)
getNextFlowBlock
in class StructuredBlock
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 StructuredBlock[] getSubBlocks()
getSubBlocks
in class StructuredBlock
public java.lang.String getLabel()
getLabel
in interface BreakableBlock
public void setBreaked()
setBreaked
in interface BreakableBlock
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 |