harpoon.IR.Tree
Class Exp

java.lang.Object
  extended by harpoon.IR.Tree.Tree
      extended by harpoon.IR.Tree.Exp
All Implemented Interfaces:
HCodeElement, Typed
Direct Known Subclasses:
CONST, ESEQ, MEM, NAME, OPER, TEMP

public abstract class Exp
extends Tree
implements Typed

Exp objects are expressions which stand for the computation of some value (possibly with side effects).

Version:
$Id: Exp.java,v 1.2 2002/02/25 21:05:31 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
 
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
protected Exp(TreeFactory tf, HCodeElement source, int arity)
           
 
Method Summary
 Exp build(ExpList kids)
          Build an Exp of this type from the given list of subexpressions.
abstract  Exp build(TreeFactory tf, ExpList kids)
           
 boolean isDoubleWord()
          Returns true if the expression corresponds to a 64-bit value.
 boolean isFloatingPoint()
          Returns true if the expression corresponds to a floating-point value.
abstract  int type()
          Result type.
 
Methods inherited from class harpoon.IR.Tree.Tree
accept, 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
 

Constructor Detail

Exp

protected Exp(TreeFactory tf,
              HCodeElement source,
              int arity)
Method Detail

build

public final Exp build(ExpList kids)
Build an Exp of this type from the given list of subexpressions.


build

public abstract Exp build(TreeFactory tf,
                          ExpList kids)

type

public abstract int type()
Result type.

Specified by:
type in interface Typed

isDoubleWord

public boolean isDoubleWord()
Returns true if the expression corresponds to a 64-bit value.

Specified by:
isDoubleWord in interface Typed

isFloatingPoint

public boolean isFloatingPoint()
Returns true if the expression corresponds to a floating-point value.

Specified by:
isFloatingPoint in interface Typed