harpoon.Backend.Generic
Class Frame

java.lang.Object
  extended by harpoon.Backend.Generic.Frame
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DefaultFrame, Frame, Frame, Frame, Frame

public abstract class Frame
extends Object
implements Serializable

A Frame encapsulates the machine-dependent information needed for compilation. Frames are not intended to be entirely machine-specific; all machines with roughly the same datatypes (for example, 32-bit words) and which use the same runtime implementation should be able to share most, if not all, of a Frame implementation.

Version:
$Id: Frame.java,v 1.3 2003/04/19 01:03:44 salcianu Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>, Felix S. Klock II <pnkfelix@mit.edu>, Andrew Berkheimer <andyb@mit.edu>
See Also:
harpoon.IR.Assem, Serialized Form

Constructor Summary
Frame()
           
 
Method Summary
abstract  HCodeFactory getCodeFactory(HCodeFactory hcf)
          Returns a code factory for machine-specific IR.Assems, given a code factory for CanonicalTreeCode.
abstract  CodeGen getCodeGen()
          Returns the Generic.CodeGen for the backend associated with this.
abstract  GCInfo getGCInfo()
          Returns the GCInfo for the backend associated with this.
abstract  InstrBuilder getInstrBuilder()
          Returns the appropriate InstrBuilder for this Frame.
abstract  Linker getLinker()
          The Linker object to use when compiling for this Frame.
abstract  LocationFactory getLocationFactory()
          Returns the appropriate LocationFactory for this Frame.
abstract  RegFileInfo getRegFileInfo()
          Returns the appropriate RegFileInfo for this Frame.
abstract  Runtime getRuntime()
          Returns the appropriate Generic.Runtime for this Frame.
abstract  TempBuilder getTempBuilder()
          Returns the Generic.TempBuilder for the backend associated with this.
abstract  boolean pointersAreLong()
          Returns false if pointers can be represented in 32 bits, or true otherwise.
 void setCallGraph(CallGraph cg)
          Sets the CallGraph to use for this Generic.Frame.
 void setClassHierarchy(ClassHierarchy ch)
          Sets the ClassHierarchy to use for this Generic.Frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Frame

public Frame()
Method Detail

getLinker

public abstract Linker getLinker()
The Linker object to use when compiling for this Frame.


pointersAreLong

public abstract boolean pointersAreLong()
Returns false if pointers can be represented in 32 bits, or true otherwise.


getRuntime

public abstract Runtime getRuntime()
Returns the appropriate Generic.Runtime for this Frame.


getInstrBuilder

public abstract InstrBuilder getInstrBuilder()
Returns the appropriate InstrBuilder for this Frame.


getRegFileInfo

public abstract RegFileInfo getRegFileInfo()
Returns the appropriate RegFileInfo for this Frame.


getLocationFactory

public abstract LocationFactory getLocationFactory()
Returns the appropriate LocationFactory for this Frame.


getCodeGen

public abstract CodeGen getCodeGen()
Returns the Generic.CodeGen for the backend associated with this.


getCodeFactory

public abstract HCodeFactory getCodeFactory(HCodeFactory hcf)
Returns a code factory for machine-specific IR.Assems, given a code factory for CanonicalTreeCode. Uses the code generator defined by this frame. Returns null if this frame does not have a code factory that generates IR.Assem.Instrs.


getTempBuilder

public abstract TempBuilder getTempBuilder()
Returns the Generic.TempBuilder for the backend associated with this.


getGCInfo

public abstract GCInfo getGCInfo()
Returns the GCInfo for the backend associated with this. null may be returned in some cases. i.e. if precise garbage collection is not supported.


setClassHierarchy

public void setClassHierarchy(ClassHierarchy ch)
Sets the ClassHierarchy to use for this Generic.Frame. See Generic.Runtime for more details on when this needs to be called.


setCallGraph

public void setCallGraph(CallGraph cg)
Sets the CallGraph to use for this Generic.Frame. See Generic.Runtime for more details on when/if this needs to be called.