Skip to content

Commit

Permalink
Feedback from #21406. NFC (#21415)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed Feb 23, 2024
1 parent f302d4c commit 96124ff
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 18 deletions.
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

0 comments on commit 96124ff

Please sign in to comment.