JS: Add compileForOverlayEval: true#20421
Merged
asgerf merged 5 commits intogithub:mainfrom Oct 31, 2025
Merged
Conversation
4f55fcb to
33001a7
Compare
Contributor
There was a problem hiding this comment.
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 |
Napalys
previously approved these changes
Sep 15, 2025
33001a7 to
f4b798b
Compare
80475a6 to
fdb6dd3
Compare
tausbn
previously approved these changes
Oct 30, 2025
Contributor
tausbn
left a comment
There was a problem hiding this comment.
One minor comment, otherwise this looks good to me. 👍
|
|
||
| import javascript | ||
|
|
||
| private predicate adjacentTokens(Token token1, Token token2) { |
Contributor
There was a problem hiding this comment.
No pragma[nomagic] on this to prevent future reinlining?
Contributor
Author
There was a problem hiding this comment.
Added pragma[nomagic]. The DIL seems to be unchanged so we shouldn't have to rerun the evaluations.
tausbn
approved these changes
Oct 30, 2025
120dcd3 to
c583b48
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
compileForOverlayEval: trueand fixes a bad join order arising when this is enabled.Evaluations: