diff options
Diffstat (limited to 'test/wasm2js/emscripten.2asm.js.opt')
-rw-r--r-- | test/wasm2js/emscripten.2asm.js.opt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/wasm2js/emscripten.2asm.js.opt b/test/wasm2js/emscripten.2asm.js.opt index 2aa92c316..5dcef5bce 100644 --- a/test/wasm2js/emscripten.2asm.js.opt +++ b/test/wasm2js/emscripten.2asm.js.opt @@ -168,6 +168,10 @@ function asmFunc(global, env, buffer) { FUNCTION_TABLE[1] = foo; FUNCTION_TABLE[2] = bar; FUNCTION_TABLE[3] = internal; + function __wasm_memory_size() { + return buffer.byteLength / 65536 | 0; + } + return { "main": main, "other": other, |