|
|||||||||
| 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.INVOCATION
harpoon.IR.Tree.CALL
public class CALL
CALL objects are statements which stand for
java method invocations, using our runtime's calling convention.
The handler expression is a
Tree.NAME specifying the label to which we should return
from this call if an exception occurs. If the called method throws
an exception, the throwable object is placed in the Temp
specified by retex and a control tranfer to the
Label specified by handler occurs.
Note the value in retval is undefined (that is, it
may have any value at all) when an "exceptional" return occurs.
If there is no exception thrown by the callee, then the return
value is placed in the Temp specified by
retval and execution continues normally. The value
in retex is undefined (may be given any value) in this case.
Note that
retval may be null if the called method has void return
type.
See also IR.LowQuad.PCALL and IR.Quads.CALL,
which have similar execution semantics.
CALL,
INVOCATION,
NATIVECALL| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class harpoon.IR.Tree.Tree |
|---|
Tree.CloneCallback |
| Field Summary | |
|---|---|
boolean |
isTailCall
Whether this invocation should be performed as a tail call. |
| Fields inherited from class harpoon.IR.Tree.Tree |
|---|
arrayFactory, child |
| Constructor Summary | |
|---|---|
CALL(TreeFactory tf,
HCodeElement source,
TEMP retval,
TEMP retex,
Exp func,
ExpList args,
NAME handler,
boolean isTailCall)
Create a CALL object. |
|
| Method Summary | |
|---|---|
void |
accept(TreeVisitor v)
Accept a visitor |
Stm |
build(TreeFactory tf,
ExpList kids)
|
NAME |
getHandler()
Returns an expression indicating the destination to which we should return if our caller throws an exception. |
TEMP |
getRetex()
Returns the destination expression for any exception which the callee might throw. |
boolean |
isNative()
|
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 |
setHandler(NAME handler)
Sets the destination to which we should return if our caller throws an exception. |
void |
setRetex(TEMP retex)
Sets the destination temp for any exception which the callee might throw. |
String |
toString()
|
| Methods inherited from class harpoon.IR.Tree.INVOCATION |
|---|
getArgs, getFunc, getRetval, kids, setArgs, setFunc, setRetval |
| 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 |
| Field Detail |
|---|
public final boolean isTailCall
| Constructor Detail |
|---|
public CALL(TreeFactory tf,
HCodeElement source,
TEMP retval,
TEMP retex,
Exp func,
ExpList args,
NAME handler,
boolean isTailCall)
CALL object.
retex - Destination for any exception which the callee
might throw. Must be non-null.handler - Expression indicating the destination to which
we should return if our caller throws an exception.| Method Detail |
|---|
public TEMP getRetex()
public NAME getHandler()
public void setRetex(TEMP retex)
public void setHandler(NAME handler)
public boolean isNative()
isNative in class INVOCATIONpublic int kind()
TreeTree. The enumerated values are defined in
TreeKind.
kind in class Tree
public Stm build(TreeFactory tf,
ExpList kids)
build in class Stmpublic void accept(TreeVisitor v)
accept in class INVOCATION
public Tree rename(TreeFactory tf,
TempMap tm,
Tree.CloneCallback cb)
TreeTEMP nodes
are renamed according to the supplied TempMap.
Note that Temps 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 Treepublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||