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