Class LValueAssignmentAndAliasCondenser
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.parse.utils.LValueAssignmentAndAliasCondenser
-
- All Implemented Interfaces:
LValueAssignmentCollector<Statement>
,LValueRewriter<Statement>
public class LValueAssignmentAndAliasCondenser extends java.lang.Object implements LValueRewriter<Statement>, LValueAssignmentCollector<Statement>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
LValueAssignmentAndAliasCondenser.AliasRewriter
private static class
LValueAssignmentAndAliasCondenser.ExpressionStatementPair
private static class
LValueAssignmentAndAliasCondenser.LValueStatementContainer
class
LValueAssignmentAndAliasCondenser.MutationRewriterFirstPass
class
LValueAssignmentAndAliasCondenser.MutationRewriterSecondPass
private static class
LValueAssignmentAndAliasCondenser.VersionedLValue
-
Nested classes/interfaces inherited from interface org.benf.cfr.reader.bytecode.analysis.parse.utils.LValueRewriter
LValueRewriter.Util
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<StackSSALabel,Expression>
aliasReplacements
private java.util.Set<StackSSALabel>
blacklisted
private java.util.Map<Expression,Expression>
cache
private static java.util.Set<SSAIdent>
emptyFixed
private java.util.Map<StackSSALabel,LValueAssignmentAndAliasCondenser.ExpressionStatementPair>
found
private java.util.Set<LValue>
keepConstant
private java.util.Map<StackSSALabel,LValueAssignmentAndAliasCondenser.ExpressionStatementPair>
multiFound
private java.util.Map<LValueAssignmentAndAliasCondenser.VersionedLValue,LValueAssignmentAndAliasCondenser.ExpressionStatementPair>
mutableFound
-
Constructor Summary
Constructors Constructor Description LValueAssignmentAndAliasCondenser()
LValueAssignmentAndAliasCondenser(LValueAssignmentAndAliasCondenser other, java.util.Set<LValue> keepConstant)
-
Method Summary
-
-
-
Field Detail
-
found
private final java.util.Map<StackSSALabel,LValueAssignmentAndAliasCondenser.ExpressionStatementPair> found
-
blacklisted
private final java.util.Set<StackSSALabel> blacklisted
-
keepConstant
private final java.util.Set<LValue> keepConstant
-
aliasReplacements
private final java.util.Map<StackSSALabel,Expression> aliasReplacements
-
multiFound
private final java.util.Map<StackSSALabel,LValueAssignmentAndAliasCondenser.ExpressionStatementPair> multiFound
-
mutableFound
private final java.util.Map<LValueAssignmentAndAliasCondenser.VersionedLValue,LValueAssignmentAndAliasCondenser.ExpressionStatementPair> mutableFound
-
cache
private final java.util.Map<Expression,Expression> cache
-
emptyFixed
private static final java.util.Set<SSAIdent> emptyFixed
-
-
Constructor Detail
-
LValueAssignmentAndAliasCondenser
public LValueAssignmentAndAliasCondenser()
-
LValueAssignmentAndAliasCondenser
public LValueAssignmentAndAliasCondenser(LValueAssignmentAndAliasCondenser other, java.util.Set<LValue> keepConstant)
-
-
Method Detail
-
collect
public void collect(StackSSALabel lValue, StatementContainer<Statement> statementContainer, Expression value)
- Specified by:
collect
in interfaceLValueAssignmentCollector<Statement>
-
collectMultiUse
public void collectMultiUse(StackSSALabel lValue, StatementContainer<Statement> statementContainer, Expression value)
- Specified by:
collectMultiUse
in interfaceLValueAssignmentCollector<Statement>
-
collectMutatedLValue
public void collectMutatedLValue(LValue lValue, StatementContainer<Statement> statementContainer, Expression value)
- Specified by:
collectMutatedLValue
in interfaceLValueAssignmentCollector<Statement>
-
collectLocalVariableAssignment
public void collectLocalVariableAssignment(LocalVariable localVariable, StatementContainer<Statement> statementContainer, Expression value)
- Specified by:
collectLocalVariableAssignment
in interfaceLValueAssignmentCollector<Statement>
-
getWithFixed
public LValueRewriter getWithFixed(java.util.Set<SSAIdent> fixed)
- Specified by:
getWithFixed
in interfaceLValueRewriter<Statement>
-
keepConstant
public LValueRewriter<Statement> keepConstant(java.util.Collection<LValue> usedLValues)
- Specified by:
keepConstant
in interfaceLValueRewriter<Statement>
-
reset
public void reset()
-
needLR
public boolean needLR()
- Specified by:
needLR
in interfaceLValueRewriter<Statement>
-
getLValueReplacement
public Expression getLValueReplacement(LValue lValue, SSAIdentifiers<LValue> ssaIdentifiers, StatementContainer<Statement> lvSc)
- Specified by:
getLValueReplacement
in interfaceLValueRewriter<Statement>
-
isSimple
private boolean isSimple(Expression res)
-
jumpsMethods
private boolean jumpsMethods(Op03SimpleStatement lvSc, Op03SimpleStatement statementContainer)
-
explicitlyReplaceThisLValue
public boolean explicitlyReplaceThisLValue(LValue lValue)
- Specified by:
explicitlyReplaceThisLValue
in interfaceLValueRewriter<Statement>
-
checkPostConditions
public void checkPostConditions(LValue lValue, Expression rValue)
- Specified by:
checkPostConditions
in interfaceLValueRewriter<Statement>
-
getAliasRewriter
public LValueAssignmentAndAliasCondenser.AliasRewriter getAliasRewriter()
-
getMutationRewriterFirstPass
public LValueAssignmentAndAliasCondenser.MutationRewriterFirstPass getMutationRewriterFirstPass()
-
-