diff options
Diffstat (limited to 'test/wasm2js')
-rw-r--r-- | test/wasm2js/deterministic.2asm.js | 10 | ||||
-rw-r--r-- | test/wasm2js/deterministic.2asm.js.opt | 10 | ||||
-rw-r--r-- | test/wasm2js/dynamicLibrary.2asm.js | 10 | ||||
-rw-r--r-- | test/wasm2js/dynamicLibrary.2asm.js.opt | 10 | ||||
-rw-r--r-- | test/wasm2js/emscripten-grow-no.2asm.js | 3 | ||||
-rw-r--r-- | test/wasm2js/emscripten-grow-no.2asm.js.opt | 3 | ||||
-rw-r--r-- | test/wasm2js/emscripten-grow-yes.2asm.js | 4 | ||||
-rw-r--r-- | test/wasm2js/emscripten-grow-yes.2asm.js.opt | 4 | ||||
-rw-r--r-- | test/wasm2js/emscripten.2asm.js | 3 | ||||
-rw-r--r-- | test/wasm2js/emscripten.2asm.js.opt | 3 | ||||
-rw-r--r-- | test/wasm2js/minified-memory.2asm.js | 11 | ||||
-rw-r--r-- | test/wasm2js/minified-memory.2asm.js.opt | 11 |
12 files changed, 46 insertions, 36 deletions
diff --git a/test/wasm2js/deterministic.2asm.js b/test/wasm2js/deterministic.2asm.js index b5ed9b88e..9b98a8695 100644 --- a/test/wasm2js/deterministic.2asm.js +++ b/test/wasm2js/deterministic.2asm.js @@ -1,6 +1,7 @@ -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); @@ -53,8 +54,7 @@ var retasmFunc = asmFunc({ NaN, Infinity }, { - abort: function() { throw new Error('abort'); } - }, - memasmFunc -); + abort: function() { throw new Error('abort'); }, + memory: { buffer : memasmFunc } + }); export var foo = retasmFunc.foo; diff --git a/test/wasm2js/deterministic.2asm.js.opt b/test/wasm2js/deterministic.2asm.js.opt index 5c3d6cea6..0875a5180 100644 --- a/test/wasm2js/deterministic.2asm.js.opt +++ b/test/wasm2js/deterministic.2asm.js.opt @@ -1,6 +1,7 @@ -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); @@ -52,8 +53,7 @@ var retasmFunc = asmFunc({ NaN, Infinity }, { - abort: function() { throw new Error('abort'); } - }, - memasmFunc -); + abort: function() { throw new Error('abort'); }, + memory: { buffer : memasmFunc } + }); export var foo = retasmFunc.foo; diff --git a/test/wasm2js/dynamicLibrary.2asm.js b/test/wasm2js/dynamicLibrary.2asm.js index 1824b2b9b..48057ed9c 100644 --- a/test/wasm2js/dynamicLibrary.2asm.js +++ b/test/wasm2js/dynamicLibrary.2asm.js @@ -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); @@ -96,8 +97,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; 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; diff --git a/test/wasm2js/emscripten-grow-no.2asm.js b/test/wasm2js/emscripten-grow-no.2asm.js index 96c4c195c..3b9c81248 100644 --- a/test/wasm2js/emscripten-grow-no.2asm.js +++ b/test/wasm2js/emscripten-grow-no.2asm.js @@ -1,6 +1,7 @@ function instantiate(asmLibraryArg, wasmMemory) { -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); diff --git a/test/wasm2js/emscripten-grow-no.2asm.js.opt b/test/wasm2js/emscripten-grow-no.2asm.js.opt index 96c4c195c..3b9c81248 100644 --- a/test/wasm2js/emscripten-grow-no.2asm.js.opt +++ b/test/wasm2js/emscripten-grow-no.2asm.js.opt @@ -1,6 +1,7 @@ function instantiate(asmLibraryArg, wasmMemory) { -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); diff --git a/test/wasm2js/emscripten-grow-yes.2asm.js b/test/wasm2js/emscripten-grow-yes.2asm.js index 5acd1e0fe..157b5510d 100644 --- a/test/wasm2js/emscripten-grow-yes.2asm.js +++ b/test/wasm2js/emscripten-grow-yes.2asm.js @@ -1,6 +1,8 @@ function instantiate(asmLibraryArg, wasmMemory) { -function asmFunc(global, env, buffer) { +function asmFunc(global, env) { var memory = env.memory; + var buffer = memory.buffer; + memory.grow = __wasm_memory_grow; var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); var HEAP32 = new global.Int32Array(buffer); diff --git a/test/wasm2js/emscripten-grow-yes.2asm.js.opt b/test/wasm2js/emscripten-grow-yes.2asm.js.opt index 5acd1e0fe..157b5510d 100644 --- a/test/wasm2js/emscripten-grow-yes.2asm.js.opt +++ b/test/wasm2js/emscripten-grow-yes.2asm.js.opt @@ -1,6 +1,8 @@ function instantiate(asmLibraryArg, wasmMemory) { -function asmFunc(global, env, buffer) { +function asmFunc(global, env) { var memory = env.memory; + var buffer = memory.buffer; + memory.grow = __wasm_memory_grow; var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); var HEAP32 = new global.Int32Array(buffer); diff --git a/test/wasm2js/emscripten.2asm.js b/test/wasm2js/emscripten.2asm.js index 5d6e11b85..f4169a148 100644 --- a/test/wasm2js/emscripten.2asm.js +++ b/test/wasm2js/emscripten.2asm.js @@ -1,6 +1,7 @@ function instantiate(asmLibraryArg, wasmMemory) { -function asmFunc(global, env, buffer) { +function asmFunc(global, env) { var memory = env.memory; + var buffer = memory.buffer; var FUNCTION_TABLE = env.table; var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); diff --git a/test/wasm2js/emscripten.2asm.js.opt b/test/wasm2js/emscripten.2asm.js.opt index 7cd4868b3..8de23758f 100644 --- a/test/wasm2js/emscripten.2asm.js.opt +++ b/test/wasm2js/emscripten.2asm.js.opt @@ -1,6 +1,7 @@ function instantiate(asmLibraryArg, wasmMemory) { -function asmFunc(global, env, buffer) { +function asmFunc(global, env) { var memory = env.memory; + var buffer = memory.buffer; var FUNCTION_TABLE = env.table; var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); diff --git a/test/wasm2js/minified-memory.2asm.js b/test/wasm2js/minified-memory.2asm.js index d7c73a6bb..e9a89166c 100644 --- a/test/wasm2js/minified-memory.2asm.js +++ b/test/wasm2js/minified-memory.2asm.js @@ -1,6 +1,8 @@ -function asmFunc(global, env, buffer) { +function asmFunc(global, env) { var memory = env.a; + var buffer = memory.buffer; + memory.grow = __wasm_memory_grow; var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); var HEAP32 = new global.Int32Array(buffer); @@ -72,8 +74,7 @@ var retasmFunc = asmFunc({ NaN, Infinity }, { - abort: function() { throw new Error('abort'); } - }, - memasmFunc -); + abort: function() { throw new Error('abort'); }, + a: { buffer : memasmFunc } + }); export var foo = retasmFunc.foo; diff --git a/test/wasm2js/minified-memory.2asm.js.opt b/test/wasm2js/minified-memory.2asm.js.opt index 1e79d3202..2a09422ec 100644 --- a/test/wasm2js/minified-memory.2asm.js.opt +++ b/test/wasm2js/minified-memory.2asm.js.opt @@ -1,6 +1,8 @@ -function asmFunc(global, env, buffer) { +function asmFunc(global, env) { var memory = env.a; + var buffer = memory.buffer; + memory.grow = __wasm_memory_grow; var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); var HEAP32 = new global.Int32Array(buffer); @@ -72,8 +74,7 @@ var retasmFunc = asmFunc({ NaN, Infinity }, { - abort: function() { throw new Error('abort'); } - }, - memasmFunc -); + abort: function() { throw new Error('abort'); }, + a: { buffer : memasmFunc } + }); export var foo = retasmFunc.foo; |