-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Add compileForOverlayEval: true #20421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4f55fcb to
33001a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Enables the compileForOverlayEval: true configuration in the JavaScript CodeQL library and optimizes token navigation by introducing a helper predicate to improve join ordering performance.
- Adds
compileForOverlayEval: trueto the qlpack.yml configuration - Introduces
adjacentTokenshelper predicate to optimize join order in token navigation - Refactors
getNextToken()method to use the new helper predicate
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| javascript/ql/lib/qlpack.yml | Enables compileForOverlayEval configuration option |
| javascript/ql/lib/semmle/javascript/Tokens.qll | Adds adjacentTokens helper predicate and refactors getNextToken for better performance |
33001a7 to
f4b798b
Compare
80475a6 to
fdb6dd3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment, otherwise this looks good to me. 👍
|
|
||
| import javascript | ||
|
|
||
| private predicate adjacentTokens(Token token1, Token token2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No pragma[nomagic] on this to prevent future reinlining?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added pragma[nomagic]. The DIL seems to be unchanged so we shouldn't have to rerun the evaluations.
120dcd3 to
c583b48
Compare
Adds
compileForOverlayEval: trueand fixes a bad join order arising when this is enabled.Evaluations: