public class ContainerContextSelector extends Object implements ContextSelector
InstanceKey
of the receiver if
ReceiverInstanceContext
, and the type is interesting according to a delegate
ZeroXInstanceKeys
Modifier and Type | Field and Description |
---|---|
static Atom |
arraycopyAtom |
static TypeReference |
JavaUtilHashtable |
static MethodReference |
synthArraycopy |
static TypeReference |
SyntheticSystem |
Constructor and Description |
---|
ContainerContextSelector(IClassHierarchy cha,
ZeroXInstanceKeys delegate) |
Modifier and Type | Method and Description |
---|---|
static CGNode |
findNodeRecursiveMatchingContext(IMethod m,
Context c)
This method walks recursively up the definition of a context C, to see if
the chain of contexts that give rise to C includes the method M.
|
static Context |
findRecursiveMatchingContext(IMethod M,
Context C)
This method walks recursively up the definition of a context C, to see if
the chain of contexts that give rise to C includes the method M.
|
static Context |
findRecursiveMatchingContext(IMethod M,
Context C,
InstanceKey receiver)
This method walks recursively up the definition of a context C, to see if
the chain of contexts that give rise to C a) includes the method M.
|
Context |
getCalleeTarget(CGNode caller,
CallSiteReference site,
IMethod callee,
InstanceKey[] keys)
Given a calling node and a call site, returns the Context in which the callee should be evaluated.
|
protected IClassHierarchy |
getClassHierarchy() |
IntSet |
getRelevantParameters(CGNode caller,
CallSiteReference site)
Given a calling node and a call site, return the set of parameters based
on which this selector may choose to specialize contexts.
|
static boolean |
isArrayCopyingMethod(MethodReference m)
Does m represent a library method that copies arrays?
|
protected boolean |
isContainer(IClass C) |
static boolean |
isWellKnownStaticFactory(MethodReference m)
Does m represent a static factory method we know about from the standard libraries, that we usually wish to model with one
level of call-string context?
|
boolean |
mayUnderstand(CGNode caller,
CallSiteReference site,
IMethod targetMethod,
InstanceKey receiver) |
public static final TypeReference SyntheticSystem
public static final TypeReference JavaUtilHashtable
public static final Atom arraycopyAtom
public static final MethodReference synthArraycopy
public ContainerContextSelector(IClassHierarchy cha, ZeroXInstanceKeys delegate)
cha
- governing class hierarchydelegate
- object which determines which classes are "interesting"public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] keys)
ContextSelector
getCalleeTarget
in interface ContextSelector
caller
- the node containing the call sitesite
- description of the call sitekeys
- the abstract objects (InstanceKeys) of parameters of interest to the selectorpublic static boolean isWellKnownStaticFactory(MethodReference m)
public static boolean isArrayCopyingMethod(MethodReference m)
public static Context findRecursiveMatchingContext(IMethod M, Context C, InstanceKey receiver)
public static CGNode findNodeRecursiveMatchingContext(IMethod m, Context c)
public static Context findRecursiveMatchingContext(IMethod M, Context C)
public boolean mayUnderstand(CGNode caller, CallSiteReference site, IMethod targetMethod, InstanceKey receiver)
protected boolean isContainer(IClass C)
protected IClassHierarchy getClassHierarchy()
public IntSet getRelevantParameters(CGNode caller, CallSiteReference site)
ContextSelector
getRelevantParameters
in interface ContextSelector
caller
- the calling nodesite
- the specific call site