harpoon.Backend.Generic
Class GCInfo

java.lang.Object
  extended by harpoon.Backend.Generic.GCInfo
Direct Known Subclasses:
BasicGCInfo

public abstract class GCInfo
extends Object

A GCInfo object collects data needed for garbage collection and makes necessary annotations to the instruction stream.

Version:
$Id: GCInfo.java,v 1.5 2004/02/08 03:20:50 cananian Exp $
Author:
Karen K. Zee <kkz@alum.mit.edu>

Nested Class Summary
static class GCInfo.DLoc
          Derivation information stored as CommonLocs.
static class GCInfo.GCPoint
          A GCPoint contains information about all the live objects that the garbage collector needs to add to the root set at a particular GC point.
static class GCInfo.WrappedMachineRegLoc
          WrappedMachineRegLoc is a wrapper object for MachineRegLocs that implement special equals and hashCode methods.
static class GCInfo.WrappedStackOffsetLoc
          WrappedStackOffsetLoc is a wrapper object for StackOffsetLocs that implement special equals and hashCode methods.
 
Constructor Summary
GCInfo()
           
 
Method Summary
abstract  RegAlloc.IntermediateCodeFactory codeFactory(RegAlloc.IntermediateCodeFactory parentFactory, Frame frame)
          Creates an IntermediateCodeFactory that prepares the code for garbage collection.
abstract  List gcPoints(HMethod hm)
          Returns an ordered List of the GCPoints in a given HMethod.
abstract  List getOrderedMethods(HClass hc)
          Returns a List of HMethods with the following properties: - The declaring class of the HMethod is HClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GCInfo

public GCInfo()
Method Detail

codeFactory

public abstract RegAlloc.IntermediateCodeFactory codeFactory(RegAlloc.IntermediateCodeFactory parentFactory,
                                                             Frame frame)
Creates an IntermediateCodeFactory that prepares the code for garbage collection.
requires: The parentFactory must produce code in Instr form.
effects: Returns an IntermediateCodeFactory that modifies the code as needed for a particular garbage collection scheme and stores the necessary garbage collection data in the GCInfo object.


gcPoints

public abstract List gcPoints(HMethod hm)
Returns an ordered List of the GCPoints in a given HMethod. Returns null if the HMethod has not been evaluated for garbage collection purposes. Returns an empty List if the HMethod has been evaluated and has been found to not contain any GC points.


getOrderedMethods

public abstract List getOrderedMethods(HClass hc)
Returns a List of HMethods with the following properties: - The declaring class of the HMethod is HClass. - The convert method of the IntermediateCodeFactory has been invoked on all the HMethods in the List. The IntermediateCodeFactory referred to here is the one returned by the codeFactory method of this. Returns null if the given HClass does not declare any methods on which convert has been invoked. - The HMethods are ordered according to the order in which the convert method was invoked.