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 Statement
private BlockIdentifier
private InstrIndex
private boolean
private Op03SimpleStatement
private Op03SimpleStatement
private 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 TypeMethodDescriptionvoid
void
addSource
(Op03SimpleStatement source) void
addTarget
(Op03SimpleStatement target) static void
assignSSAIdentifiers
(Method method, List<Op03SimpleStatement> statements) void
clear()
void
void
void
collect
(LValueAssignmentAndAliasCondenser lValueAssigmentCollector) private void
collectLocallyMutatedVariables
(SSAIdentifierFactory<LValue, ?> ssaIdentifierFactory) void
condense
(LValueRewriter lValueRewriter) void
void
static Op04StructuredStatement
createInitialStructuredBlock
(List<Op03SimpleStatement> statements) void
void
findCreation
(CreationCollector creationCollector) void
forceSSAIdentifiers
(SSAIdentifiers<LValue> newIdentifiers) getIndex()
getLabel()
private Op04StructuredStatement
getTargetStatement
(int idx) boolean
boolean
boolean
isPossibleExitFor
(BlockIdentifier ident) private void
void
markBlock
(BlockIdentifier blockIdentifier) void
markBlockStatement
(BlockIdentifier blockIdentifier, Op03SimpleStatement lastInBlock, Op03SimpleStatement blockEnd, List<Op03SimpleStatement> statements) void
markFirstStatementInBlock
(BlockIdentifier blockIdentifier) private boolean
void
nopOut()
void
static void
noteInterestingLifetimes
(List<Op03SimpleStatement> statements) void
removeGotoTarget
(Op03SimpleStatement oldTarget) private static void
static void
removePointlessSwitchDefaults
(List<Op03SimpleStatement> statements) void
removeSource
(Op03SimpleStatement oldSource) void
removeTarget
(Op03SimpleStatement oldTarget) (package private) void
replaceBlockIfIn
(BlockIdentifier oldB, BlockIdentifier newB) private void
replaceSingleSourceWith
(Op03SimpleStatement oldSource, List<Op03SimpleStatement> newSources) void
replaceSource
(Op03SimpleStatement oldSource, Op03SimpleStatement newSource) void
replaceStatement
(Statement newStatement) void
replaceTarget
(Op03SimpleStatement oldTarget, Op03SimpleStatement newTarget) void
rewrite
(ExpressionRewriter expressionRewriter) void
setFirstStatementInThisBlock
(BlockIdentifier firstStatementInThisBlock) void
setIndex
(InstrIndex index) void
setLinearlyNext
(Op03SimpleStatement linearlyNext) void
setLinearlyPrevious
(Op03SimpleStatement linearlyPrevious) void
splice
(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:
getSources
in interfaceGraph<Op03SimpleStatement>
-
getTargets
- Specified by:
getTargets
in interfaceGraph<Op03SimpleStatement>
-
setLinearlyNext
-
getLinearlyPrevious
-
setLinearlyPrevious
-
getFirstStatementInThisBlock
-
setFirstStatementInThisBlock
-
addSource
- Specified by:
addSource
in interfaceMutableGraph<Op03SimpleStatement>
-
addTarget
- Specified by:
addTarget
in interfaceMutableGraph<Op03SimpleStatement>
-
getStatement
- Specified by:
getStatement
in interfaceStatementContainer<Statement>
-
getTargetStatement
- Specified by:
getTargetStatement
in interfaceStatementContainer<Statement>
-
replaceStatement
- 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
- Specified by:
getSSAIdentifiers
in interfaceStatementContainer<Statement>
-
getBlockIdentifiers
- Specified by:
getBlockIdentifiers
in interfaceStatementContainer<Statement>
-
getBlockStarted
- Specified by:
getBlockStarted
in interfaceStatementContainer<Statement>
-
getBlocksEnded
- Specified by:
getBlocksEnded
in interfaceStatementContainer<Statement>
-
getLinearlyNext
-
copyBlockInformationFrom
- Specified by:
copyBlockInformationFrom
in interfaceStatementContainer<Statement>
-
copyBytecodeInformationFrom
- Specified by:
copyBytecodeInformationFrom
in 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:
getIndex
in interfaceIndexedStatement
- Specified by:
getIndex
in 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:
getLabel
in 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
-