Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback from #21406. NFC #21415

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -3555,9 +3555,8 @@ addToLibrary({

$HandleAllocator: class {
constructor() {
// TODO(sbc): Use class fields once we allow/enable es2022 in
// JavaScript input to acorn and closure.
// Reserve slot 0 so that 0 is always an invalid handle
// TODO(https://github.com/emscripten-core/emscripten/issues/21414):
// Use inline field declarations.
this.allocated = [undefined];
this.freelist = [];
}
Expand Down
7 changes: 6 additions & 1 deletion src/library_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ FS.staticInit();` +

FSStream: class {
constructor() {
// TODO(https://github.com/emscripten-core/emscripten/issues/21414):
// Use inline field declarations.
this.shared = {};
#if USE_CLOSURE_COMPILER
// Closure compiler requires us to declare all properties in the
// constructor.
this.node = null;
this.flags = 0;
#endif
}
get object() {
Expand Down Expand Up @@ -1652,6 +1655,8 @@ FS.staticInit();` +
this.lengthKnown = false;
this.chunks = []; // Loaded chunks. Index is the chunk number
#if USE_CLOSURE_COMPILER
// Closure compiler requires us to declare all properties in the
// constructor.
this.getter = undefined;
this._length = 0;
this._chunkSize = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_ctors1.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9887
9883
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_ctors1.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24323
24310
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_ctors2.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9870
9866
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_ctors2.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24291
24278
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_except.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10971
10968
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_except.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
28195
28182
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_except_wasm.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9854
9850
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_except_wasm.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24217
24204
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_mangle.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10982
10979
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_mangle.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
28196
28183
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_noexcept.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9887
9883
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_noexcept.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24323
24310
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_files_js_fs.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7843
7840
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_files_js_fs.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19352
19339
Loading