diff options
author | Sam Clegg <sbc@chromium.org> | 2022-10-05 15:18:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 15:18:22 -0700 |
commit | c43721a1ae80539aea5ea9d8d295b7e377aa03f5 (patch) | |
tree | 4a796dd8baa33f6edd44b16addb967483f6b1479 /test/wasm2js/sign_ext.2asm.js.opt | |
parent | 9b5ba422bf670754a5ac4fb39b0199ac8e1edb84 (diff) | |
download | binaryen-c43721a1ae80539aea5ea9d8d295b7e377aa03f5.tar.gz binaryen-c43721a1ae80539aea5ea9d8d295b7e377aa03f5.tar.bz2 binaryen-c43721a1ae80539aea5ea9d8d295b7e377aa03f5.zip |
wasm2js: Support for flexible module import naming (#5114)
The previous code was making emscripten-specific assumptions about
imports basically all coming from the `env` module.
I can't find a way to make this backwards compatible so may do a
combined roll with the emscripten-side change:
https://github.com/emscripten-core/emscripten/pull/17806
Diffstat (limited to 'test/wasm2js/sign_ext.2asm.js.opt')
-rw-r--r-- | test/wasm2js/sign_ext.2asm.js.opt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/wasm2js/sign_ext.2asm.js.opt b/test/wasm2js/sign_ext.2asm.js.opt index 1ba32e2dd..64f9f0744 100644 --- a/test/wasm2js/sign_ext.2asm.js.opt +++ b/test/wasm2js/sign_ext.2asm.js.opt @@ -1,7 +1,6 @@ -import { setTempRet0 } from 'env'; +import * as env from 'env'; -function asmFunc(importObject) { - var env = importObject.env || importObject; +function asmFunc(imports) { var Math_imul = Math.imul; var Math_fround = Math.fround; var Math_abs = Math.abs; @@ -14,6 +13,7 @@ function asmFunc(importObject) { var Math_sqrt = Math.sqrt; var nan = NaN; var infinity = Infinity; + var env = imports.env; var setTempRet0 = env.setTempRet0; var i64toi32_i32$HIGH_BITS = 0; function $0($0_1) { @@ -56,7 +56,7 @@ function asmFunc(importObject) { } var retasmFunc = asmFunc({ - setTempRet0, + "env": env, }); export var test8 = retasmFunc.test8; export var test16 = retasmFunc.test16; |