Skip to content

Commit 6a37e4b

Browse files
committed
JS: Cache clobberedProp
1 parent 5213c51 commit 6a37e4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascript/ql/src/semmle/javascript/dataflow/internal/VariableTypeInference.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,21 +421,21 @@ private AnalyzedVarDef defIn(GlobalVariable gv, TopLevel tl) {
421421
* Holds if there is a write to a property with the same name as `gv` on an object
422422
* for which the analysis is incomplete due to the given `reason`.
423423
*/
424-
pragma[noinline]
424+
cached
425425
private predicate clobberedProp(GlobalVariable gv, DataFlow::Incompleteness reason) {
426426
exists(AnalyzedNode base |
427427
potentialPropWriteOfGlobal(base, gv) and
428428
indefiniteObjectValue(base.getALocalValue(), reason)
429429
)
430430
}
431431

432-
pragma[noinline]
432+
pragma[nomagic]
433433
private predicate indefiniteObjectValue(AbstractValue val, DataFlow::Incompleteness reason) {
434434
val.isIndefinite(reason) and
435435
val.getType() = TTObject()
436436
}
437437

438-
pragma[noinline]
438+
pragma[nomagic]
439439
private predicate potentialPropWriteOfGlobal(AnalyzedNode base, GlobalVariable gv) {
440440
exists(DataFlow::PropWrite pwn |
441441
pwn.getPropertyName() = gv.getName() and

0 commit comments

Comments
 (0)