harpoon.IR.Tree
Class NAME
java.lang.Object
harpoon.IR.Tree.Tree
harpoon.IR.Tree.Exp
harpoon.IR.Tree.NAME
- All Implemented Interfaces:
- HCodeElement, HDataElement, Typed
public class NAME
- extends Exp
- implements HDataElement
NAME
objects are expressions which stand for symbolic
constants. They usually correspond to some assembly language label
in the code or data segment.
- Version:
- $Id: NAME.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 |
Label |
label
The label which this NAME refers to. |
Methods inherited from class harpoon.IR.Tree.Tree |
clone, clone, getChild, getFactory, getFirstChild, getID, getLineNumber, getParent, getSibling, getSourceFile, hashCode, kids, rename, replace, setChild, unlink |
label
public final Label label
- The label which this NAME refers to.
NAME
public NAME(TreeFactory tf,
HCodeElement source,
Label label)
- Constructor.
kind
public int kind()
- Description copied from class:
Tree
- Return an integer enumeration of the kind of this
Tree
. The enumerated values are defined in
TreeKind
.
- Specified by:
kind
in class Tree
build
public Exp build(TreeFactory tf,
ExpList kids)
- Specified by:
build
in class Exp
accept
public void accept(TreeVisitor v)
- Accept a visitor
- Specified by:
accept
in class Tree
rename
public Tree rename(TreeFactory tf,
TempMap tm,
Tree.CloneCallback cb)
- Description copied from class:
Tree
- Rename while cloning a subtree. This node and all child nodes
are cloned; the 'temp' information of all
TEMP
nodes
are renamed according to the supplied TempMap
.
Note that Temp
s not belonging to
this.getFactory().tempFactory()
are not affected.
The callback()
method of the supplied
CloneCallback
is invoked once on each subtree cloned,
starting from the leaves and working back to the root in a
post-order depth-first manner.
- Specified by:
rename
in class Tree
type
public int type()
- Description copied from class:
Exp
- Result type.
- Specified by:
type
in interface Typed
- Specified by:
type
in class Exp
- Returns:
Type.POINTER
toString
public String toString()
- Overrides:
toString
in class Object