harpoon.IR.Quads
Class FOOTER

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

public class FOOTER
extends Quad

FOOTER nodes are used to anchor the bottom end of the quad graph. They do not represent bytecode and are not executable.

RETURN and THROW nodes should have a FOOTER node as their only successor.

Version:
$Id: FOOTER.java,v 1.3 2002/04/11 04:00:34 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
HEADER, RETURN, THROW, Serialized Form

Field Summary
 
Fields inherited from class harpoon.IR.Quads.Quad
arrayFactory
 
Constructor Summary
FOOTER(QuadFactory qf, HCodeElement source, int arity)
          Creates a FOOTER.
 
Method Summary
<T> T
accept(QuadValueVisitor<T> v)
           
 void accept(QuadVisitor v)
          Accept a visitor.
 int arity()
          Returns the number of predecessors of this FOOTER.
 FOOTER attach(Quad q, int which_succ)
          Attach a new Quad to this FOOTER by replacing it.
 int kind()
          Return an integer enumeration of the kind of this Quad.
 FOOTER remove(int which_pred)
          Remove an attachment from this FOOTER by replacing the footer.
 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.
 FOOTER resize(int new_arity)
          Change the arity of this FOOTER by replacing it.
 String toString()
          Returns human-readable representation of this Quad.
 
Methods inherited from class harpoon.IR.Quads.Quad
addEdge, addEdges, addHandlers, clone, clone, clone, compareTo, def, 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
 

Constructor Detail

FOOTER

public FOOTER(QuadFactory qf,
              HCodeElement source,
              int arity)
Creates a FOOTER.

Method Detail

arity

public int arity()
Returns the number of predecessors of this FOOTER.


attach

public FOOTER attach(Quad q,
                     int which_succ)
Attach a new Quad to this FOOTER by replacing it.

Parameters:
q - the new Quad to attach.
which_succ - the edge leaving q to attach to the FOOTER.
Returns:
the new FOOTER.

resize

public FOOTER resize(int new_arity)
Change the arity of this FOOTER by replacing it. The new edges if any are the highest numbered incoming edges and are left null.


remove

public FOOTER remove(int which_pred)
Remove an attachment from this FOOTER by replacing the footer.

Parameters:
which_pred - which incoming edge to remove.
Returns:
the new FOOTER.

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