Skip to content

test: install the global the es6 sweep actually compiles against - #56

Merged
marevol merged 1 commit into
es6/fix-spread-array-copyfrom
es6/fix-compiler-test-global
Aug 28, 2026
Merged

test: install the global the es6 sweep actually compiles against#56
marevol merged 1 commit into
es6/fix-spread-array-copyfrom
es6/fix-compiler-test-global

Conversation

@marevol

@marevol marevol commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Stacked on #55.

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.

Verification

./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

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
marevol force-pushed the es6/fix-compiler-test-global branch from 4732216 to 7d4e4a2 Compare August 28, 2026 05:11
@marevol marevol self-assigned this Aug 28, 2026
@marevol
marevol merged commit 882ad66 into master Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant