harpoon.Analysis.Maps
Class TypeMapProxy<HCE extends HCodeElement>

java.lang.Object
  extended by harpoon.Analysis.Maps.TypeMapProxy<HCE>
All Implemented Interfaces:
TypeMap<HCE>
Direct Known Subclasses:
ExactTypeMapProxy

public class TypeMapProxy<HCE extends HCodeElement>
extends Object
implements TypeMap<HCE>

A TypeMapProxy implements a TypeMap for a cloned HCode given the HCodeAndMaps which specifies its relationship to an HCode for which a TypeMap is known.

Version:
$Id: TypeMapProxy.java,v 1.3 2002/09/02 19:23:27 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Nested Class Summary
 
Nested classes/interfaces inherited from interface harpoon.Analysis.Maps.TypeMap
TypeMap.TypeNotKnownException
 
Constructor Summary
TypeMapProxy(HCodeAndMaps<HCE> hcam, TypeMap<HCE> tm)
          Creates a TypeMapProxy.
 
Method Summary
 HClass typeMap(HCE hce, Temp t)
          Return the type of a given temporary t, as defined at the definition point hce.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeMapProxy

public TypeMapProxy(HCodeAndMaps<HCE> hcam,
                    TypeMap<HCE> tm)
Creates a TypeMapProxy.

Method Detail

typeMap

public HClass typeMap(HCE hce,
                      Temp t)
Description copied from interface: TypeMap
Return the type of a given temporary t, as defined at the definition point hce. Iff the type of the temporary is not known, or if hce does not define t, throws TypeNotKnownException. If the temporary represents a derived pointer, null should be returned; in which case the Derivation must return a non-null value. Obviously, TypeMaps for high-level representations without derived pointers should never return null. As a special case, HClass.Void may be returned in low-level IRs to indicate an opaque pointer value which does not correspond to a java object pointer or some derivation thereof --- for example, a pointer into a method dispatch table. The only other time HClass.Void should be returned is for known-null pointer values.

Specified by:
typeMap in interface TypeMap<HCE extends HCodeElement>
Parameters:
hce - The HCodeElement defining t.
t - The temporary to examine.
Returns:
the static type of t.