various join order fixes

This commit is contained in:
Erik Krogh Kristensen
2021-12-10 00:39:08 +01:00
parent 3e9ee887d4
commit 79da0970cc
3 changed files with 7 additions and 3 deletions

View File

@@ -54,7 +54,6 @@ abstract class AstNode extends AstNode_ {
}
/** Whether this contains `inner` syntactically */
pragma[nomagic]
predicate contains(AstNode inner) { this.getAChildNode+() = inner }
pragma[noinline]

View File

@@ -163,10 +163,15 @@ class ClassList extends TClassList {
int firstIndex(ClassObjectInternal cls) { result = this.firstIndex(cls, 0) }
/* Helper for firstIndex(cls), getting the first index of `cls` where result >= n */
pragma[noopt]
private int firstIndex(ClassObjectInternal cls, int n) {
this.getItem(n) = cls and result = n
or
this.getItem(n) != cls and result = this.firstIndex(cls, n + 1)
exists(int next |
result = this.firstIndex(cls, next) and
next = n + 1
) and
exists(ClassObjectInternal item | item = this.getItem(n) | item != cls)
}
/** Holds if the class at `n` is a duplicate of an earlier position. */

View File

@@ -1312,7 +1312,7 @@ module InterProceduralPointsTo {
* `var = ...; foo(); use(var)`
* Where var may be redefined in call to `foo` if `var` escapes (is global or non-local).
*/
pragma[noinline]
pragma[inline]
predicate callsite_points_to(
CallsiteRefinement def, PointsToContext context, ObjectInternal value, CfgOrigin origin
) {