Skip to content

Commit 8060021

Browse files
committed
JS: Disable dynamic reordering for a few predicates
1 parent 979ae67 commit 8060021

6 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎javascript/ql/lib/semmle/javascript/AST.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ class AstNode extends @ast_node, NodeInStmtContainer {
123123
AstNode getParent() { Stages::Ast::ref() and this = result.getAChild() }
124124

125125
/** Gets the first control flow node belonging to this syntactic entity. */
126+
pragma[no_dynamic_join_order]
126127
ControlFlowNode getFirstControlFlowNode() { result = this }
127128

128129
/** Holds if this syntactic entity belongs to an externs file. */

‎javascript/ql/lib/semmle/javascript/RangeAnalysis.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ module RangeAnalysis {
289289
/**
290290
* Holds if the given container has a comment or identifier mentioning `NaN`.
291291
*/
292+
pragma[no_dynamic_join_order]
292293
predicate hasNaNIndicator(StmtContainer container) {
293294
exists(Comment comment |
294295
comment.getText().regexpMatch("(?s).*N[aA]N.*") and

‎javascript/ql/lib/semmle/javascript/Regexp.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ predicate isInterpretedAsRegExp(DataFlow::Node source) {
10921092
* as a part of a regular expression.
10931093
*/
10941094
overlay[global]
1095+
pragma[no_dynamic_join_order]
10951096
private DataFlow::Node regExpSource(DataFlow::Node re, DataFlow::TypeBackTracker t) {
10961097
t.start() and
10971098
re = result and

‎javascript/ql/lib/semmle/javascript/dataflow/DataFlow.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,7 @@ module DataFlow {
18031803
* Holds if there is a step from `pred` to `succ` through a field accessed through `this` in a class.
18041804
*/
18051805
overlay[global]
1806+
pragma[no_dynamic_join_order]
18061807
predicate localFieldStep(DataFlow::Node pred, DataFlow::Node succ) {
18071808
exists(ClassNode cls, string prop |
18081809
pred = AccessPath::getAnAssignmentTo(cls.getADirectSuperClass*().getAReceiverNode(), prop) or

‎javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,6 +1739,7 @@ class RegExpCreationNode extends DataFlow::SourceNode {
17391739

17401740
/** Gets a data flow node referring to this regular expression. */
17411741
overlay[global]
1742+
pragma[no_dynamic_join_order]
17421743
private DataFlow::SourceNode getAReference(DataFlow::TypeTracker t) {
17431744
t.start() and
17441745
result = this

‎javascript/ql/src/Statements/LabelInCase.ql‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import javascript
1515

16+
pragma[no_dynamic_join_order]
1617
from LabeledStmt l, Case c
1718
where
1819
l = c.getAChildStmt+() and

0 commit comments

Comments
 (0)