Conversation
a41a5e7 to
5e9bd48
Compare
5e9bd48 to
dddb267
Compare
| return FS.lookup(parent, name); | ||
| }, | ||
| createNode(parent, name, mode, rdev) { | ||
| createNode(parent, name, mode, rdev = undefined) { |
There was a problem hiding this comment.
This increases code size, doesn't it? Or does it get optimized out somehow?
There was a problem hiding this comment.
I think overall this change is a slight codesize win. I think because closure can eliminate these
There was a problem hiding this comment.
I am impressed it can, I guess. Though this does increase non-closure size. I guess we care about that less, but do we measure it at least?
There was a problem hiding this comment.
We currently only record unoptimized code size (O0) and optimized codesize (which includes closure).
I think that this change should is likely very low impact since the FS object is already so big. Anyone who is pulling in the FS object is already pulling in many many KB of JS code code (which is hard to DCE because of the way the FS API is designed).
| return FS.lookup(parent, name); | ||
| }, | ||
| createNode(parent, name, mode, rdev) { | ||
| createNode(parent, name, mode, rdev = undefined) { |
There was a problem hiding this comment.
I am impressed it can, I guess. Though this does increase non-closure size. I guess we care about that less, but do we measure it at least?
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
dddb267 to
5cf867b
Compare
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