|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.IR.LowQuad.DerivationMap<HCE>
public class DerivationMap<HCE extends HCodeElement>
DerivationMap is a simple map-based implementation of
common Derivation functionality.
DerivationGenerator| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface harpoon.Analysis.Maps.Derivation |
|---|
Derivation.DList |
| Nested classes/interfaces inherited from interface harpoon.Analysis.Maps.TypeMap |
|---|
TypeMap.TypeNotKnownException |
| Constructor Summary | |
|---|---|
DerivationMap()
Creates a DerivationMap. |
|
| Method Summary | ||
|---|---|---|
Derivation.DList |
derivation(HCE hce,
Temp t)
Map compiler temporaries to their derivations. |
|
void |
putDerivation(HCE hce,
Temp t,
Derivation.DList derivation)
Add a mapping from the given Temp t
defined at the given HCodeElement hce
to the given Derivation.DList derivation
to this DerivationMap. |
|
void |
putType(HCE hce,
Temp t,
HClass type)
Add a mapping from the given Temp t
defined at the given HCodeElement hce
to the given HClass type to this
DerivationMap. |
|
void |
remove(HCE hce,
Temp t)
Remove all type and derivation mappings for the given Temp defined at the given HCodeElement. |
|
|
transfer(HCE new_hce,
HCE2 old_hce,
Temp[] old_defs,
TempMap old2new,
Derivation<HCE2> old_deriv)
Transfer typings from one Derivation to another, using
an appropriate TempMap. |
|
HClass |
typeMap(HCE hce,
Temp t)
Return the type of a given temporary t, as defined
at the definition point hce. |
|
void |
update(HCE old_hce,
Temp old_t,
HCE new_hce,
Temp new_t)
Transfer typing from one place to another. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DerivationMap()
DerivationMap.
| Method Detail |
|---|
public HClass typeMap(HCE hce,
Temp t)
throws TypeMap.TypeNotKnownException
TypeMapt, 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.
typeMap in interface TypeMap<HCE extends HCodeElement>hce - The HCodeElement defining t.t - The temporary to examine.
t.
TypeMap.TypeNotKnownException - if the TypeMap does
not have any information about t as defined
at hc.
public Derivation.DList derivation(HCE hce,
Temp t)
throws TypeMap.TypeNotKnownException
Derivation
derivation in interface Derivation<HCE extends HCodeElement>hce - A definition point for t.t - The temporary to query.
null if the temporary has no derivation (is
a base pointer, for example), or the derivation otherwise.
TypeMap.TypeNotKnownException
public void putType(HCE hce,
Temp t,
HClass type)
Temp t
defined at the given HCodeElement hce
to the given HClass type to this
DerivationMap.
public void putDerivation(HCE hce,
Temp t,
Derivation.DList derivation)
Temp t
defined at the given HCodeElement hce
to the given Derivation.DList derivation
to this DerivationMap.
public void update(HCE old_hce,
Temp old_t,
HCE new_hce,
Temp new_t)
public <HCE2 extends HCodeElement> void transfer(HCE new_hce,
HCE2 old_hce,
Temp[] old_defs,
TempMap old2new,
Derivation<HCE2> old_deriv)
Derivation to another, using
an appropriate TempMap.
public void remove(HCE hce,
Temp t)
Temp defined at the given HCodeElement.
Used for memory management purposes.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||