Skip to content

Commit 312cd77

Browse files
committed
Avoid wasm-instantiate run dependency when not using WASM_ASYNC_COMPILATION. NFC
1 parent c7c84b4 commit 312cd77

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
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": 54086,
3-
"hello_world.js.gz": 17172,
2+
"hello_world.js": 54043,
3+
"hello_world.js.gz": 17154,
44
"hello_world.wasm": 15143,
55
"hello_world.wasm.gz": 7452,
6-
"no_asserts.js": 26819,
7-
"no_asserts.js.gz": 8991,
6+
"no_asserts.js": 26776,
7+
"no_asserts.js.gz": 8968,
88
"no_asserts.wasm": 12227,
99
"no_asserts.wasm.gz": 6008,
10-
"strict.js": 52136,
11-
"strict.js.gz": 16504,
10+
"strict.js": 52093,
11+
"strict.js.gz": 16485,
1212
"strict.wasm": 15143,
1313
"strict.wasm.gz": 7438,
14-
"total": 175554,
15-
"total_gz": 63565
14+
"total": 175425,
15+
"total_gz": 63505
1616
}

test/other/codesize/test_codesize_minimal_O0.expected.js

Lines changed: 2 additions & 3 deletions
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.
@@ -1311,8 +1310,8 @@ var _global_val = Module['_global_val'] = 65536;var wasmImports = {
13111310

13121311
var wasmExports;
13131312

1314-
// With async instantation wasmExports is assigned asyncronously when the
1315-
// the instance is received.
1313+
// With async instantation wasmExports is assigned asynchronously when the
1314+
// instance is received.
13161315
createWasm();
13171316

13181317
var calledRun;

0 commit comments

Comments
 (0)