From 64f9732c40157b84b85dea7763a91b4fe3199093 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 14 Sep 2022 12:36:37 -0700 Subject: wasm2js: Have instantiate function take standard import object (#5018) Previously we were assuming asmLibraryArg which is what emscripten passes as the `env` import object but using this method is more flexible and should allow wasm2js to work with import that are not all form a single object. The slight size increase here is just temporary until emscripten gets updated. See https://github.com/emscripten-core/emscripten/pull/17737 --- test/wasm2js/sign_ext.2asm.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/wasm2js/sign_ext.2asm.js') diff --git a/test/wasm2js/sign_ext.2asm.js b/test/wasm2js/sign_ext.2asm.js index 175ff0aba..eb8489991 100644 --- a/test/wasm2js/sign_ext.2asm.js +++ b/test/wasm2js/sign_ext.2asm.js @@ -1,6 +1,7 @@ import { setTempRet0 } from 'env'; -function asmFunc(env) { +function asmFunc(importObject) { + var env = importObject.env || importObject; var Math_imul = Math.imul; var Math_fround = Math.fround; var Math_abs = Math.abs; -- cgit v1.2.3