Class ArithExpr
java.lang.Object
EDU.purdue.cs.bloat.tree.Node
EDU.purdue.cs.bloat.tree.Expr
EDU.purdue.cs.bloat.tree.ArithExpr
- All Implemented Interfaces:
Cloneable
ArithExpr represents a binary arithmetic expression. It consists of two
operands and an operator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final char -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanequalsExpr(Expr other) Compare this arithmetic expression to another Expression.intReturns the hash code for this expresion.left()intright()voidvisit(TreeVisitor visitor) voidvisitForceChildren(TreeVisitor visitor) Visit the children of this node.Methods inherited from class Expr
cleanupOnly, comparator, copyInto, def, isDef, setDef, setType, stmt, typeMethods inherited from class Node
block, cleanup, copyInto, hasParent, key, parent, replaceWith, replaceWith, setKey, setParent, setValueNumber, toString, valueNumber, visitChildren, visitOnly
-
Field Details
-
ADD
public static final char ADD- See Also:
-
SUB
public static final char SUB- See Also:
-
DIV
public static final char DIV- See Also:
-
MUL
public static final char MUL- See Also:
-
REM
public static final char REM- See Also:
-
AND
public static final char AND- See Also:
-
IOR
public static final char IOR- See Also:
-
XOR
public static final char XOR- See Also:
-
CMP
public static final char CMP- See Also:
-
CMPL
public static final char CMPL- See Also:
-
CMPG
public static final char CMPG- See Also:
-
-
Constructor Details
-
ArithExpr
-
-
Method Details
-
operation
public int operation() -
left
-
right
-
visitForceChildren
Description copied from class:NodeVisit the children of this node. Not all Nodes will have children to visit.- Specified by:
visitForceChildrenin classNode
-
visit
-
exprHashCode
public int exprHashCode()Description copied from class:ExprReturns the hash code for this expresion.- Specified by:
exprHashCodein classExpr
-
equalsExpr
Compare this arithmetic expression to another Expression.- Specified by:
equalsExprin classExpr- Parameters:
other- Expr to which to compare this.- Returns:
- True, if both expressions have the same contents.
-
clone
-