summaryrefslogtreecommitdiff
path: root/test/wasm2js/emscripten.2asm.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm2js/emscripten.2asm.js')
-rw-r--r--test/wasm2js/emscripten.2asm.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/wasm2js/emscripten.2asm.js b/test/wasm2js/emscripten.2asm.js
index a32f3edd6..fd9cbc607 100644
--- a/test/wasm2js/emscripten.2asm.js
+++ b/test/wasm2js/emscripten.2asm.js
@@ -187,6 +187,10 @@ function asmFunc(global, env, buffer) {
FUNCTION_TABLE[1] = foo;
FUNCTION_TABLE[2] = bar;
FUNCTION_TABLE[3] = tabled;
+ function __wasm_memory_size() {
+ return buffer.byteLength / 65536 | 0;
+ }
+
return {
"main": main,
"other": other,