TypeInfo
- DESCRIPTION
- A simple type analysis tool for quad-ssi form
- LOCATION / INHERITANCE
- harpoon.Analysis.Quads
- public class
- extends Object
- implements ExactTypeMap
- All implemented interfaces - ExactTypeMap, TypeMap
- NESTED CLASSES
- ExactTypeMap.ExactType
Inherited from class harpoon.Analysis.Maps.ExactTypeMap
- TypeMap.TypeNotKnownException
Inherited from class harpoon.Analysis.Maps.TypeMap
- METHODS
- Constructors
- public TypeInfo(Code hc, UseDefMap usedef)
Creates a TypeInfo analyzer for the specified HCode, which must be in quad-ssi form.
- public TypeInfo(Code hc, UseDefMap usedef, boolean vBehavior)
Creates a TypeInfo analyzer for the specified HCode, which must be in quad-ssi form. If vBehavior is true, the TypeInfo pass's IQ drops to the same level as a typical bytecode verifier; i.e. it gathers no information from instanceof's and such. Because of the IQ drop, the verifier sometimes can't determine that the operand of an AGET is really an array; with vBehavior true the TypeInfo handles this case gracefully, rather than failing an assertion.
- public TypeInfo(Code hc)
Creates a TypeInfo analyzer for the specified HCode, which must be in quad-ssi form.
- typeMap
public HClass typeMap(HCodeElement hce, Temp t) throws TypeMap.TypeNotKnownException
Returns 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.
Throws:
- TypeMap.TypeNotKnownException - if the TypeMap does not have any information about t as defined at hc.
- isExactType
public boolean isExactType(HCodeElement hce, Temp t)
throws TypeMap.TypeNotKnownException
Returns true if temporary t defined at definition point hce contains an object of the type returned by typeMap(hce, t) and not a subtype of that type. Returns false if the object in t can be a subtype of the type returned by typeMap(hce, t). If typeMap() returns a primitive type, then isExactType() should return true.
Specified by: isExactType in interface ExactTypeMap
Parameters:
- hce - The HCodeElement defining t for this request.
- t - The Temp to examine.
Returns:
- true if t's type is exact, false otherwise.
- TypeMap.TypeNotKnownException
Top |
CALL |
CallGraph |
CallGraph |
CFGEdge |
CFGraphable |
Edge |
FakeMetaCallGraph |
GenType |
HClass |
HCode |
HCodeEdge |
HCodeElement |
HMethod |
Map |
MetaAllCallers |
MetaCallGraph |
MetaCallGraphAbstr |
MetaCallGraphImpl |
MetaMethod |
Quad |
ReachingDefs |
ReachingDefsAltImpl |
ReachingDefsImpl |
Relation |
RETURN |
SCComponent |
Set |
SetHClass |
SmartCallGraph |
Temp |
TypeInference |
TypeInfo
Home |
DMP |
Project |
Journal |
Contact
Relevant Java Classes |
Delete Call Site |
Template Call Graph |
Research |
Final Report
FLEX Javadoc Documentation |
Java 2 Platform SE v. 1.4
©2002, Katie Heise