diff options
Diffstat (limited to 'src/wasm2js.h')
-rw-r--r-- | src/wasm2js.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h index 34471e213..faad6c3fa 100644 --- a/src/wasm2js.h +++ b/src/wasm2js.h @@ -290,6 +290,7 @@ private: Ref Wasm2JSBuilder::processWasm(Module* wasm, Name funcName) { PassRunner runner(wasm); runner.add<AutoDrop>(); + runner.add("legalize-js-interface"); // First up remove as many non-JS operations we can, including things like // 64-bit integer multiplication/division, `f32.nearest` instructions, etc. // This may inject intrinsics which use i64 so it needs to be run before the @@ -303,6 +304,7 @@ Ref Wasm2JSBuilder::processWasm(Module* wasm, Name funcName) { runner.add("simplify-locals-notee-nostructure"); runner.add("reorder-locals"); runner.add("vacuum"); + runner.add("remove-unused-module-elements"); runner.setDebug(flags.debug); runner.run(); @@ -311,7 +313,7 @@ Ref Wasm2JSBuilder::processWasm(Module* wasm, Name funcName) { #ifndef NDEBUG if (!WasmValidator().validate(*wasm)) { WasmPrinter::printModule(wasm); - Fatal() << "error in validating input"; + Fatal() << "error in validating wasm2js output"; } #endif |