public class OneLevelForLexicalAccessFunctions extends Object implements ContextSelector
ArgumentInstanceContext
on the function argument
for functions that perform lexical accesses (i.e., those functions
represented by a ScopeMappingInstanceKeys.ScopeMappingInstanceKey
). In essence, this
guarantees that when a function is cloned according to some
ContextSelector
, its nested functions that may do lexical accesses if
its variables have corresponding clones.Constructor and Description |
---|
OneLevelForLexicalAccessFunctions(ContextSelector baseSelector) |
Modifier and Type | Method and Description |
---|---|
Context |
getCalleeTarget(CGNode caller,
CallSiteReference site,
IMethod callee,
InstanceKey[] receiver)
Given a calling node and a call site, returns the Context in which the callee should be evaluated.
|
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.
|
public OneLevelForLexicalAccessFunctions(ContextSelector baseSelector)
public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] receiver)
ContextSelector
getCalleeTarget
in interface ContextSelector
caller
- the node containing the call sitesite
- description of the call sitereceiver
- the abstract objects (InstanceKeys) of parameters of interest to the selectorpublic IntSet getRelevantParameters(CGNode caller, CallSiteReference site)
ContextSelector
getRelevantParameters
in interface ContextSelector
caller
- the calling nodesite
- the specific call site