test: install the global the es6 sweep actually compiles against - #56
Merged
Merged
Conversation
compileJSFile takes the global to compile against as a parameter, but two lines still read the field: it decided whether the thread global had to change by comparing against the es5 global, and then installed that same es5 global before compiling against the es6 one. Harmless for the sweep as it stands, since compileScript is given the global explicitly, but it means the es6 pass ran with a thread global belonging to a different Context, and the save/restore around it was guarding the wrong thing. Both now use the parameter. ./gradlew build testOptimistic testPessimistic: suite before after test 665, 0 fail 665, 0 fail testOptimistic 1717, 0 fail 1717, 0 fail testPessimistic 1717, 0 fail 1717, 0 fail
marevol
force-pushed
the
es6/fix-compiler-test-global
branch
from
August 28, 2026 05:11
4732216 to
7d4e4a2
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.
Stacked on #55.
compileJSFiletakes the global to compile against as a parameter, but two lines still read the field: it decided whether the thread global had to change by comparing against the es5 global, and then installed that same es5 global before compiling against the es6 one.Harmless for the sweep as it stands, since
compileScriptis given the global explicitly, but it means the es6 pass ran with a thread global belonging to a differentContext, and the save/restore around it was guarding the wrong thing. Both now use the parameter.Verification
./gradlew build testOptimistic testPessimistic