public class Op03SimpleStatement extends java.lang.Object implements MutableGraph<Op03SimpleStatement>, Dumpable, StatementContainer<Statement>, IndexedStatement
Modifier and Type | Class and Description |
---|---|
class |
Op03SimpleStatement.GraphVisitorCallee |
Modifier and Type | Field and Description |
---|---|
private java.util.Set<BlockIdentifier> |
containedInBlocks |
private Statement |
containedStatement |
private BlockIdentifier |
firstStatementInThisBlock |
private InstrIndex |
index |
private boolean |
isNop |
private Op03SimpleStatement |
linearlyNext |
private Op03SimpleStatement |
linearlyPrevious |
private java.util.Set<BlockIdentifier> |
possibleExitsFor |
private java.util.List<Op03SimpleStatement> |
sources |
private SSAIdentifiers<LValue> |
ssaIdentifiers |
private java.util.List<Op03SimpleStatement> |
targets |
private BlockIdentifier |
thisComparisonBlock |
Constructor and Description |
---|
Op03SimpleStatement(Op02WithProcessedDataAndRefs original,
Statement statement) |
Op03SimpleStatement(java.util.Set<BlockIdentifier> containedIn,
Statement statement,
InstrIndex index) |
Op03SimpleStatement(java.util.Set<BlockIdentifier> containedIn,
Statement statement,
SSAIdentifiers<LValue> ssaIdentifiers,
InstrIndex index) |
private final java.util.List<Op03SimpleStatement> sources
private final java.util.List<Op03SimpleStatement> targets
private Op03SimpleStatement linearlyPrevious
private Op03SimpleStatement linearlyNext
private boolean isNop
private InstrIndex index
private Statement containedStatement
private SSAIdentifiers<LValue> ssaIdentifiers
private BlockIdentifier thisComparisonBlock
private BlockIdentifier firstStatementInThisBlock
private final java.util.Set<BlockIdentifier> containedInBlocks
private java.util.Set<BlockIdentifier> possibleExitsFor
public Op03SimpleStatement(Op02WithProcessedDataAndRefs original, Statement statement)
public Op03SimpleStatement(java.util.Set<BlockIdentifier> containedIn, Statement statement, InstrIndex index)
public Op03SimpleStatement(java.util.Set<BlockIdentifier> containedIn, Statement statement, SSAIdentifiers<LValue> ssaIdentifiers, InstrIndex index)
public java.util.List<Op03SimpleStatement> getSources()
getSources
in interface Graph<Op03SimpleStatement>
public java.util.List<Op03SimpleStatement> getTargets()
getTargets
in interface Graph<Op03SimpleStatement>
public void setLinearlyNext(Op03SimpleStatement linearlyNext)
public Op03SimpleStatement getLinearlyPrevious()
public void setLinearlyPrevious(Op03SimpleStatement linearlyPrevious)
public BlockIdentifier getFirstStatementInThisBlock()
public void setFirstStatementInThisBlock(BlockIdentifier firstStatementInThisBlock)
public void addSource(Op03SimpleStatement source)
addSource
in interface MutableGraph<Op03SimpleStatement>
public void addTarget(Op03SimpleStatement target)
addTarget
in interface MutableGraph<Op03SimpleStatement>
public Statement getStatement()
getStatement
in interface StatementContainer<Statement>
public Statement getTargetStatement(int idx)
getTargetStatement
in interface StatementContainer<Statement>
public void replaceStatement(Statement newStatement)
replaceStatement
in interface StatementContainer<Statement>
private void markAgreedNop()
public void nopOut()
nopOut
in interface StatementContainer<Statement>
public void nopOutConditional()
nopOutConditional
in interface StatementContainer<Statement>
public void clear()
public SSAIdentifiers<LValue> getSSAIdentifiers()
getSSAIdentifiers
in interface StatementContainer<Statement>
public java.util.Set<BlockIdentifier> getBlockIdentifiers()
getBlockIdentifiers
in interface StatementContainer<Statement>
public BlockIdentifier getBlockStarted()
getBlockStarted
in interface StatementContainer<Statement>
public java.util.Set<BlockIdentifier> getBlocksEnded()
getBlocksEnded
in interface StatementContainer<Statement>
public Op03SimpleStatement getLinearlyNext()
public void copyBlockInformationFrom(StatementContainer<Statement> other)
copyBlockInformationFrom
in interface StatementContainer<Statement>
public void copyBytecodeInformationFrom(StatementContainer<Statement> other)
copyBytecodeInformationFrom
in interface StatementContainer<Statement>
public boolean isAgreedNop()
void replaceBlockIfIn(BlockIdentifier oldB, BlockIdentifier newB)
public void splice(Op03SimpleStatement newSource)
public void replaceTarget(Op03SimpleStatement oldTarget, Op03SimpleStatement newTarget)
private void replaceSingleSourceWith(Op03SimpleStatement oldSource, java.util.List<Op03SimpleStatement> newSources)
public void replaceSource(Op03SimpleStatement oldSource, Op03SimpleStatement newSource)
public void removeSource(Op03SimpleStatement oldSource)
public void removeTarget(Op03SimpleStatement oldTarget)
public void removeGotoTarget(Op03SimpleStatement oldTarget)
public InstrIndex getIndex()
getIndex
in interface IndexedStatement
getIndex
in interface StatementContainer<Statement>
public void setIndex(InstrIndex index)
public BlockIdentifier getThisComparisonBlock()
public void clearThisComparisonBlock()
public void markBlockStatement(BlockIdentifier blockIdentifier, Op03SimpleStatement lastInBlock, Op03SimpleStatement blockEnd, java.util.List<Op03SimpleStatement> statements)
public void markFirstStatementInBlock(BlockIdentifier blockIdentifier)
public void markBlock(BlockIdentifier blockIdentifier)
public void collect(LValueAssignmentAndAliasCondenser lValueAssigmentCollector)
public void condense(LValueRewriter lValueRewriter)
public void rewrite(ExpressionRewriter expressionRewriter)
public void findCreation(CreationCollector creationCollector)
public void clearTargets()
private boolean needsLabel()
public java.lang.String getLabel()
getLabel
in interface StatementContainer<Statement>
public void dumpInner(Dumper dumper)
private Op04StructuredStatement getStructuredStatementPlaceHolder()
public boolean isCompound()
public java.util.List<Op03SimpleStatement> splitCompound()
private void collectLocallyMutatedVariables(SSAIdentifierFactory<LValue,?> ssaIdentifierFactory)
public void forceSSAIdentifiers(SSAIdentifiers<LValue> newIdentifiers)
public static void noteInterestingLifetimes(java.util.List<Op03SimpleStatement> statements)
public static void assignSSAIdentifiers(Method method, java.util.List<Op03SimpleStatement> statements)
public static Op04StructuredStatement createInitialStructuredBlock(java.util.List<Op03SimpleStatement> statements)
public JumpType getJumpType()
public void addPossibleExitFor(BlockIdentifier ident)
public boolean isPossibleExitFor(BlockIdentifier ident)
private static void removePointlessSwitchDefault(Op03SimpleStatement swtch)
public static void removePointlessSwitchDefaults(java.util.List<Op03SimpleStatement> statements)
public java.lang.String toString()
toString
in class java.lang.Object