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 Object
implements MutableGraph<Op03SimpleStatement>, Dumpable, StatementContainer<Statement>, IndexedStatement
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set<BlockIdentifier> private Statementprivate BlockIdentifierprivate InstrIndexprivate booleanprivate Op03SimpleStatementprivate Op03SimpleStatementprivate Set<BlockIdentifier> private final List<Op03SimpleStatement> private SSAIdentifiers<LValue> private final List<Op03SimpleStatement> private BlockIdentifier -
Constructor Summary
ConstructorsConstructorDescriptionOp03SimpleStatement(Set<BlockIdentifier> containedIn, Statement statement, InstrIndex index) Op03SimpleStatement(Set<BlockIdentifier> containedIn, Statement statement, SSAIdentifiers<LValue> ssaIdentifiers, InstrIndex index) Op03SimpleStatement(Op02WithProcessedDataAndRefs original, Statement statement) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddSource(Op03SimpleStatement source) voidaddTarget(Op03SimpleStatement target) static voidassignSSAIdentifiers(Method method, List<Op03SimpleStatement> statements) voidclear()voidvoidvoidcollect(LValueAssignmentAndAliasCondenser lValueAssigmentCollector) private voidcollectLocallyMutatedVariables(SSAIdentifierFactory<LValue, ?> ssaIdentifierFactory) voidcondense(LValueRewriter lValueRewriter) voidvoidstatic Op04StructuredStatementcreateInitialStructuredBlock(List<Op03SimpleStatement> statements) voidvoidfindCreation(CreationCollector creationCollector) voidforceSSAIdentifiers(SSAIdentifiers<LValue> newIdentifiers) getIndex()getLabel()private Op04StructuredStatementgetTargetStatement(int idx) booleanbooleanbooleanisPossibleExitFor(BlockIdentifier ident) private voidvoidmarkBlock(BlockIdentifier blockIdentifier) voidmarkBlockStatement(BlockIdentifier blockIdentifier, Op03SimpleStatement lastInBlock, Op03SimpleStatement blockEnd, List<Op03SimpleStatement> statements) voidmarkFirstStatementInBlock(BlockIdentifier blockIdentifier) private booleanvoidnopOut()voidstatic voidnoteInterestingLifetimes(List<Op03SimpleStatement> statements) voidremoveGotoTarget(Op03SimpleStatement oldTarget) private static voidstatic voidremovePointlessSwitchDefaults(List<Op03SimpleStatement> statements) voidremoveSource(Op03SimpleStatement oldSource) voidremoveTarget(Op03SimpleStatement oldTarget) (package private) voidreplaceBlockIfIn(BlockIdentifier oldB, BlockIdentifier newB) private voidreplaceSingleSourceWith(Op03SimpleStatement oldSource, List<Op03SimpleStatement> newSources) voidreplaceSource(Op03SimpleStatement oldSource, Op03SimpleStatement newSource) voidreplaceStatement(Statement newStatement) voidreplaceTarget(Op03SimpleStatement oldTarget, Op03SimpleStatement newTarget) voidrewrite(ExpressionRewriter expressionRewriter) voidsetFirstStatementInThisBlock(BlockIdentifier firstStatementInThisBlock) voidsetIndex(InstrIndex index) voidsetLinearlyNext(Op03SimpleStatement linearlyNext) voidsetLinearlyPrevious(Op03SimpleStatement linearlyPrevious) voidsplice(Op03SimpleStatement newSource) toString()
-
Field Details
-
sources
-
targets
-
linearlyPrevious
-
linearlyNext
-
isNop
private boolean isNop -
index
-
containedStatement
-
ssaIdentifiers
-
thisComparisonBlock
-
firstStatementInThisBlock
-
containedInBlocks
-
possibleExitsFor
-
-
Constructor Details
-
Op03SimpleStatement
-
Op03SimpleStatement
-
Op03SimpleStatement
public Op03SimpleStatement(Set<BlockIdentifier> containedIn, Statement statement, SSAIdentifiers<LValue> ssaIdentifiers, InstrIndex index)
-
-
Method Details
-
getSources
- Specified by:
getSourcesin interfaceGraph<Op03SimpleStatement>
-
getTargets
- Specified by:
getTargetsin interfaceGraph<Op03SimpleStatement>
-
setLinearlyNext
-
getLinearlyPrevious
-
setLinearlyPrevious
-
getFirstStatementInThisBlock
-
setFirstStatementInThisBlock
-
addSource
- Specified by:
addSourcein interfaceMutableGraph<Op03SimpleStatement>
-
addTarget
- Specified by:
addTargetin interfaceMutableGraph<Op03SimpleStatement>
-
getStatement
- Specified by:
getStatementin interfaceStatementContainer<Statement>
-
getTargetStatement
- Specified by:
getTargetStatementin interfaceStatementContainer<Statement>
-
replaceStatement
- Specified by:
replaceStatementin interfaceStatementContainer<Statement>
-
markAgreedNop
private void markAgreedNop() -
nopOut
public void nopOut()- Specified by:
nopOutin interfaceStatementContainer<Statement>
-
nopOutConditional
public void nopOutConditional()- Specified by:
nopOutConditionalin interfaceStatementContainer<Statement>
-
clear
public void clear() -
getSSAIdentifiers
- Specified by:
getSSAIdentifiersin interfaceStatementContainer<Statement>
-
getBlockIdentifiers
- Specified by:
getBlockIdentifiersin interfaceStatementContainer<Statement>
-
getBlockStarted
- Specified by:
getBlockStartedin interfaceStatementContainer<Statement>
-
getBlocksEnded
- Specified by:
getBlocksEndedin interfaceStatementContainer<Statement>
-
getLinearlyNext
-
copyBlockInformationFrom
- Specified by:
copyBlockInformationFromin interfaceStatementContainer<Statement>
-
copyBytecodeInformationFrom
- Specified by:
copyBytecodeInformationFromin interfaceStatementContainer<Statement>
-
isAgreedNop
public boolean isAgreedNop() -
replaceBlockIfIn
-
splice
-
replaceTarget
-
replaceSingleSourceWith
private void replaceSingleSourceWith(Op03SimpleStatement oldSource, List<Op03SimpleStatement> newSources) -
replaceSource
-
removeSource
-
removeTarget
-
removeGotoTarget
-
getIndex
- Specified by:
getIndexin interfaceIndexedStatement- Specified by:
getIndexin interfaceStatementContainer<Statement>
-
setIndex
-
getThisComparisonBlock
-
clearThisComparisonBlock
public void clearThisComparisonBlock() -
markBlockStatement
public void markBlockStatement(BlockIdentifier blockIdentifier, Op03SimpleStatement lastInBlock, Op03SimpleStatement blockEnd, List<Op03SimpleStatement> statements) -
markFirstStatementInBlock
-
markBlock
-
collect
-
condense
-
rewrite
-
findCreation
-
clearTargets
public void clearTargets() -
needsLabel
private boolean needsLabel() -
getLabel
- Specified by:
getLabelin interfaceStatementContainer<Statement>
-
dumpInner
-
dump
-
getStructuredStatementPlaceHolder
-
isCompound
public boolean isCompound() -
splitCompound
-
collectLocallyMutatedVariables
-
forceSSAIdentifiers
-
noteInterestingLifetimes
-
assignSSAIdentifiers
-
createInitialStructuredBlock
public static Op04StructuredStatement createInitialStructuredBlock(List<Op03SimpleStatement> statements) -
getJumpType
-
addPossibleExitFor
-
isPossibleExitFor
-
removePointlessSwitchDefault
-
removePointlessSwitchDefaults
-
toString
-