public class ArithmeticOperation extends AbstractExpression implements BoxingProcessor
Modifier and Type | Field and Description |
---|---|
private Expression |
lhs |
private ArithOp |
op |
private Expression |
rhs |
Constructor and Description |
---|
ArithmeticOperation(BytecodeLoc loc,
Expression lhs,
Expression rhs,
ArithOp op) |
ArithmeticOperation(BytecodeLoc loc,
InferredJavaType knownType,
Expression lhs,
Expression rhs,
ArithOp op) |
addLoc, dump, dumpWithOuterPrecedence, getInferredJavaType, getLoc, isSimple, isValidStatement, outerDeepClone, toString
private Expression lhs
private Expression rhs
private final ArithOp op
public ArithmeticOperation(BytecodeLoc loc, Expression lhs, Expression rhs, ArithOp op)
public ArithmeticOperation(BytecodeLoc loc, InferredJavaType knownType, Expression lhs, Expression rhs, ArithOp op)
public BytecodeLoc getCombinedLoc()
getCombinedLoc
in interface HasByteCodeLoc
public void collectTypeUsages(TypeUsageCollector collector)
collectTypeUsages
in interface TypeUsageCollectable
collectTypeUsages
in class AbstractExpression
public Expression deepClone(CloneHelper cloneHelper)
deepClone
in interface DeepCloneable<Expression>
private static InferredJavaType inferredType(InferredJavaType a, InferredJavaType b, ArithOp op)
public Precedence getPrecedence()
getPrecedence
in interface DumpableWithPrecedence
getPrecedence
in class AbstractExpression
public Dumper dumpInner(Dumper d)
dumpInner
in class AbstractExpression
public Literal getComputedLiteral(java.util.Map<LValue,Literal> display)
getComputedLiteral
in interface Expression
getComputedLiteral
in class AbstractExpression
private boolean isLValueExprFor(LValueExpression expression, LValue lValue)
public boolean isLiteralFunctionOf(LValue lValue)
public boolean isXorM1()
public Expression getReplacementXorM1()
public boolean isMutationOf(LValue lValue)
public AbstractMutatingAssignmentExpression getMutationOf(LValue lValue)
public Expression replaceSingleUsageLValues(LValueRewriter lValueRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer)
replaceSingleUsageLValues
in interface Expression
public Expression applyExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
applyExpressionRewriter
in interface Expression
public Expression applyReverseExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
applyReverseExpressionRewriter
in interface Expression
public void collectUsedLValues(LValueUsageCollector lValueUsageCollector)
collectUsedLValues
in interface Expression
public boolean canPushDownInto()
canPushDownInto
in interface Expression
canPushDownInto
in class AbstractExpression
public boolean equals(java.lang.Object o)
equals
in class AbstractExpression
public final boolean equivalentUnder(java.lang.Object o, EquivalenceConstraint constraint)
equivalentUnder
in interface Expression
equivalentUnder
in interface ComparableUnderEC
private static boolean returnsTrueForNaN(CompOp from, int on, boolean nanG)
private static boolean canNegateAroundNaN(CompOp from, int on)
public boolean canThrow(ExceptionCheck caught)
canThrow
in interface Expression
canThrow
in class AbstractExpression
public boolean rewriteBoxing(PrimitiveBoxingRewriter boxingRewriter)
rewriteBoxing
in interface BoxingProcessor
public void applyNonArgExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
applyNonArgExpressionRewriter
in interface BoxingProcessor
public Expression getLhs()
public Expression getRhs()
public ArithOp getOp()
public <T> T visit(ExpressionVisitor<T> visitor)
visit
in interface Expression
visit
in class AbstractExpression
public Expression pushDown(Expression toPush, Expression parent)
pushDown
in interface Expression
pushDown
in class AbstractExpression