summaryrefslogtreecommitdiff
path: root/test/wasm2js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-04-11 14:01:51 -0700
committerGitHub <noreply@github.com>2019-04-11 14:01:51 -0700
commitb769b4ede65eb014376b67f78ba5e6cb04e0cef8 (patch)
treef0e4925b2d2e3328750c3e7d0190b0801f211faf /test/wasm2js
parent4905c3d3b4be20a89920ea2a56c1868294e77b65 (diff)
downloadbinaryen-b769b4ede65eb014376b67f78ba5e6cb04e0cef8.tar.gz
binaryen-b769b4ede65eb014376b67f78ba5e6cb04e0cef8.tar.bz2
binaryen-b769b4ede65eb014376b67f78ba5e6cb04e0cef8.zip
Wasm2js refactoring (#1997)
Early work for #1929 * Leave core wasm module - the "asm.js function" - to Wasm2JSBuilder, and add Wasm2JSGlue which emits the code before and after that. Currently that's some ES6 code, but we may want to change that later. * Add add AssertionEmitter class for the sole purpose of emitting modules + assertions for testing. This avoids some hacks from before like starting from index 1 (assuming the module at first position was already parsed and printed) and printing of the f32Equal etc. functions not at the very top (which was due to technical limitations before). Logic-wise, there should be no visible change, except some whitespace and reodering, and that I made the exceptions print out the source of the assertion that failed from the wast: -if (!check2()) fail2(); +if (!check2()) throw 'assertion failed: ( assert_return ( call add ( i32.const 1 ) ( i32.const 1 ) ) ( i32.const 2 ) )'; (fail2 etc. did not exist, and seems to just have given a unique number for each assertion?)
Diffstat (limited to 'test/wasm2js')
-rw-r--r--test/wasm2js/address.2asm.js1
-rw-r--r--test/wasm2js/base64.2asm.js1
-rw-r--r--test/wasm2js/block.2asm.js1
-rw-r--r--test/wasm2js/br.2asm.js1
-rw-r--r--test/wasm2js/br_if.2asm.js1
-rw-r--r--test/wasm2js/br_table.2asm.js1
-rw-r--r--test/wasm2js/br_table_temp.2asm.js1
-rw-r--r--test/wasm2js/break-drop.2asm.js1
-rw-r--r--test/wasm2js/call.2asm.js1
-rw-r--r--test/wasm2js/call_indirect.2asm.js1
-rw-r--r--test/wasm2js/comments.2asm.js1
-rw-r--r--test/wasm2js/conversions-modified.2asm.js1
-rw-r--r--test/wasm2js/empty_table.2asm.js1
-rw-r--r--test/wasm2js/endianness.2asm.js1
-rw-r--r--test/wasm2js/f32.2asm.js1
-rw-r--r--test/wasm2js/f32_cmp.2asm.js1
-rw-r--r--test/wasm2js/f64.2asm.js1
-rw-r--r--test/wasm2js/f64_cmp.2asm.js1
-rw-r--r--test/wasm2js/fac.2asm.js1
-rw-r--r--test/wasm2js/float-ops.2asm.js1
-rw-r--r--test/wasm2js/float_literals-modified.2asm.js1
-rw-r--r--test/wasm2js/float_misc.2asm.js1
-rw-r--r--test/wasm2js/forward.2asm.js1
-rw-r--r--test/wasm2js/func-ptr-offset.2asm.js1
-rw-r--r--test/wasm2js/func.2asm.js1
-rw-r--r--test/wasm2js/func_ptrs.2asm.js1
-rw-r--r--test/wasm2js/get-set-local.2asm.js1
-rw-r--r--test/wasm2js/get_local.2asm.js1
-rw-r--r--test/wasm2js/grow-memory-tricky.2asm.js1
-rw-r--r--test/wasm2js/grow_memory.2asm.js1
-rw-r--r--test/wasm2js/hello_world.2asm.js1
-rw-r--r--test/wasm2js/i32.2asm.js1
-rw-r--r--test/wasm2js/i64-add-sub.2asm.js1
-rw-r--r--test/wasm2js/i64-ctz.2asm.js1
-rw-r--r--test/wasm2js/i64-lowering.2asm.js1
-rw-r--r--test/wasm2js/i64-rotate.2asm.js1
-rw-r--r--test/wasm2js/i64-select.2asm.js1
-rw-r--r--test/wasm2js/i64-shifts.2asm.js1
-rw-r--r--test/wasm2js/i64.2asm.js1
-rw-r--r--test/wasm2js/int_exprs.2asm.js1
-rw-r--r--test/wasm2js/int_literals.2asm.js1
-rw-r--r--test/wasm2js/labels.2asm.js1
-rw-r--r--test/wasm2js/left-to-right.2asm.js1
-rw-r--r--test/wasm2js/loop.2asm.js1
-rw-r--r--test/wasm2js/nested-selects.2asm.js1
-rw-r--r--test/wasm2js/reinterpret.2asm.js1
-rw-r--r--test/wasm2js/select.2asm.js1
-rw-r--r--test/wasm2js/set_local.2asm.js1
-rw-r--r--test/wasm2js/stack-modified.2asm.js1
-rw-r--r--test/wasm2js/switch.2asm.js1
-rw-r--r--test/wasm2js/tee_local.2asm.js1
-rw-r--r--test/wasm2js/traps.2asm.js1
-rw-r--r--test/wasm2js/unaligned.2asm.js1
-rw-r--r--test/wasm2js/unary-ops.2asm.js1
54 files changed, 54 insertions, 0 deletions
diff --git a/test/wasm2js/address.2asm.js b/test/wasm2js/address.2asm.js
index 32b839db2..9a79aef3f 100644
--- a/test/wasm2js/address.2asm.js
+++ b/test/wasm2js/address.2asm.js
@@ -1,4 +1,5 @@
import { print } from 'spectest';
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/base64.2asm.js b/test/wasm2js/base64.2asm.js
index 203680dc7..d6107dd88 100644
--- a/test/wasm2js/base64.2asm.js
+++ b/test/wasm2js/base64.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/block.2asm.js b/test/wasm2js/block.2asm.js
index 10706a646..b069ec6c9 100644
--- a/test/wasm2js/block.2asm.js
+++ b/test/wasm2js/block.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/br.2asm.js b/test/wasm2js/br.2asm.js
index 90822c599..62cafe37c 100644
--- a/test/wasm2js/br.2asm.js
+++ b/test/wasm2js/br.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/br_if.2asm.js b/test/wasm2js/br_if.2asm.js
index 628da8ee9..0e5e84a23 100644
--- a/test/wasm2js/br_if.2asm.js
+++ b/test/wasm2js/br_if.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/br_table.2asm.js b/test/wasm2js/br_table.2asm.js
index 863fe53b5..135733e4b 100644
--- a/test/wasm2js/br_table.2asm.js
+++ b/test/wasm2js/br_table.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/br_table_temp.2asm.js b/test/wasm2js/br_table_temp.2asm.js
index adcdc270d..e5209e148 100644
--- a/test/wasm2js/br_table_temp.2asm.js
+++ b/test/wasm2js/br_table_temp.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/break-drop.2asm.js b/test/wasm2js/break-drop.2asm.js
index 5917b678b..178d21a19 100644
--- a/test/wasm2js/break-drop.2asm.js
+++ b/test/wasm2js/break-drop.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/call.2asm.js b/test/wasm2js/call.2asm.js
index 470e63c21..a36f59811 100644
--- a/test/wasm2js/call.2asm.js
+++ b/test/wasm2js/call.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/call_indirect.2asm.js b/test/wasm2js/call_indirect.2asm.js
index af9e9874c..9ee3d9480 100644
--- a/test/wasm2js/call_indirect.2asm.js
+++ b/test/wasm2js/call_indirect.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/comments.2asm.js b/test/wasm2js/comments.2asm.js
index c8ff78cb4..d515f48f4 100644
--- a/test/wasm2js/comments.2asm.js
+++ b/test/wasm2js/comments.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/conversions-modified.2asm.js b/test/wasm2js/conversions-modified.2asm.js
index 78254f600..a9dd9f0cb 100644
--- a/test/wasm2js/conversions-modified.2asm.js
+++ b/test/wasm2js/conversions-modified.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/empty_table.2asm.js b/test/wasm2js/empty_table.2asm.js
index c8ff78cb4..d515f48f4 100644
--- a/test/wasm2js/empty_table.2asm.js
+++ b/test/wasm2js/empty_table.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/endianness.2asm.js b/test/wasm2js/endianness.2asm.js
index 3796af318..8d63eeac2 100644
--- a/test/wasm2js/endianness.2asm.js
+++ b/test/wasm2js/endianness.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/f32.2asm.js b/test/wasm2js/f32.2asm.js
index 454fb8d8b..e8a12f19c 100644
--- a/test/wasm2js/f32.2asm.js
+++ b/test/wasm2js/f32.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/f32_cmp.2asm.js b/test/wasm2js/f32_cmp.2asm.js
index 84bf67293..87e9e2506 100644
--- a/test/wasm2js/f32_cmp.2asm.js
+++ b/test/wasm2js/f32_cmp.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/f64.2asm.js b/test/wasm2js/f64.2asm.js
index ac5f78a49..83aad0565 100644
--- a/test/wasm2js/f64.2asm.js
+++ b/test/wasm2js/f64.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/f64_cmp.2asm.js b/test/wasm2js/f64_cmp.2asm.js
index 39b64c386..0bc1bcb71 100644
--- a/test/wasm2js/f64_cmp.2asm.js
+++ b/test/wasm2js/f64_cmp.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/fac.2asm.js b/test/wasm2js/fac.2asm.js
index 794fd2806..f244548db 100644
--- a/test/wasm2js/fac.2asm.js
+++ b/test/wasm2js/fac.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/float-ops.2asm.js b/test/wasm2js/float-ops.2asm.js
index 8a23294b4..7bbf81de9 100644
--- a/test/wasm2js/float-ops.2asm.js
+++ b/test/wasm2js/float-ops.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/float_literals-modified.2asm.js b/test/wasm2js/float_literals-modified.2asm.js
index b93b82832..4bff08e88 100644
--- a/test/wasm2js/float_literals-modified.2asm.js
+++ b/test/wasm2js/float_literals-modified.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/float_misc.2asm.js b/test/wasm2js/float_misc.2asm.js
index 469e70e86..c654b4060 100644
--- a/test/wasm2js/float_misc.2asm.js
+++ b/test/wasm2js/float_misc.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/forward.2asm.js b/test/wasm2js/forward.2asm.js
index dfdf6b2bf..c7421abb8 100644
--- a/test/wasm2js/forward.2asm.js
+++ b/test/wasm2js/forward.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/func-ptr-offset.2asm.js b/test/wasm2js/func-ptr-offset.2asm.js
index 93b844826..3d75062a7 100644
--- a/test/wasm2js/func-ptr-offset.2asm.js
+++ b/test/wasm2js/func-ptr-offset.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/func.2asm.js b/test/wasm2js/func.2asm.js
index 83919f943..585c28552 100644
--- a/test/wasm2js/func.2asm.js
+++ b/test/wasm2js/func.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/func_ptrs.2asm.js b/test/wasm2js/func_ptrs.2asm.js
index ec4d11d86..6841925db 100644
--- a/test/wasm2js/func_ptrs.2asm.js
+++ b/test/wasm2js/func_ptrs.2asm.js
@@ -1,4 +1,5 @@
import { print } from 'spectest';
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/get-set-local.2asm.js b/test/wasm2js/get-set-local.2asm.js
index 69c6a16ae..5f50972ba 100644
--- a/test/wasm2js/get-set-local.2asm.js
+++ b/test/wasm2js/get-set-local.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/get_local.2asm.js b/test/wasm2js/get_local.2asm.js
index 5a71697b9..2b8688bef 100644
--- a/test/wasm2js/get_local.2asm.js
+++ b/test/wasm2js/get_local.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/grow-memory-tricky.2asm.js b/test/wasm2js/grow-memory-tricky.2asm.js
index 81c5952cb..62b615bdc 100644
--- a/test/wasm2js/grow-memory-tricky.2asm.js
+++ b/test/wasm2js/grow-memory-tricky.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"almost asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/grow_memory.2asm.js b/test/wasm2js/grow_memory.2asm.js
index 31e3dd525..ad8ff14b0 100644
--- a/test/wasm2js/grow_memory.2asm.js
+++ b/test/wasm2js/grow_memory.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"almost asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/hello_world.2asm.js b/test/wasm2js/hello_world.2asm.js
index 9fef6f97c..403fdd4e2 100644
--- a/test/wasm2js/hello_world.2asm.js
+++ b/test/wasm2js/hello_world.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/i32.2asm.js b/test/wasm2js/i32.2asm.js
index 261f9df1c..adf917e9b 100644
--- a/test/wasm2js/i32.2asm.js
+++ b/test/wasm2js/i32.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/i64-add-sub.2asm.js b/test/wasm2js/i64-add-sub.2asm.js
index 249b4844e..521264318 100644
--- a/test/wasm2js/i64-add-sub.2asm.js
+++ b/test/wasm2js/i64-add-sub.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/i64-ctz.2asm.js b/test/wasm2js/i64-ctz.2asm.js
index 481c42e61..bb217bc66 100644
--- a/test/wasm2js/i64-ctz.2asm.js
+++ b/test/wasm2js/i64-ctz.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/i64-lowering.2asm.js b/test/wasm2js/i64-lowering.2asm.js
index 9d673d20b..dbbbeb4a2 100644
--- a/test/wasm2js/i64-lowering.2asm.js
+++ b/test/wasm2js/i64-lowering.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/i64-rotate.2asm.js b/test/wasm2js/i64-rotate.2asm.js
index 1981e0d0f..e2031cca0 100644
--- a/test/wasm2js/i64-rotate.2asm.js
+++ b/test/wasm2js/i64-rotate.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/i64-select.2asm.js b/test/wasm2js/i64-select.2asm.js
index 99562534d..e715515b0 100644
--- a/test/wasm2js/i64-select.2asm.js
+++ b/test/wasm2js/i64-select.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/i64-shifts.2asm.js b/test/wasm2js/i64-shifts.2asm.js
index 05ac5e62b..9c8d32f34 100644
--- a/test/wasm2js/i64-shifts.2asm.js
+++ b/test/wasm2js/i64-shifts.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/i64.2asm.js b/test/wasm2js/i64.2asm.js
index 065cf071e..4352850ee 100644
--- a/test/wasm2js/i64.2asm.js
+++ b/test/wasm2js/i64.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/int_exprs.2asm.js b/test/wasm2js/int_exprs.2asm.js
index e3aac0e2b..e6a010a68 100644
--- a/test/wasm2js/int_exprs.2asm.js
+++ b/test/wasm2js/int_exprs.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/int_literals.2asm.js b/test/wasm2js/int_literals.2asm.js
index deb6b99c9..7e30964f0 100644
--- a/test/wasm2js/int_literals.2asm.js
+++ b/test/wasm2js/int_literals.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/labels.2asm.js b/test/wasm2js/labels.2asm.js
index e99b6db8e..a6bfe109a 100644
--- a/test/wasm2js/labels.2asm.js
+++ b/test/wasm2js/labels.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/left-to-right.2asm.js b/test/wasm2js/left-to-right.2asm.js
index 835175ee6..e70eff986 100644
--- a/test/wasm2js/left-to-right.2asm.js
+++ b/test/wasm2js/left-to-right.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/loop.2asm.js b/test/wasm2js/loop.2asm.js
index 9b9df3ff6..bf53d0318 100644
--- a/test/wasm2js/loop.2asm.js
+++ b/test/wasm2js/loop.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/nested-selects.2asm.js b/test/wasm2js/nested-selects.2asm.js
index 15e262f9d..c08be2b2b 100644
--- a/test/wasm2js/nested-selects.2asm.js
+++ b/test/wasm2js/nested-selects.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/reinterpret.2asm.js b/test/wasm2js/reinterpret.2asm.js
index 7aca3ba38..f0915fa8e 100644
--- a/test/wasm2js/reinterpret.2asm.js
+++ b/test/wasm2js/reinterpret.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/select.2asm.js b/test/wasm2js/select.2asm.js
index d0e6f8fdd..ec21d2002 100644
--- a/test/wasm2js/select.2asm.js
+++ b/test/wasm2js/select.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/set_local.2asm.js b/test/wasm2js/set_local.2asm.js
index 50222d6a2..6728bb35e 100644
--- a/test/wasm2js/set_local.2asm.js
+++ b/test/wasm2js/set_local.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/stack-modified.2asm.js b/test/wasm2js/stack-modified.2asm.js
index 1b65bb24b..babd7bdda 100644
--- a/test/wasm2js/stack-modified.2asm.js
+++ b/test/wasm2js/stack-modified.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/switch.2asm.js b/test/wasm2js/switch.2asm.js
index e793696df..053736116 100644
--- a/test/wasm2js/switch.2asm.js
+++ b/test/wasm2js/switch.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/tee_local.2asm.js b/test/wasm2js/tee_local.2asm.js
index b29a167b8..f07a4ca7e 100644
--- a/test/wasm2js/tee_local.2asm.js
+++ b/test/wasm2js/tee_local.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/traps.2asm.js b/test/wasm2js/traps.2asm.js
index c31231653..603d08e3e 100644
--- a/test/wasm2js/traps.2asm.js
+++ b/test/wasm2js/traps.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/unaligned.2asm.js b/test/wasm2js/unaligned.2asm.js
index 849833501..7cd350b7f 100644
--- a/test/wasm2js/unaligned.2asm.js
+++ b/test/wasm2js/unaligned.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);
diff --git a/test/wasm2js/unary-ops.2asm.js b/test/wasm2js/unary-ops.2asm.js
index f06c136b3..8c9114540 100644
--- a/test/wasm2js/unary-ops.2asm.js
+++ b/test/wasm2js/unary-ops.2asm.js
@@ -1,3 +1,4 @@
+
function asmFunc(global, env, buffer) {
"use asm";
var HEAP8 = new global.Int8Array(buffer);