Conversation
sbc100
force-pushed
the
fix-closure-fs-es6
branch
2 times, most recently
from
September 18, 2026 22:41
a41a5e7 to
5e9bd48
Compare
When `-sEXPORT_ES6` is enabled, Closure Compiler compiles output in ES module mode (`--chunk_output_type ES_MODULES`), which enforces strict arity checks (`JSC_WRONG_ARGUMENT_COUNT`) and object property type checks (`JSC_TYPE_MISMATCH`) that are otherwise silently ignored in traditional global script mode. Give optional parameters default values (`= undefined` or appropriate defaults like `dontFollow = false`), initialize `nameTable: []` instead of `null`, and remove surplus arguments at call sites in `libsyscall.js` and `libnodefs.js`. Fixes: emscripten-core#27747
sbc100
force-pushed
the
fix-closure-fs-es6
branch
from
September 18, 2026 22:47
5e9bd48 to
dddb267
Compare
sbc100
enabled auto-merge (squash)
September 18, 2026 22:47
kripken
reviewed
Sep 18, 2026
| return FS.lookup(parent, name); | ||
| }, | ||
| createNode(parent, name, mode, rdev) { | ||
| createNode(parent, name, mode, rdev = undefined) { |
Member
There was a problem hiding this comment.
This increases code size, doesn't it? Or does it get optimized out somehow?
Collaborator
Author
There was a problem hiding this comment.
I think overall this change is a slight codesize win. I think because closure can eliminate these
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.
When
-sEXPORT_ES6is enabled, Closure Compiler compiles output in ES module mode (--chunk_output_type ES_MODULES), which enforces strict arity checks (JSC_WRONG_ARGUMENT_COUNT) and object property type checks (JSC_TYPE_MISMATCH) that are otherwise silently ignored in traditional global script mode.Give optional parameters default values (
= undefinedor appropriate defaults likedontFollow = false), initializenameTable: []instead ofnull, and remove surplus arguments at call sites inlibsyscall.jsandlibnodefs.js.See google/closure-compiler#4344
Fixes: #27747