harpoon.IR.Tree
Class OPER
java.lang.Object
harpoon.IR.Tree.Tree
harpoon.IR.Tree.Exp
harpoon.IR.Tree.OPER
- All Implemented Interfaces:
- HCodeElement, Typed
- Direct Known Subclasses:
- BINOP, UNOP
public abstract class OPER
- extends Exp
OPER
objects are expressions which stand for the result
of applying some operator to subexpressions.
- Version:
- $Id: OPER.java,v 1.4 2002/04/10 03:05:45 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>, based on
Modern Compiler Implementation in Java by Andrew Appel.
Field Summary |
int |
op
An enumerated type encoding the operator. |
int |
optype
Type of the operands (not necessarily the result type). |
Method Summary |
void |
accept(TreeVisitor v)
Accept a visitor |
int |
operandType()
Return type of operands (not necessarily the result type). |
abstract int |
type()
Return result type. |
Methods inherited from class harpoon.IR.Tree.Tree |
clone, clone, getChild, getFactory, getFirstChild, getID, getLineNumber, getParent, getSibling, getSourceFile, hashCode, kids, kind, rename, rename, replace, setChild, unlink |
op
public final int op
- An enumerated type encoding the operator.
- See Also:
Bop
,
Uop
optype
public final int optype
- Type of the operands (not necessarily the result type).
OPER
public OPER(TreeFactory tf,
HCodeElement source,
int optype,
int op,
int arity)
accept
public void accept(TreeVisitor v)
- Accept a visitor
- Specified by:
accept
in class Tree
type
public abstract int type()
- Return result type.
- Specified by:
type
in interface Typed
- Specified by:
type
in class Exp
operandType
public int operandType()
- Return type of operands (not necessarily the result type).