harpoon.IR.Tree
Class OPER

java.lang.Object
  extended by harpoon.IR.Tree.Tree
      extended by harpoon.IR.Tree.Exp
          extended by 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.

Nested Class Summary
 
Nested classes/interfaces inherited from class harpoon.IR.Tree.Tree
Tree.CloneCallback
 
Field Summary
 int op
          An enumerated type encoding the operator.
 int optype
          Type of the operands (not necessarily the result type).
 
Fields inherited from class harpoon.IR.Tree.Tree
arrayFactory, child
 
Fields inherited from interface harpoon.IR.Tree.Typed
DOUBLE, FLOAT, INT, LONG, POINTER
 
Constructor Summary
OPER(TreeFactory tf, HCodeElement source, int optype, int op, int arity)
           
 
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.Exp
build, build, isDoubleWord, isFloatingPoint
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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).

Constructor Detail

OPER

public OPER(TreeFactory tf,
            HCodeElement source,
            int optype,
            int op,
            int arity)
Method Detail

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).