All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.IR.QuadSSA.CALL

java.lang.Object
   |
   +----harpoon.IR.QuadSSA.Quad
           |
           +----harpoon.IR.QuadSSA.CALL

public class CALL
extends Quad
CALL objects represent method invocations.

The objectref field will be null for static methods; the retval field will be null for void methods.

It is a semantic error for the objectref Temp of a non-static method CALL to be able to have the value null at run-time. A separate null-pointer test should always precede the CALL quad if objectref may be null at run-time. Standard java invocation throws a NullPointerException if the object reference is null.

Version:
$Id: CALL.java,v 1.27 1998/11/10 03:34:10 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Variable Index

 o isSpecial
Special flag for INVOKESPECIAL (different invoke semantics)
 o method
The method to invoke.
 o objectref
The object in which to invoke the method; null for static methods.
 o params
Parameters to pass to the method.
 o retex
Destination for any exception thrown by the method.
 o retval
Destination for the method's return value; null for void methods.

Constructor Index

 o CALL(HCodeElement, HMethod, Temp, Temp[], Temp, Temp, boolean)
Creates a CALL.

Method Index

 o clone()
Properly clone params[] array.
 o def()
Returns all the Temps defined by this Quad.
 o isInterfaceMethod()
Determines whether this CALL is to an interface method.
 o isSpecial()
Determine whether this CALL uses INVOKESPECIAL semantics.
 o isStatic()
Determines whether this CALL is to a static method.
 o renameDefs(TempMap)
Rename all defined variables in this Quad according to a mapping.
 o renameUses(TempMap)
Rename all used variables in this Quad according to a mapping.
 o toString()
Returns human-readable representation.
 o use()
Returns all the Temps used by this Quad.
 o visit(QuadVisitor)
Accept a visitor.

Variables

 o objectref
 public Temp objectref
The object in which to invoke the method; null for static methods.

 o method
 public HMethod method
The method to invoke.

 o params
 public Temp params[]
Parameters to pass to the method.

 o retval
 public Temp retval
Destination for the method's return value; null for void methods.

 o retex
 public Temp retex
Destination for any exception thrown by the method. Must be non-null.

 o isSpecial
 public boolean isSpecial
Special flag for INVOKESPECIAL (different invoke semantics)

Constructors

 o CALL
 public CALL(HCodeElement source,
             HMethod method,
             Temp objectref,
             Temp params[],
             Temp retval,
             Temp retex,
             boolean isSpecial)
Creates a CALL. params should match exactly the number of parameters in the method descriptor, and retval should be null if the method returns no value. objectref should be null if the method is static. retex will always be a valid Temp. If an exception is thrown by the called method, retex will be assigned a non-null value and retval will be null. If no exception is thrown, retex will be null.

Methods

 o use
 public Temp[] use()
Returns all the Temps used by this Quad.

Returns:
objectref (if objectref!=null) and params.
Overrides:
use in class Quad
 o def
 public Temp[] def()
Returns all the Temps defined by this Quad.

Returns:
{ retval, retex }, if retval!=null; else { retex }
Overrides:
def in class Quad
 o renameUses
 public void renameUses(TempMap tm)
Rename all used variables in this Quad according to a mapping.

Overrides:
renameUses in class Quad
 o renameDefs
 public void renameDefs(TempMap tm)
Rename all defined variables in this Quad according to a mapping.

Overrides:
renameDefs in class Quad
 o clone
 public Object clone()
Properly clone params[] array.

Overrides:
clone in class Quad
 o visit
 public void visit(QuadVisitor v)
Accept a visitor.

Overrides:
visit in class Quad
 o toString
 public String toString()
Returns human-readable representation.

Overrides:
toString in class Quad
 o isInterfaceMethod
 public boolean isInterfaceMethod()
Determines whether this CALL is to an interface method.

 o isStatic
 public boolean isStatic()
Determines whether this CALL is to a static method.

 o isSpecial
 public boolean isSpecial()
Determine whether this CALL uses INVOKESPECIAL semantics.


All Packages  Class Hierarchy  This Package  Previous  Next  Index