|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.Tree.Tree
harpoon.IR.Tree.Stm
harpoon.IR.Tree.METHOD
public class METHOD
Tree.METHOD
objects encode method-specific information:
the mapping of method formals to temporary variables, and
links to the exception handlers for the method.
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 |
Constructor Summary | |
---|---|
METHOD(TreeFactory tf,
HCodeElement source,
Label method,
int retType,
TEMP[] params)
Creates a Tree.METHOD object. |
Method Summary | |
---|---|
void |
accept(TreeVisitor v)
Accept a visitor. |
Stm |
build(TreeFactory tf,
ExpList kids)
|
Label |
getMethod()
Return the label which should mark the top of the method. |
TEMP[] |
getParams()
Return the temporary variables used for method formals. |
TEMP |
getParams(int i)
|
int |
getParamsLength()
|
int |
getReturnType()
Return an integer enumeration (see Typed ) of the
return type of the method. |
ExpList |
kids()
Return a list of subexpressions of this Tree . |
int |
kind()
Return an integer enumeration of the kind of this Tree . |
Tree |
rename(TreeFactory tf,
TempMap tm,
Tree.CloneCallback cb)
Rename while cloning a subtree. |
void |
setParams(TEMP[] params)
Set the temporary variables used for method formals. |
String |
toString()
Returns human-readable representation of this Tree . |
Methods inherited from class harpoon.IR.Tree.Stm |
---|
build, isNop, linearize, toStm |
Methods inherited from class harpoon.IR.Tree.Tree |
---|
clone, clone, getChild, getFactory, getFirstChild, getID, getLineNumber, getParent, getSibling, getSourceFile, hashCode, rename, replace, setChild, unlink |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public METHOD(TreeFactory tf, HCodeElement source, Label method, int retType, TEMP[] params)
Tree.METHOD
object.
method
- label to mark the top of the methodretType
- integer enumeration (see Typed
) of the
return type of this method, or -1 if the method
returns no value.params
- temporaries which map directly to the
parameters of this Tree.METHOD
.
The first element should be a pointer to the
exception-handling code for this method. For
non-static methods, the second parameter should be the
this
pointer of the caller. Subsequent
elements of the array should be the formal parameters
of the method, in the order which they are declared.Method Detail |
---|
public Label getMethod()
public int getReturnType()
Typed
) of the
return type of the method. Returns -1 if the method returns no
value.
public TEMP[] getParams()
public void setParams(TEMP[] params)
public int getParamsLength()
public TEMP getParams(int i)
public int kind()
Tree
Tree
. The enumerated values are defined in
TreeKind
.
kind
in class Tree
public ExpList kids()
Tree
Tree
.
kids
in class Tree
public Stm build(TreeFactory tf, ExpList kids)
build
in class Stm
public Tree rename(TreeFactory tf, TempMap tm, Tree.CloneCallback cb)
Tree
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.
rename
in class Tree
public void accept(TreeVisitor v)
accept
in class Tree
public String toString()
Tree
.
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |