public Context getCalleeTarget( CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] receiver) { if (caller == null) { throw new IllegalArgumentException("null caller"); } return delegate.getCalleeTarget(caller, site, callee, receiver); }
@Override public Context getCalleeTarget( CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] receiver) { Context baseContext = baseSelector.getCalleeTarget(caller, site, callee, receiver); if (baseContext.equals(Everywhere.EVERYWHERE)) { return new CallerSiteContext(caller, site); } else { return new CallerSiteContextPair(caller, site, baseContext); } }
@Override public Context getCalleeTarget( CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] actualParameters) { Context baseContext = base.getCalleeTarget(caller, site, callee, actualParameters); final boolean exceedsRecursionBound = exceedsRecursionBound(baseContext, 0); if (!exceedsRecursionBound) { return baseContext; } else if (callee instanceof JavaScriptConstructor) { // for constructors, we want to keep some basic context sensitivity to // avoid horrible imprecision return new CallStringContext(new CallString(site, caller.getMethod())); } else { // TODO somehow k-limit more smartly? return Everywhere.EVERYWHERE; } }
@Override public Context getCalleeTarget( final CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] receiver) { if (callee instanceof JavaScriptConstructor) { final Context oneLevelCallStringContext = oneLevelCallStrings.getCalleeTarget(caller, site, callee, receiver); if (AstLexicalInformation.hasExposedUses(caller, site)) { // use a caller-site context, to enable lexical scoping lookups (via caller CGNode) return oneLevelCallerSite.getCalleeTarget(caller, site, callee, receiver); } else { // use at least one-level of call-string sensitivity for constructors // always return oneLevelCallStringContext; } } else { return base.getCalleeTarget(caller, site, callee, receiver); } }
@Override public IntSet getRelevantParameters(CGNode caller, CallSiteReference site) { return base.getRelevantParameters(caller, site); }
public IntSet getRelevantParameters(CGNode caller, CallSiteReference site) { return delegate.getRelevantParameters(caller, site); }