diff options
author | Sam Clegg <sbc@chromium.org> | 2020-09-30 17:21:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-30 17:21:51 -0700 |
commit | 2a935b64dde22671644c4712d0f45e8df60f94eb (patch) | |
tree | 56612d0ed4c9036293b4dba7137eb29ba5428290 /test/wasm2js/dynamicLibrary.2asm.js.opt | |
parent | 2f6939a2cecc37691a1e474ff15a7801f9509cfb (diff) | |
download | binaryen-2a935b64dde22671644c4712d0f45e8df60f94eb.tar.gz binaryen-2a935b64dde22671644c4712d0f45e8df60f94eb.tar.bz2 binaryen-2a935b64dde22671644c4712d0f45e8df60f94eb.zip |
wasm2js: override incoming memory's grow method (#3185)
This will allow for the completely removal of
`__growWasmMemory` as a followup. We currently
unconditionally generate this function
in `generateMemoryGrowthFunction`.
See #3180
Diffstat (limited to 'test/wasm2js/dynamicLibrary.2asm.js.opt')
-rw-r--r-- | test/wasm2js/dynamicLibrary.2asm.js.opt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/wasm2js/dynamicLibrary.2asm.js.opt b/test/wasm2js/dynamicLibrary.2asm.js.opt index 42af848b6..76ec540d9 100644 --- a/test/wasm2js/dynamicLibrary.2asm.js.opt +++ b/test/wasm2js/dynamicLibrary.2asm.js.opt @@ -12,8 +12,9 @@ function Table(ret) { return ret; } -function asmFunc(global, env, buffer) { +function asmFunc(global, env) { var memory = env.memory; + var buffer = memory.buffer; var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); var HEAP32 = new global.Int32Array(buffer); @@ -88,8 +89,7 @@ var retasmFunc = asmFunc({ NaN, Infinity }, { - abort: function() { throw new Error('abort'); } - }, - memasmFunc -); + abort: function() { throw new Error('abort'); }, + memory: { buffer : memasmFunc } + }); export var baz = retasmFunc.baz; |