harpoon.IR.Quads
Class HANDLER

java.lang.Object
  extended by harpoon.IR.Quads.Quad
      extended by harpoon.IR.Quads.HANDLER
All Implemented Interfaces:
HCodeElement, CFGraphable<Quad,Edge>, UseDefable, Graph.Node<Quad,Edge>, Serializable, Cloneable, Comparable<Quad>

public class HANDLER
extends Quad

A HANDLER quad marks an entry to an exception handler.

Version:
$Id: HANDLER.java,v 1.8 2004/02/08 01:55:25 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
METHOD, Serialized Form

Nested Class Summary
static interface HANDLER.ProtectedSet
          An interface to specify which Quads a particular HANDLER protects.
 
Field Summary
protected  HClass caughtException
          The exception caught by this HANDLER, or null for any exception.
protected  Temp exceptionTemp
          The Temp holding the caught exception on invocation of this HANDLER.
protected  HANDLER.ProtectedSet protectedSet
          The set of Quads protected by this HANDLER.
 
Fields inherited from class harpoon.IR.Quads.Quad
arrayFactory
 
Constructor Summary
HANDLER(QuadFactory qf, HCodeElement source, Temp exceptionTemp, HClass caughtException, HANDLER.ProtectedSet protectedSet)
          Creates a HANDLER.
 
Method Summary
<T> T
accept(QuadValueVisitor<T> v)
           
 void accept(QuadVisitor v)
          Accept a visitor.
 HClass caughtException()
          Returns the superclass of the exceptions caught by this HANDLER, or null if any exception is caught.
 Temp[] def()
          Return all the Temps defined by this Quad.
 Temp exceptionTemp()
          Returns the Temp which will hold the exception on the invocation of this HANDLER.
 boolean isCaught(HClass hc)
          Returns true if the given exception HClass is caught by this HANDLER.
 boolean isProtected(Quad q)
          Returns true if the given Quad is protected by this HANDLER; false otherwise.
 int kind()
          Return an integer enumeration of the kind of this Quad.
 Enumeration<Quad> protectedQuads()
          Deprecated.  
 Set<Quad> protectedSet()
          Returns an immutable Set of the Quadss protected by this HANDLER.
 Quad rename(QuadFactory qqf, TempMap defMap, TempMap useMap)
          Create a new Quad identical to the receiver, but with all Temps renamed according to a mapping.
 String toString()
          Returns human-readable representation of this Quad.
 
Methods inherited from class harpoon.IR.Quads.Quad
addEdge, addEdges, addHandlers, clone, clone, clone, compareTo, defC, edgeC, edges, getFactory, getID, getLineNumber, getSourceFile, handlers, hashCode, isPred, isSucc, map, map, map, next, next, nextEdge, nextEdge, nextLength, pred, predC, prev, prev, prevEdge, prevEdge, prevLength, remove, removeHandlers, rename, replace, succ, succC, toLongString, transferHandlers, use, useC
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

exceptionTemp

protected Temp exceptionTemp
The Temp holding the caught exception on invocation of this HANDLER.


caughtException

protected HClass caughtException
The exception caught by this HANDLER, or null for any exception.


protectedSet

protected HANDLER.ProtectedSet protectedSet
The set of Quads protected by this HANDLER.

Constructor Detail

HANDLER

public HANDLER(QuadFactory qf,
               HCodeElement source,
               Temp exceptionTemp,
               HClass caughtException,
               HANDLER.ProtectedSet protectedSet)
Creates a HANDLER.

Parameters:
exceptionTemp - the Temp holding the caught exception on invocation of this HANDLER.
caughtException - the exception type caught by this HANDLER, or null for any exception.
protectedSet - the set of Quads protected by this HANDLER.
Method Detail

exceptionTemp

public Temp exceptionTemp()
Returns the Temp which will hold the exception on the invocation of this HANDLER.


caughtException

public HClass caughtException()
Returns the superclass of the exceptions caught by this HANDLER, or null if any exception is caught.


isCaught

public boolean isCaught(HClass hc)
Returns true if the given exception HClass is caught by this HANDLER.


isProtected

public boolean isProtected(Quad q)
Returns true if the given Quad is protected by this HANDLER; false otherwise.


protectedQuads

public Enumeration<Quad> protectedQuads()
Deprecated. 

Returns an Enumeration of the Quads protected by this HANDLER.


protectedSet

public Set<Quad> protectedSet()
Returns an immutable Set of the Quadss protected by this HANDLER.


def

public Temp[] def()
Description copied from class: Quad
Return all the Temps defined by this Quad.

Specified by:
def in interface UseDefable
Overrides:
def in class Quad

kind

public int kind()
Description copied from class: Quad
Return an integer enumeration of the kind of this Quad. The enumerated values are defined in QuadKind.

Specified by:
kind in class Quad

rename

public Quad rename(QuadFactory qqf,
                   TempMap defMap,
                   TempMap useMap)
Description copied from class: Quad
Create a new Quad identical to the receiver, but with all Temps renamed according to a mapping. The new Quad will have no edges.

The new Quad will come from the specified QuadFactory.

Specified by:
rename in class Quad

accept

public void accept(QuadVisitor v)
Description copied from class: Quad
Accept a visitor.

Specified by:
accept in class Quad

accept

public <T> T accept(QuadValueVisitor<T> v)
Specified by:
accept in class Quad

toString

public String toString()
Returns human-readable representation of this Quad.

Specified by:
toString in class Quad