1
1
private import javascript
2
-
3
2
private import FlowSteps as FlowSteps
4
3
private import semmle.javascript.internal.CachedStages
5
4
@@ -21,9 +20,7 @@ private module Cached {
21
20
private module Stage {
22
21
// Forces the module to be computed as part of the type-tracking stage.
23
22
cached
24
- predicate forceStage ( ) {
25
- Stages:: TypeTracking:: ref ( )
26
- }
23
+ predicate forceStage ( ) { Stages:: TypeTracking:: ref ( ) }
27
24
}
28
25
29
26
/**
@@ -75,7 +72,9 @@ private module Cached {
75
72
// function wrap(f) { return (x, y) => f(x, y) };
76
73
//
77
74
// add steps through calls to that function: `g -> wrap(g)`
78
- exists ( DataFlow:: FunctionNode wrapperFunction , DataFlow:: SourceNode param , DataFlow:: Node paramUse |
75
+ exists (
76
+ DataFlow:: FunctionNode wrapperFunction , DataFlow:: SourceNode param , DataFlow:: Node paramUse
77
+ |
79
78
FlowSteps:: argumentPassing ( succ , pred , wrapperFunction .getFunction ( ) , param ) and
80
79
param .flowsTo ( paramUse ) and
81
80
functionForwardingStep ( paramUse , wrapperFunction .getReturnNode ( ) .getALocalSource ( ) )
@@ -133,7 +132,9 @@ private module Cached {
133
132
// function wrap(f) { return (x, y) => f(x, y) };
134
133
//
135
134
// add steps through calls to that function: `g -> wrap(g)`
136
- exists ( DataFlow:: FunctionNode wrapperFunction , DataFlow:: SourceNode param , DataFlow:: Node paramUse |
135
+ exists (
136
+ DataFlow:: FunctionNode wrapperFunction , DataFlow:: SourceNode param , DataFlow:: Node paramUse
137
+ |
137
138
FlowSteps:: argumentPassing ( succ , pred , wrapperFunction .getFunction ( ) , param ) and
138
139
param .flowsTo ( paramUse ) and
139
140
functionOneWayForwardingStep ( paramUse , wrapperFunction .getReturnNode ( ) .getALocalSource ( ) )
0 commit comments