summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-09-21 16:39:46 -0700
committerGitHub <noreply@github.com>2020-09-21 16:39:46 -0700
commitee00f647750f23e6c24e67424bafab39b244c835 (patch)
treee99f91b24cda95a3292eccb92fec09a0e168ca66 /scripts
parent4d6e9ea2d1796c984e3ebc38d0b6abdf8049941a (diff)
downloadbinaryen-ee00f647750f23e6c24e67424bafab39b244c835.tar.gz
binaryen-ee00f647750f23e6c24e67424bafab39b244c835.tar.bz2
binaryen-ee00f647750f23e6c24e67424bafab39b244c835.zip
wasm2js: Support exported tables (#3152)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/test/env.js4
-rw-r--r--scripts/wasm2js.js4
2 files changed, 3 insertions, 5 deletions
diff --git a/scripts/test/env.js b/scripts/test/env.js
index 0eb3f06f4..4dcfa7d2b 100644
--- a/scripts/test/env.js
+++ b/scripts/test/env.js
@@ -1,5 +1,5 @@
-
-export const FUNCTION_TABLE = [];
+// This is the name by which the tests import the wasm table.
+export const table = [];
var tempRet0 = 0;
diff --git a/scripts/wasm2js.js b/scripts/wasm2js.js
index bc9ac6cbd..7bb8453bc 100644
--- a/scripts/wasm2js.js
+++ b/scripts/wasm2js.js
@@ -72,7 +72,7 @@ var WebAssembly = {
// Additional imports
asmLibraryArg['__tempMemory__'] = 0; // risky!
// This will be replaced by the actual wasm2js code.
- var exports = instantiate(asmLibraryArg, wasmMemory, wasmTable);
+ var exports = instantiate(asmLibraryArg, wasmMemory);
return {
'exports': exports
};
@@ -208,5 +208,3 @@ var asmLibraryArg = {
};
var wasmMemory = new WebAssembly.Memory({ initial: 1 });
-var wasmTable = new WebAssembly.Table({ initial: 1 });
-