Skip to content

Commit 9f001f8

Browse files
committed
JS:More 'noopt' preparations
1 parent 7db4c42 commit 9f001f8

1 file changed

Lines changed: 13 additions & 21 deletions

File tree

javascript/ql/lib/semmle/javascript/ApiGraphs.qll

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,45 +1295,37 @@ module API {
12951295
boundArgs = 0 and
12961296
prop = ""
12971297
or
1298-
exists(
1299-
RawSourceNode prev, boolean prevPromisified, int prevBoundArgs, string prevProp,
1300-
DataFlow::TypeTracker prevT
1301-
|
1302-
prev = trackUseNode(nd, prevPromisified, prevBoundArgs, prevProp, prevT)
1298+
exists(RawSourceNode prev, boolean prevPromisified, int prevBoundArgs, string prevProp |
1299+
prev = trackUseNode(nd, prevPromisified, prevBoundArgs, prevProp, t)
13031300
|
13041301
promisificationBigStep(prev, result) and
13051302
prevPromisified = false and
13061303
prevProp = "" and
13071304
promisified = prevPromisified and
13081305
boundArgs = prevBoundArgs and
1309-
prop = prevProp and
1310-
t = prevT.continue()
1306+
prop = prevProp
13111307
or
13121308
exists(int b |
13131309
partialInvocationBigStep(prev, result, b) and
13141310
boundArgs = prevBoundArgs + b and
13151311
promisified = prevPromisified and
1316-
prop = prevProp and
1317-
t = prevT.continue()
1312+
prop = prevProp
13181313
)
1319-
)
1314+
or
1315+
loadStoreBigStep(prev, result, prop) and
1316+
prevPromisified = false and
1317+
prevBoundArgs = 0 and
1318+
promisified = prevPromisified and
1319+
boundArgs = prevBoundArgs and
1320+
prevProp = [prop, ""]
1321+
) and
1322+
t.end() // 't' must be a valid ending point for the above cases (i.e. not inside a content)
13201323
or
13211324
exists(DataFlow::SourceNode mid |
13221325
mid = trackUseNode(nd, promisified, boundArgs, prop, t) and
13231326
AdditionalUseStep::step(pragma[only_bind_out](mid), result)
13241327
)
13251328
or
1326-
exists(DataFlow::SourceNode pred, string preprop |
1327-
pred = trackUseNode(nd, promisified, boundArgs, preprop, t.continue()) and
1328-
loadStoreBigStep(pred, result, prop) and
1329-
promisified = false and
1330-
boundArgs = 0
1331-
|
1332-
prop = preprop
1333-
or
1334-
preprop = ""
1335-
)
1336-
or
13371329
t = useStep(nd, promisified, boundArgs, prop, result)
13381330
}
13391331

0 commit comments

Comments
 (0)