Class ScopeMappingInstanceKeys
java.lang.Object
com.ibm.wala.cast.ipa.callgraph.ScopeMappingInstanceKeys
- All Implemented Interfaces:
InstanceKeyFactory
- Direct Known Subclasses:
JavaScopeMappingInstanceKeys
,JavaScriptScopeMappingInstanceKeys
An
InstanceKeyFactory
that returns ScopeMappingInstanceKeys.ScopeMappingInstanceKey
s as necessary to
handle interprocedural lexical scoping (specifically, to handle closure creation when a function
escapes its allocating scope)-
Nested Class Summary
Modifier and TypeClassDescriptionclass
AnInstanceKey
carrying information about whichCGNode
s represent lexical parents of the allocatingCGNode
. -
Field Summary
-
Constructor Summary
ConstructorDescriptionScopeMappingInstanceKeys
(PropagationCallGraphBuilder builder, InstanceKeyFactory basic) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Collection
<CGNode> getConstructorCallers
(ScopeMappingInstanceKeys.ScopeMappingInstanceKey smik, Pair<String, String> name) get the CGNodes corresponding to the method that invoked the constructor for smikgetInstanceKeyForAllocation
(CGNode creatorNode, NewSiteReference allocationSite) getInstanceKeyForConstant
(TypeReference type, Object S) getInstanceKeyForMetadataObject
(Object obj, TypeReference objType) getInstanceKeyForMultiNewArray
(CGNode node, NewSiteReference allocation, int dim) getInstanceKeyForPEI
(CGNode node, ProgramCounter instr, TypeReference type) protected abstract boolean
does base require a scope mapping key? Typically, true if base is allocated in a nested lexical scope, to handle the case of base being a function that performs closure accesses
-
Field Details
-
builder
-
-
Constructor Details
-
ScopeMappingInstanceKeys
-
-
Method Details
-
needsScopeMappingKey
does base require a scope mapping key? Typically, true if base is allocated in a nested lexical scope, to handle the case of base being a function that performs closure accesses -
getInstanceKeyForAllocation
- Specified by:
getInstanceKeyForAllocation
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents a particular allocation
-
getConstructorCallers
protected abstract Collection<CGNode> getConstructorCallers(ScopeMappingInstanceKeys.ScopeMappingInstanceKey smik, Pair<String, String> name) get the CGNodes corresponding to the method that invoked the constructor for smik -
getInstanceKeyForMultiNewArray
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim) - Specified by:
getInstanceKeyForMultiNewArray
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents the array allocated as the dim_th dimension at a particular allocation
-
getInstanceKeyForConstant
- Specified by:
getInstanceKeyForConstant
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents a constant with value S, when considered as a particular type
-
getInstanceKeyForPEI
- Specified by:
getInstanceKeyForPEI
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents the exception of type _type_ thrown by a particular PEI.
-
getInstanceKeyForMetadataObject
- Specified by:
getInstanceKeyForMetadataObject
in interfaceInstanceKeyFactory
- Parameters:
objType
- TODO- Returns:
- the instance key that represents the metadata object obj
-