public class LValueAssignmentAndAliasCondenser extends java.lang.Object implements LValueRewriter<Statement>, LValueAssignmentCollector<Statement>
Modifier and Type | Class and 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 |
LValueRewriter.Util
Modifier and Type | Field and 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 and Description |
---|
LValueAssignmentAndAliasCondenser() |
LValueAssignmentAndAliasCondenser(LValueAssignmentAndAliasCondenser other,
java.util.Set<LValue> keepConstant) |
private final java.util.Map<StackSSALabel,LValueAssignmentAndAliasCondenser.ExpressionStatementPair> found
private final java.util.Set<StackSSALabel> blacklisted
private final java.util.Set<LValue> keepConstant
private final java.util.Map<StackSSALabel,Expression> aliasReplacements
private final java.util.Map<StackSSALabel,LValueAssignmentAndAliasCondenser.ExpressionStatementPair> multiFound
private final java.util.Map<LValueAssignmentAndAliasCondenser.VersionedLValue,LValueAssignmentAndAliasCondenser.ExpressionStatementPair> mutableFound
private final java.util.Map<Expression,Expression> cache
private static final java.util.Set<SSAIdent> emptyFixed
public LValueAssignmentAndAliasCondenser()
public LValueAssignmentAndAliasCondenser(LValueAssignmentAndAliasCondenser other, java.util.Set<LValue> keepConstant)
public void collect(StackSSALabel lValue, StatementContainer<Statement> statementContainer, Expression value)
collect
in interface LValueAssignmentCollector<Statement>
public void collectMultiUse(StackSSALabel lValue, StatementContainer<Statement> statementContainer, Expression value)
collectMultiUse
in interface LValueAssignmentCollector<Statement>
public void collectMutatedLValue(LValue lValue, StatementContainer<Statement> statementContainer, Expression value)
collectMutatedLValue
in interface LValueAssignmentCollector<Statement>
public void collectLocalVariableAssignment(LocalVariable localVariable, StatementContainer<Statement> statementContainer, Expression value)
collectLocalVariableAssignment
in interface LValueAssignmentCollector<Statement>
public LValueRewriter getWithFixed(java.util.Set<SSAIdent> fixed)
getWithFixed
in interface LValueRewriter<Statement>
public LValueRewriter<Statement> keepConstant(java.util.Collection<LValue> usedLValues)
keepConstant
in interface LValueRewriter<Statement>
public void reset()
public boolean needLR()
needLR
in interface LValueRewriter<Statement>
public Expression getLValueReplacement(LValue lValue, SSAIdentifiers<LValue> ssaIdentifiers, StatementContainer<Statement> lvSc)
getLValueReplacement
in interface LValueRewriter<Statement>
private boolean isSimple(Expression res)
private boolean jumpsMethods(Op03SimpleStatement lvSc, Op03SimpleStatement statementContainer)
public boolean explicitlyReplaceThisLValue(LValue lValue)
explicitlyReplaceThisLValue
in interface LValueRewriter<Statement>
public void checkPostConditions(LValue lValue, Expression rValue)
checkPostConditions
in interface LValueRewriter<Statement>
public LValueAssignmentAndAliasCondenser.AliasRewriter getAliasRewriter()
public LValueAssignmentAndAliasCondenser.MutationRewriterFirstPass getMutationRewriterFirstPass()