Skip to content

Commit 0936cda

Browse files
committed
JS: avoid expensive join_rhs in callInputStep
1 parent 52c913b commit 0936cda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

javascript/ql/src/semmle/javascript/dataflow/Configuration.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,16 +438,18 @@ private predicate isRelevant(DataFlow::Node nd, DataFlow::Configuration cfg) {
438438
* either `pred` is an argument of `f` and `succ` the corresponding parameter, or
439439
* `pred` is a variable definition whose value is captured by `f` at `succ`.
440440
*/
441+
pragma[noopt]
441442
private predicate callInputStep(Function f, DataFlow::Node invk,
442443
DataFlow::Node pred, DataFlow::Node succ,
443444
DataFlow::Configuration cfg) {
444-
isRelevant(pred, cfg) and
445445
(
446+
isRelevant(pred, cfg) and
446447
exists (Parameter parm |
447448
argumentPassing(invk, pred, f, parm) and
448449
succ = DataFlow::parameterNode(parm)
449450
)
450451
or
452+
isRelevant(pred, cfg) and
451453
exists (SsaDefinition prevDef, SsaDefinition def |
452454
pred = DataFlow::ssaDefinitionNode(prevDef) and
453455
calls(invk, f) and captures(f, prevDef, def) and

0 commit comments

Comments
 (0)