harpoon.Analysis.Maps
Class TypeMapProxy

java.lang.Object
  |
  +--harpoon.Analysis.Maps.MapProxy
        |
        +--harpoon.Analysis.Maps.TypeMapProxy
All Implemented Interfaces:
TypeMap
Direct Known Subclasses:
ExactTypeMapProxy

public class TypeMapProxy
extends harpoon.Analysis.Maps.MapProxy
implements TypeMap

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.2 2002/02/25 20:58:10 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Nested Class Summary
 
Nested classes inherited from class harpoon.Analysis.Maps.TypeMap
TypeMap.TypeNotKnownException
 
Constructor Summary
TypeMapProxy(HCodeAndMaps hcam, TypeMap tm)
          Creates a TypeMapProxy.
 
Method Summary
 HClass typeMap(HCodeElement 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 hcam,
                    TypeMap tm)
Creates a TypeMapProxy.

Method Detail

typeMap

public HClass typeMap(HCodeElement 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
Parameters:
hce - The HCodeElement defining t.
t - The temporary to examine.
Returns:
the static type of t.