Skip to content

Commit 9aaa6ff

Browse files
committed
Avoid wasm-instantiate run dependency when not using WASM_ASYNC_COMPILATION. NFC
1 parent 59c47d2 commit 9aaa6ff

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

src/preamble.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,11 +895,14 @@ function getWasmImports() {
895895
#if DECLARE_ASM_MODULE_EXPORTS
896896
assignWasmExports(wasmExports);
897897
#endif
898+
#if WASM_ASYNC_COMPILATION
898899
removeRunDependency('wasm-instantiate');
900+
#endif
899901
return wasmExports;
900902
}
901-
// wait for the pthread pool (if any)
903+
#if WASM_ASYNC_COMPILATION
902904
addRunDependency('wasm-instantiate');
905+
#endif
903906

904907
#if LOAD_SOURCE_MAP
905908
{{{ runIfMainThread("addRunDependency('source-map');") }}}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"hello_world.js": 53981,
3-
"hello_world.js.gz": 17132,
2+
"hello_world.js": 53941,
3+
"hello_world.js.gz": 17115,
44
"hello_world.wasm": 15143,
55
"hello_world.wasm.gz": 7452,
6-
"no_asserts.js": 26714,
7-
"no_asserts.js.gz": 8952,
6+
"no_asserts.js": 26674,
7+
"no_asserts.js.gz": 8931,
88
"no_asserts.wasm": 12227,
99
"no_asserts.wasm.gz": 6008,
10-
"strict.js": 52031,
11-
"strict.js.gz": 16465,
10+
"strict.js": 51991,
11+
"strict.js.gz": 16448,
1212
"strict.wasm": 15143,
1313
"strict.wasm.gz": 7438,
14-
"total": 175239,
15-
"total_gz": 63447
14+
"total": 175119,
15+
"total_gz": 63392
1616
}

test/other/codesize/test_codesize_minimal_O0.expected.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,6 @@ async function createWasm() {
719719
removeRunDependency('wasm-instantiate');
720720
return wasmExports;
721721
}
722-
// wait for the pthread pool (if any)
723722
addRunDependency('wasm-instantiate');
724723

725724
// Prefer streaming instantiation if available.

0 commit comments

Comments
 (0)