added a recursion check

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4490 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
msridhar1 2012-02-17 20:20:36 +00:00
parent edd300cf00
commit 59d602e9b7
1 changed files with 4 additions and 1 deletions

View File

@ -339,7 +339,10 @@ public class ForInContextSelector implements ContextSelector {
return new SelectiveCPAContext(receiver);
} else if (USE_1LEVEL_IN_BODIES && FORIN_MARKER.equals(caller.getContext().get(FORIN_KEY))) {
if (! identifyDependentParameters(caller, site).isEmpty()) {
return oneLevel.getCalleeTarget(caller, site, callee, receiver);
// RECURSION CHECK: only add one level of caller-site contexts if the caller and callee methods are distinct
if (!caller.getMethod().equals(callee)) {
return oneLevel.getCalleeTarget(caller, site, callee, receiver);
}
} else {
return null;
}