From c43721a1ae80539aea5ea9d8d295b7e377aa03f5 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 5 Oct 2022 15:18:22 -0700 Subject: 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 --- test/wasm2js/ordering.2asm.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/wasm2js/ordering.2asm.js') diff --git a/test/wasm2js/ordering.2asm.js b/test/wasm2js/ordering.2asm.js index 99794e58a..c2d4d8a0d 100644 --- a/test/wasm2js/ordering.2asm.js +++ b/test/wasm2js/ordering.2asm.js @@ -1,7 +1,7 @@ -import { table } from 'env'; +import * as env from 'env'; -function asmFunc(importObject) { - var env = importObject.env || importObject; +function asmFunc(imports) { + var env = imports.env; var FUNCTION_TABLE = env.table; var Math_imul = Math.imul; var Math_fround = Math.fround; @@ -55,6 +55,6 @@ function asmFunc(importObject) { } var retasmFunc = asmFunc({ - table, + "env": env, }); export var main = retasmFunc.main; -- cgit v1.2.3