harpoon.IR.Assem
Class InstrFactory

java.lang.Object
  |
  +--harpoon.IR.Assem.InstrFactory

public abstract class InstrFactory
extends Object

A InstrFactory is responsible for generating generic Assem.Instrs used in code generation.

Version:
$Id: InstrFactory.java,v 1.2 2002/02/25 21:04:11 cananian Exp $
Author:
Andrew Berkheimer <andyb@mit.edu>
, Felix S. Klock II <pnkfelix@mit.edu>

Constructor Summary
InstrFactory()
           
 
Method Summary
 void addGroup(InstrGroup group)
          Adds information from group to the InstrGroup.Type -> CFGrapher mapping for this.
abstract  Frame getFrame()
          Returns the Frame which is associated with all of the Instrs generated by this factory.
 CFGrapher getGrapherFor(InstrGroup.Type t)
          Returns a CFGrapher that treats InstrGroups of Type t as single atomic elements.
 HMethod getMethod()
          Returns the HMethod which corresponds to Instrs generated by this factory.
abstract  HCode getParent()
          Returns the HCode to which all Instrs generated by this factory belong.
 Instr getTail()
           
abstract  int getUniqueID()
          Returns a unique ID number for each new Instr generated by this factory.
 UseDefer getUseDeferFor(InstrGroup.Type t)
          Returns a UseDefer that treats InstrGroups of Type t as single atomic elements.
 int hashCode()
           
abstract  TempFactory tempFactory()
          Returns the TempFactory to use for creating Temps which are used as arguments to Instrs generated by this factory.
 String toString()
          Returns a human-readable representation for this InstrFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstrFactory

public InstrFactory()
Method Detail

getTail

public Instr getTail()

tempFactory

public abstract TempFactory tempFactory()
Returns the TempFactory to use for creating Temps which are used as arguments to Instrs generated by this factory.


getParent

public abstract HCode getParent()
Returns the HCode to which all Instrs generated by this factory belong.


getFrame

public abstract Frame getFrame()
Returns the Frame which is associated with all of the Instrs generated by this factory.


getMethod

public HMethod getMethod()
Returns the HMethod which corresponds to Instrs generated by this factory.
effects: Returns the HMethod associated with this, or null if no such HMethod exists.


getUniqueID

public abstract int getUniqueID()
Returns a unique ID number for each new Instr generated by this factory.


toString

public String toString()
Returns a human-readable representation for this InstrFactory.

Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

addGroup

public void addGroup(InstrGroup group)
Adds information from group to the InstrGroup.Type -> CFGrapher mapping for this.
requires: group has had its entry and exit fields assigned.


getGrapherFor

public CFGrapher getGrapherFor(InstrGroup.Type t)
Returns a CFGrapher that treats InstrGroups of Type t as single atomic elements.


getUseDeferFor

public UseDefer getUseDeferFor(InstrGroup.Type t)
Returns a UseDefer that treats InstrGroups of Type t as single atomic elements.