Skip to content

Commit 79da097

Browse files
committed
various join order fixes
1 parent 3e9ee88 commit 79da097

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

python/ql/lib/semmle/python/AstExtended.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ abstract class AstNode extends AstNode_ {
5454
}
5555

5656
/** Whether this contains `inner` syntactically */
57-
pragma[nomagic]
5857
predicate contains(AstNode inner) { this.getAChildNode+() = inner }
5958

6059
pragma[noinline]

python/ql/lib/semmle/python/pointsto/MRO.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,15 @@ class ClassList extends TClassList {
163163
int firstIndex(ClassObjectInternal cls) { result = this.firstIndex(cls, 0) }
164164

165165
/* Helper for firstIndex(cls), getting the first index of `cls` where result >= n */
166+
pragma[noopt]
166167
private int firstIndex(ClassObjectInternal cls, int n) {
167168
this.getItem(n) = cls and result = n
168169
or
169-
this.getItem(n) != cls and result = this.firstIndex(cls, n + 1)
170+
exists(int next |
171+
result = this.firstIndex(cls, next) and
172+
next = n + 1
173+
) and
174+
exists(ClassObjectInternal item | item = this.getItem(n) | item != cls)
170175
}
171176

172177
/** Holds if the class at `n` is a duplicate of an earlier position. */

python/ql/lib/semmle/python/pointsto/PointsTo.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ module InterProceduralPointsTo {
13121312
* `var = ...; foo(); use(var)`
13131313
* Where var may be redefined in call to `foo` if `var` escapes (is global or non-local).
13141314
*/
1315-
pragma[noinline]
1315+
pragma[inline]
13161316
predicate callsite_points_to(
13171317
CallsiteRefinement def, PointsToContext context, ObjectInternal value, CfgOrigin origin
13181318
) {

0 commit comments

Comments
 (0)