Skip to content

Commit 87cc339

Browse files
committed
Revert "JS: Add global post-update steps"
This reverts commit 3bb5e9d.
1 parent 7cf88ef commit 87cc339

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

javascript/ql/lib/semmle/javascript/dataflow/internal/DataFlowPrivate.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,6 @@ private predicate valuePreservingStep(Node node1, Node node2) {
671671
or
672672
FlowSteps::globalFlowStep(node1, node2)
673673
or
674-
FlowSteps::globalPostUpdateStep(node1, node2)
675-
or
676674
node2 = FlowSteps::getThrowTarget(node1)
677675
or
678676
FlowSummaryImpl::Private::Steps::summaryLocalStep(node1.(FlowSummaryNode).getSummaryNode(),

javascript/ql/lib/semmle/javascript/dataflow/internal/FlowSteps.qll

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -383,14 +383,6 @@ private module CachedSteps {
383383
result = DataFlow::valueNode(gv.getAnAccess())
384384
}
385385

386-
/**
387-
* Gets a post-update of `gv` in `f`.
388-
*/
389-
pragma[noinline]
390-
private DataFlow::ExprPostUpdateNode getAPostUpdateIn(GlobalVariable gv, File f) {
391-
result.getPreUpdateNode() = getAUseIn(gv, f)
392-
}
393-
394386
/**
395387
* Holds if there is a flow step from `pred` to `succ` through a global
396388
* variable. Both `pred` and `succ` must be in the same file.
@@ -403,20 +395,6 @@ private module CachedSteps {
403395
)
404396
}
405397

406-
/**
407-
* Holds if `pred` is a post-update node for a use of a global variable, and `succ`
408-
* is a use of the global variable in the same file.
409-
*/
410-
cached
411-
predicate globalPostUpdateStep(DataFlow::Node pred, DataFlow::Node succ) {
412-
exists(GlobalVariable gv, File f |
413-
pred = getAPostUpdateIn(gv, f) and
414-
succ = getAUseIn(gv, f) and
415-
// Remove some unnecessary steps
416-
not succ = any(DataFlow::PropWrite write).getBase()
417-
)
418-
}
419-
420398
/**
421399
* Holds if there is a write to property `prop` of global variable `gv`
422400
* in file `f`, where the right-hand side of the write is `rhs`.
@@ -460,7 +438,6 @@ private module CachedSteps {
460438
predicate basicStoreStep(DataFlow::Node pred, DataFlow::Node succ, string prop) {
461439
succ.(DataFlow::SourceNode).hasPropertyWrite(prop, pred)
462440
or
463-
// Note that this case is handled by globalPostUpdateStep in dataflow2
464441
exists(GlobalVariable gv, File f |
465442
globalPropertyWrite(gv, f, prop, pred) and
466443
globalPropertyRead(gv, f, prop, succ)

0 commit comments

Comments
 (0)