Skip to content

Commit c067d51

Browse files
committed
JS: Inline some public predicates in GlobalAccessPaths
1 parent 61e89d4 commit c067d51

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

javascript/ql/src/semmle/javascript/GlobalAccessPaths.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ module AccessPath {
305305
* }
306306
* ```
307307
*/
308+
pragma[inline]
308309
DataFlow::Node getAReferenceTo(Root root, string path) {
309310
path = fromReference(result, root) and
310311
not root.isGlobal()
@@ -327,6 +328,7 @@ module AccessPath {
327328
* })(NS = NS || {});
328329
* ```
329330
*/
331+
pragma[inline]
330332
DataFlow::Node getAReferenceTo(string path) {
331333
path = fromReference(result, DataFlow::globalAccessPathRootPseudoNode())
332334
}
@@ -347,6 +349,7 @@ module AccessPath {
347349
* }
348350
* ```
349351
*/
352+
pragma[inline]
350353
DataFlow::Node getAnAssignmentTo(Root root, string path) {
351354
path = fromRhs(result, root) and
352355
not root.isGlobal()
@@ -367,6 +370,7 @@ module AccessPath {
367370
* })(foo = foo || {});
368371
* ```
369372
*/
373+
pragma[inline]
370374
DataFlow::Node getAnAssignmentTo(string path) {
371375
path = fromRhs(result, DataFlow::globalAccessPathRootPseudoNode())
372376
}
@@ -376,6 +380,7 @@ module AccessPath {
376380
*
377381
* See `getAReferenceTo` and `getAnAssignmentTo` for more details.
378382
*/
383+
pragma[inline]
379384
DataFlow::Node getAReferenceOrAssignmentTo(string path) {
380385
result = getAReferenceTo(path)
381386
or
@@ -387,6 +392,7 @@ module AccessPath {
387392
*
388393
* See `getAReferenceTo` and `getAnAssignmentTo` for more details.
389394
*/
395+
pragma[inline]
390396
DataFlow::Node getAReferenceOrAssignmentTo(Root root, string path) {
391397
result = getAReferenceTo(root, path)
392398
or

0 commit comments

Comments
 (0)