Class ArithmeticOperation
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.parse.expression.AbstractExpression
-
- org.benf.cfr.reader.bytecode.analysis.parse.expression.ArithmeticOperation
-
- All Implemented Interfaces:
HasByteCodeLoc,Expression,BoxingProcessor,DeepCloneable<Expression>,ComparableUnderEC,Dumpable,DumpableWithPrecedence,TypeUsageCollectable
public class ArithmeticOperation extends AbstractExpression implements BoxingProcessor
-
-
Field Summary
Fields Modifier and Type Field Description private Expressionlhsprivate ArithOpopprivate Expressionrhs
-
Constructor Summary
Constructors Constructor Description ArithmeticOperation(BytecodeLoc loc, Expression lhs, Expression rhs, ArithOp op)ArithmeticOperation(BytecodeLoc loc, InferredJavaType knownType, Expression lhs, Expression rhs, ArithOp op)
-
Method Summary
-
Methods inherited from class org.benf.cfr.reader.bytecode.analysis.parse.expression.AbstractExpression
addLoc, dump, dumpWithOuterPrecedence, getInferredJavaType, getLoc, isSimple, isValidStatement, outerDeepClone, toString
-
-
-
-
Field Detail
-
lhs
private Expression lhs
-
rhs
private Expression rhs
-
op
private final ArithOp op
-
-
Constructor Detail
-
ArithmeticOperation
public ArithmeticOperation(BytecodeLoc loc, Expression lhs, Expression rhs, ArithOp op)
-
ArithmeticOperation
public ArithmeticOperation(BytecodeLoc loc, InferredJavaType knownType, Expression lhs, Expression rhs, ArithOp op)
-
-
Method Detail
-
getCombinedLoc
public BytecodeLoc getCombinedLoc()
- Specified by:
getCombinedLocin interfaceHasByteCodeLoc
-
collectTypeUsages
public void collectTypeUsages(TypeUsageCollector collector)
- Specified by:
collectTypeUsagesin interfaceTypeUsageCollectable- Overrides:
collectTypeUsagesin classAbstractExpression
-
deepClone
public Expression deepClone(CloneHelper cloneHelper)
- Specified by:
deepClonein interfaceDeepCloneable<Expression>
-
inferredType
private static InferredJavaType inferredType(InferredJavaType a, InferredJavaType b, ArithOp op)
-
getPrecedence
public Precedence getPrecedence()
- Specified by:
getPrecedencein interfaceDumpableWithPrecedence- Specified by:
getPrecedencein classAbstractExpression
-
dumpInner
public Dumper dumpInner(Dumper d)
- Specified by:
dumpInnerin classAbstractExpression
-
getComputedLiteral
public Literal getComputedLiteral(java.util.Map<LValue,Literal> display)
- Specified by:
getComputedLiteralin interfaceExpression- Overrides:
getComputedLiteralin classAbstractExpression
-
isLValueExprFor
private boolean isLValueExprFor(LValueExpression expression, LValue lValue)
-
isLiteralFunctionOf
public boolean isLiteralFunctionOf(LValue lValue)
-
isXorM1
public boolean isXorM1()
-
getReplacementXorM1
public Expression getReplacementXorM1()
-
isMutationOf
public boolean isMutationOf(LValue lValue)
-
getMutationOf
public AbstractMutatingAssignmentExpression getMutationOf(LValue lValue)
-
replaceSingleUsageLValues
public Expression replaceSingleUsageLValues(LValueRewriter lValueRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer)
- Specified by:
replaceSingleUsageLValuesin interfaceExpression
-
applyExpressionRewriter
public Expression applyExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
applyExpressionRewriterin interfaceExpression
-
applyReverseExpressionRewriter
public Expression applyReverseExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
applyReverseExpressionRewriterin interfaceExpression
-
collectUsedLValues
public void collectUsedLValues(LValueUsageCollector lValueUsageCollector)
- Specified by:
collectUsedLValuesin interfaceExpression
-
canPushDownInto
public boolean canPushDownInto()
- Specified by:
canPushDownIntoin interfaceExpression- Overrides:
canPushDownIntoin classAbstractExpression
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin classAbstractExpression
-
equivalentUnder
public final boolean equivalentUnder(java.lang.Object o, EquivalenceConstraint constraint)- Specified by:
equivalentUnderin interfaceComparableUnderEC- Specified by:
equivalentUnderin interfaceExpression
-
returnsTrueForNaN
private static boolean returnsTrueForNaN(CompOp from, int on, boolean nanG)
-
canNegateAroundNaN
private static boolean canNegateAroundNaN(CompOp from, int on)
-
canThrow
public boolean canThrow(ExceptionCheck caught)
- Specified by:
canThrowin interfaceExpression- Overrides:
canThrowin classAbstractExpression
-
rewriteBoxing
public boolean rewriteBoxing(PrimitiveBoxingRewriter boxingRewriter)
- Specified by:
rewriteBoxingin interfaceBoxingProcessor
-
applyNonArgExpressionRewriter
public void applyNonArgExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
applyNonArgExpressionRewriterin interfaceBoxingProcessor
-
getLhs
public Expression getLhs()
-
getRhs
public Expression getRhs()
-
getOp
public ArithOp getOp()
-
visit
public <T> T visit(ExpressionVisitor<T> visitor)
- Specified by:
visitin interfaceExpression- Overrides:
visitin classAbstractExpression
-
pushDown
public Expression pushDown(Expression toPush, Expression parent)
- Specified by:
pushDownin interfaceExpression- Overrides:
pushDownin classAbstractExpression
-
-