summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-01-10 11:34:53 -0800
committerGitHub <noreply@github.com>2018-01-10 11:34:53 -0800
commit623e42aa7be8aa030093b204491d94f3c297d312 (patch)
tree05158ff7c3ef2856345c1650192283ed737f91fd /test
parent8f90b655201e4cd77196a0b90ea4f398ecfe2c56 (diff)
downloadbinaryen-623e42aa7be8aa030093b204491d94f3c297d312.tar.gz
binaryen-623e42aa7be8aa030093b204491d94f3c297d312.tar.bz2
binaryen-623e42aa7be8aa030093b204491d94f3c297d312.zip
Optimize out memory and table when possible (#1352)
We can remove the memory/table (itself, or an import if imported) if they are not used. This is pretty minor on a large wasm file, but when reading small wasts it's very noticeable to have an unused memory and table all the time.
Diffstat (limited to 'test')
-rw-r--r--test/binaryen.js/call_import_error.js.txt1
-rw-r--r--test/binaryen.js/functions.js.txt1
-rw-r--r--test/binaryen.js/hello-world.js.txt2
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt9
-rw-r--r--test/br_to_exit.wasm.fromBinary1
-rw-r--r--test/debugInfo.fromasm2
-rw-r--r--test/debugInfo.fromasm.clamp2
-rw-r--r--test/debugInfo.fromasm.clamp.map2
-rw-r--r--test/debugInfo.fromasm.imprecise4
-rw-r--r--test/debugInfo.fromasm.imprecise.map2
-rw-r--r--test/debugInfo.fromasm.map2
-rw-r--r--test/dynamicLibrary.fromasm4
-rw-r--r--test/dynamicLibrary.fromasm.clamp4
-rw-r--r--test/dynamicLibrary.fromasm.clamp.no-opts8
-rw-r--r--test/dynamicLibrary.fromasm.imprecise3
-rw-r--r--test/dynamicLibrary.fromasm.imprecise.no-opts8
-rw-r--r--test/dynamicLibrary.fromasm.no-opts8
-rw-r--r--test/emcc_O2_hello_world.fromasm7
-rw-r--r--test/emcc_O2_hello_world.fromasm.clamp7
-rw-r--r--test/emcc_O2_hello_world.fromasm.clamp.no-opts8
-rw-r--r--test/emcc_O2_hello_world.fromasm.imprecise7
-rw-r--r--test/emcc_O2_hello_world.fromasm.imprecise.no-opts8
-rw-r--r--test/emcc_O2_hello_world.fromasm.no-opts8
-rw-r--r--test/emcc_hello_world.fromasm7
-rw-r--r--test/emcc_hello_world.fromasm.clamp7
-rw-r--r--test/emcc_hello_world.fromasm.clamp.no-opts8
-rw-r--r--test/emcc_hello_world.fromasm.imprecise7
-rw-r--r--test/emcc_hello_world.fromasm.imprecise.no-opts8
-rw-r--r--test/emcc_hello_world.fromasm.no-opts8
-rw-r--r--test/empty.fromasm3
-rw-r--r--test/empty.fromasm.clamp3
-rw-r--r--test/empty.fromasm.imprecise4
-rw-r--r--test/example/c-api-hello-world.txt1
-rw-r--r--test/example/c-api-kitchen-sink.txt9
-rw-r--r--test/example/c-api-kitchen-sink.txt.txt2
-rw-r--r--test/export-import.wast.from-wast1
-rw-r--r--test/export-import.wast.fromBinary1
-rw-r--r--test/export-import.wast.fromBinary.noDebugInfo1
-rw-r--r--test/hello_world.fromasm2
-rw-r--r--test/hello_world.fromasm.clamp2
-rw-r--r--test/hello_world.fromasm.imprecise4
-rw-r--r--test/i64-setTempRet0.fromasm6
-rw-r--r--test/i64-setTempRet0.fromasm.clamp6
-rw-r--r--test/i64-setTempRet0.fromasm.clamp.no-opts4
-rw-r--r--test/i64-setTempRet0.fromasm.imprecise4
-rw-r--r--test/i64-setTempRet0.fromasm.imprecise.no-opts4
-rw-r--r--test/i64-setTempRet0.fromasm.no-opts4
-rw-r--r--test/importedSignCast.fromasm2
-rw-r--r--test/importedSignCast.fromasm.clamp2
-rw-r--r--test/importedSignCast.fromasm.clamp.no-opts2
-rw-r--r--test/importedSignCast.fromasm.imprecise4
-rw-r--r--test/importedSignCast.fromasm.imprecise.no-opts2
-rw-r--r--test/importedSignCast.fromasm.no-opts2
-rw-r--r--test/memorygrowth-minimal.asm.js41
-rw-r--r--test/memorygrowth-minimal.fromasm11
-rw-r--r--test/memorygrowth-minimal.fromasm.clamp11
-rw-r--r--test/memorygrowth-minimal.fromasm.clamp.no-opts12
-rw-r--r--test/memorygrowth-minimal.fromasm.imprecise9
-rw-r--r--test/memorygrowth-minimal.fromasm.imprecise.no-opts12
-rw-r--r--test/memorygrowth-minimal.fromasm.no-opts12
-rw-r--r--test/memorygrowth.fromasm94
-rw-r--r--test/memorygrowth.fromasm.clamp94
-rw-r--r--test/memorygrowth.fromasm.clamp.no-opts102
-rw-r--r--test/memorygrowth.fromasm.imprecise93
-rw-r--r--test/memorygrowth.fromasm.imprecise.no-opts100
-rw-r--r--test/memorygrowth.fromasm.no-opts102
-rw-r--r--test/merge/post-instantiate-a.wast.combined2
-rw-r--r--test/merge/post-instantiate-a.wast.combined.finalized2
-rw-r--r--test/merge/post-instantiate-a.wast.combined.finalized.opt2
-rw-r--r--test/merge/post-instantiate-a.wast.combined.opt2
-rw-r--r--test/merge/post-instantiate-b.wast.combined2
-rw-r--r--test/merge/post-instantiate-b.wast.combined.finalized2
-rw-r--r--test/merge/post-instantiate-b.wast.combined.finalized.opt2
-rw-r--r--test/merge/post-instantiate-b.wast.combined.opt2
-rw-r--r--test/metadce/all-outside.wast.dced1
-rw-r--r--test/metadce/corners.wast.dced1
-rw-r--r--test/metadce/no-outside.wast.dced1
-rw-r--r--test/metadce/rooted-export.wast.dced1
-rw-r--r--test/metadce/spanning_cycle.wast.dced1
-rw-r--r--test/metadce/spanning_cycle_unrooted.wast.dced1
-rw-r--r--test/metadce/threaded.wast.dced1
-rw-r--r--test/metadce/threaded_cycle.wast.dced1
-rw-r--r--test/metadce/threaded_unrooted.wast.dced1
-rw-r--r--test/metadce/threaded_unrooted_cycle.wast.dced1
-rw-r--r--test/min.fromasm2
-rw-r--r--test/min.fromasm.clamp2
-rw-r--r--test/min.fromasm.clamp.no-opts2
-rw-r--r--test/min.fromasm.imprecise3
-rw-r--r--test/min.fromasm.imprecise.no-opts2
-rw-r--r--test/min.fromasm.no-opts2
-rw-r--r--test/noffi_f32.fromasm4
-rw-r--r--test/noffi_f32.fromasm.clamp4
-rw-r--r--test/noffi_f32.fromasm.clamp.no-opts2
-rw-r--r--test/noffi_f32.fromasm.imprecise4
-rw-r--r--test/noffi_f32.fromasm.imprecise.no-opts2
-rw-r--r--test/noffi_f32.fromasm.no-opts2
-rw-r--r--test/noffi_i64.fromasm4
-rw-r--r--test/noffi_i64.fromasm.clamp4
-rw-r--r--test/noffi_i64.fromasm.clamp.no-opts2
-rw-r--r--test/noffi_i64.fromasm.imprecise4
-rw-r--r--test/noffi_i64.fromasm.imprecise.no-opts2
-rw-r--r--test/noffi_i64.fromasm.no-opts2
-rw-r--r--test/passes/O.bin.txt1
-rw-r--r--test/passes/O.txt1
-rw-r--r--test/passes/code-pushing_ignore-implicit-traps.txt1
-rw-r--r--test/passes/const-hoisting.txt1
-rw-r--r--test/passes/dce.txt2
-rw-r--r--test/passes/dce_vacuum.bin.txt1
-rw-r--r--test/passes/dce_vacuum.txt1
-rw-r--r--test/passes/flatten.bin.txt1
-rw-r--r--test/passes/flatten_rereloop.txt2
-rw-r--r--test/passes/fuzz-exec.txt1
-rw-r--r--test/passes/inlining-optimizing.txt2
-rw-r--r--test/passes/inlining.txt4
-rw-r--r--test/passes/inlining_optimize-level=3.txt1
-rw-r--r--test/passes/instrument-locals.txt1
-rw-r--r--test/passes/log-execution.txt1
-rw-r--r--test/passes/merge-blocks.txt1
-rw-r--r--test/passes/merge-locals.txt1
-rw-r--r--test/passes/metrics.txt1
-rw-r--r--test/passes/pick-load-signs.txt1
-rw-r--r--test/passes/precompute-propagate.txt1
-rw-r--r--test/passes/precompute_coalesce-locals_vacuum.txt1
-rw-r--r--test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt1
-rw-r--r--test/passes/remove-unused-module-elements.txt122
-rw-r--r--test/passes/remove-unused-module-elements.wast93
-rw-r--r--test/passes/remove-unused-names_code-folding.txt1
-rw-r--r--test/passes/remove-unused-names_vacuum.txt1
-rw-r--r--test/passes/rereloop.txt2
-rw-r--r--test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt1
-rw-r--r--test/passes/rse.txt1
-rw-r--r--test/passes/simplify-locals-nostructure.txt1
-rw-r--r--test/passes/simplify-locals-notee-nostructure.txt1
-rw-r--r--test/passes/simplify-locals-notee.txt1
-rw-r--r--test/passes/ssa.txt1
-rw-r--r--test/passes/trap-mode-clamp.txt1
-rw-r--r--test/passes/trap-mode-js.txt1
-rw-r--r--test/passes/untee.txt1
-rw-r--r--test/passes/vacuum_ignore-implicit-traps.txt1
-rw-r--r--test/passes/vacuum_remove-unused-names_merge-blocks.txt1
-rw-r--r--test/polymorphic_stack.wast.from-wast1
-rw-r--r--test/polymorphic_stack.wast.fromBinary1
-rw-r--r--test/polymorphic_stack.wast.fromBinary.noDebugInfo1
-rw-r--r--test/reduce/destructive.wast.txt1
-rw-r--r--test/reduce/simple.wast.txt1
-rw-r--r--test/signext.wast.from-wast1
-rw-r--r--test/signext.wast.fromBinary1
-rw-r--r--test/signext.wast.fromBinary.noDebugInfo1
-rw-r--r--test/threads.fromasm2
-rw-r--r--test/threads.fromasm.clamp2
-rw-r--r--test/threads.fromasm.clamp.no-opts8
-rw-r--r--test/threads.fromasm.imprecise3
-rw-r--r--test/threads.fromasm.imprecise.no-opts8
-rw-r--r--test/threads.fromasm.no-opts8
-rw-r--r--test/threads.wasm-only.fromasm2
-rw-r--r--test/threads.wasm-only.fromasm.clamp2
-rw-r--r--test/threads.wasm-only.fromasm.clamp.no-opts2
-rw-r--r--test/threads.wasm-only.fromasm.imprecise3
-rw-r--r--test/threads.wasm-only.fromasm.imprecise.no-opts2
-rw-r--r--test/threads.wasm-only.fromasm.no-opts2
-rw-r--r--test/two_sides.fromasm4
-rw-r--r--test/two_sides.fromasm.clamp2
-rw-r--r--test/two_sides.fromasm.imprecise4
-rw-r--r--test/two_sides.fromasm.no-opts2
-rw-r--r--test/unit.fromasm8
-rw-r--r--test/unit.fromasm.clamp8
-rw-r--r--test/unit.fromasm.clamp.no-opts8
-rw-r--r--test/unit.fromasm.imprecise7
-rw-r--r--test/unit.fromasm.imprecise.no-opts8
-rw-r--r--test/unit.fromasm.no-opts8
-rw-r--r--test/unreachable-code.wast.from-wast1
-rw-r--r--test/unreachable-code.wast.fromBinary1
-rw-r--r--test/unreachable-code.wast.fromBinary.noDebugInfo1
-rw-r--r--test/unreachable-import_wasm-only.fromasm2
-rw-r--r--test/unreachable-import_wasm-only.fromasm.clamp2
-rw-r--r--test/unreachable-import_wasm-only.fromasm.clamp.no-opts8
-rw-r--r--test/unreachable-import_wasm-only.fromasm.imprecise3
-rw-r--r--test/unreachable-import_wasm-only.fromasm.imprecise.no-opts8
-rw-r--r--test/unreachable-import_wasm-only.fromasm.no-opts8
-rw-r--r--test/unreachable-pops.wasm.fromBinary1
-rw-r--r--test/untaken-br_if.wast.from-wast1
-rw-r--r--test/untaken-br_if.wast.fromBinary1
-rw-r--r--test/untaken-br_if.wast.fromBinary.noDebugInfo1
-rw-r--r--test/use-import-and-drop.fromasm2
-rw-r--r--test/use-import-and-drop.fromasm.clamp2
-rw-r--r--test/use-import-and-drop.fromasm.clamp.no-opts2
-rw-r--r--test/use-import-and-drop.fromasm.imprecise4
-rw-r--r--test/use-import-and-drop.fromasm.imprecise.no-opts2
-rw-r--r--test/use-import-and-drop.fromasm.no-opts2
-rw-r--r--test/wasm-only.fromasm8
-rw-r--r--test/wasm-only.fromasm.clamp8
-rw-r--r--test/wasm-only.fromasm.clamp.no-opts8
-rw-r--r--test/wasm-only.fromasm.imprecise7
-rw-r--r--test/wasm-only.fromasm.imprecise.no-opts8
-rw-r--r--test/wasm-only.fromasm.no-opts8
195 files changed, 779 insertions, 685 deletions
diff --git a/test/binaryen.js/call_import_error.js.txt b/test/binaryen.js/call_import_error.js.txt
index 6f2e3b2ac..752f17b49 100644
--- a/test/binaryen.js/call_import_error.js.txt
+++ b/test/binaryen.js/call_import_error.js.txt
@@ -1,7 +1,6 @@
(module
(type $v (func))
(import "env" "fn" (func $fn))
- (memory $0 0)
(export "main" (func $main))
(func $main (; 1 ;) (type $v)
(call $fn)
diff --git a/test/binaryen.js/functions.js.txt b/test/binaryen.js/functions.js.txt
index 145c05a2a..4d1015d15 100644
--- a/test/binaryen.js/functions.js.txt
+++ b/test/binaryen.js/functions.js.txt
@@ -7,6 +7,5 @@ getExpressionInfo(body)={"id":15,"value":3}
(module
(type $i (func (result i32)))
(global $a-global i32 (i32.const 3))
- (memory $0 0)
)
diff --git a/test/binaryen.js/hello-world.js.txt b/test/binaryen.js/hello-world.js.txt
index 48a4e0a60..e1aff31c5 100644
--- a/test/binaryen.js/hello-world.js.txt
+++ b/test/binaryen.js/hello-world.js.txt
@@ -1,6 +1,5 @@
(module
(type $iii (func (param i32 i32) (result i32)))
- (memory $0 0)
(export "adder" (func $adder))
(func $adder (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
@@ -16,7 +15,6 @@ optimized:
(module
(type $iii (func (param i32 i32) (result i32)))
- (memory $0 0)
(export "adder" (func $adder))
(func $adder (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(i32.add
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index fe9765d12..ed1bfe10c 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -579,7 +579,6 @@ raw:
(type $vi (func (param i32)))
(type $i (func (result i32)))
(import "module" "check" (func $check (param i32)))
- (memory $0 0)
(func $just-one-block (; 1 ;) (type $v)
(local $0 i32)
(call $check
@@ -1063,13 +1062,11 @@ raw:
optimized:
(module
- (memory $0 0)
)
module loaded from binary form:
(module
(type $0 (func (param i32 i32) (result i32)))
- (memory $0 0)
(func $adder (; 0 ;) (type $0) (param $var$0 i32) (param $var$1 i32) (result i32)
(i32.add
(get_local $var$0)
@@ -1082,7 +1079,6 @@ module loaded from binary form:
(type $vi (func (param i32)))
(type $v (func))
(import "spectest" "print" (func $print-i32 (param i32)))
- (memory $0 0)
(start $starter)
(func $starter (; 1 ;) (type $v)
(call $print-i32
@@ -1094,7 +1090,6 @@ module loaded from binary form:
(i32.const 1234)
(module
(type $v (func))
- (memory $0 0)
(func $func (; 0 ;) (type $v)
(local $0 i32)
(set_local $0
@@ -2474,7 +2469,6 @@ raw:
(type $vi (func (param i32)))
(type $i (func (result i32)))
(import "module" "check" (func $check (param i32)))
- (memory $0 0)
(func $just-one-block (; 1 ;) (type $v)
(local $0 i32)
(call $check
@@ -2967,7 +2961,6 @@ raw:
optimized:
BinaryenModulePrint(the_module);
(module
- (memory $0 0)
)
BinaryenModuleDispose(the_module);
@@ -2982,7 +2975,6 @@ optimized:
test_parsing text:
(module
(type $iii (func (param i32 i32) (result i32)))
- (memory $0 0)
(func $adder (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(i32.add
(get_local $0)
@@ -2994,7 +2986,6 @@ test_parsing text:
module loaded from text form:
(module
(type $iii (func (param i32 i32) (result i32)))
- (memory $0 0)
(func $ADD_ER (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(i32.add
(get_local $0)
diff --git a/test/br_to_exit.wasm.fromBinary b/test/br_to_exit.wasm.fromBinary
index 2659ab3b4..fa58c1969 100644
--- a/test/br_to_exit.wasm.fromBinary
+++ b/test/br_to_exit.wasm.fromBinary
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $0 (; 0 ;) (type $0)
(block $label$0
(br $label$0)
diff --git a/test/debugInfo.fromasm b/test/debugInfo.fromasm
index af058db39..45b663fd5 100644
--- a/test/debugInfo.fromasm
+++ b/test/debugInfo.fromasm
@@ -1,9 +1,7 @@
(module
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "debugInfo.asm.js")
(export "add" (func $add))
(export "ret" (func $ret))
diff --git a/test/debugInfo.fromasm.clamp b/test/debugInfo.fromasm.clamp
index af058db39..45b663fd5 100644
--- a/test/debugInfo.fromasm.clamp
+++ b/test/debugInfo.fromasm.clamp
@@ -1,9 +1,7 @@
(module
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "debugInfo.asm.js")
(export "add" (func $add))
(export "ret" (func $ret))
diff --git a/test/debugInfo.fromasm.clamp.map b/test/debugInfo.fromasm.clamp.map
index ecc297b63..4f3d4a2a3 100644
--- a/test/debugInfo.fromasm.clamp.map
+++ b/test/debugInfo.fromasm.clamp.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"iLC8ylTA,QC7vlTA,OAkDA,UCnGA,OACA,OACA,uBCAA,gBAKA,MAJA,OADA,0BAKA,0FCsi1DA,KCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"8IC8ylTA,QC7vlTA,OAkDA,UCnGA,OACA,OACA,uBCAA,gBAKA,MAJA,OADA,0BAKA,0FCsi1DA,KCrvyDA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.imprecise b/test/debugInfo.fromasm.imprecise
index 390aa7f1e..a948cc5ac 100644
--- a/test/debugInfo.fromasm.imprecise
+++ b/test/debugInfo.fromasm.imprecise
@@ -1,9 +1,5 @@
(module
(type $FUNCSIG$vii (func (param i32 i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(export "add" (func $add))
(export "ret" (func $ret))
(export "opts" (func $opts))
diff --git a/test/debugInfo.fromasm.imprecise.map b/test/debugInfo.fromasm.imprecise.map
index 5efd89334..4839cff2a 100644
--- a/test/debugInfo.fromasm.imprecise.map
+++ b/test/debugInfo.fromasm.imprecise.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"iLC8ylTA,QC7vlTA,OAkDA,QCnGA,OACA,OACA,aCAA,gBAKA,MAJA,OADA,0BAKA,0FCsi1DA,KCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"wGC8ylTA,QC7vlTA,OAkDA,QCnGA,OACA,OACA,aCAA,gBAKA,MAJA,OADA,0BAKA,0FCsi1DA,KCrvyDA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.map b/test/debugInfo.fromasm.map
index ecc297b63..4f3d4a2a3 100644
--- a/test/debugInfo.fromasm.map
+++ b/test/debugInfo.fromasm.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"iLC8ylTA,QC7vlTA,OAkDA,UCnGA,OACA,OACA,uBCAA,gBAKA,MAJA,OADA,0BAKA,0FCsi1DA,KCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"8IC8ylTA,QC7vlTA,OAkDA,UCnGA,OACA,OACA,uBCAA,gBAKA,MAJA,OADA,0BAKA,0FCsi1DA,KCrvyDA"} \ No newline at end of file
diff --git a/test/dynamicLibrary.fromasm b/test/dynamicLibrary.fromasm
index 2233b204e..2d849c931 100644
--- a/test/dynamicLibrary.fromasm
+++ b/test/dynamicLibrary.fromasm
@@ -1,12 +1,10 @@
(module
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
+ (import "env" "memory" (memory $0 256 256))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $_global i32 (i32.const 5242912))
diff --git a/test/dynamicLibrary.fromasm.clamp b/test/dynamicLibrary.fromasm.clamp
index 2233b204e..2d849c931 100644
--- a/test/dynamicLibrary.fromasm.clamp
+++ b/test/dynamicLibrary.fromasm.clamp
@@ -1,12 +1,10 @@
(module
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
+ (import "env" "memory" (memory $0 256 256))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $_global i32 (i32.const 5242912))
diff --git a/test/dynamicLibrary.fromasm.clamp.no-opts b/test/dynamicLibrary.fromasm.clamp.no-opts
index 4680b89b5..4068732c0 100644
--- a/test/dynamicLibrary.fromasm.clamp.no-opts
+++ b/test/dynamicLibrary.fromasm.clamp.no-opts
@@ -1,17 +1,17 @@
(module
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(import "global" "NaN" (global $nan$asm2wasm$import f64))
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
diff --git a/test/dynamicLibrary.fromasm.imprecise b/test/dynamicLibrary.fromasm.imprecise
index 49b619634..09619276a 100644
--- a/test/dynamicLibrary.fromasm.imprecise
+++ b/test/dynamicLibrary.fromasm.imprecise
@@ -4,9 +4,6 @@
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $_global i32 (i32.const 5242912))
diff --git a/test/dynamicLibrary.fromasm.imprecise.no-opts b/test/dynamicLibrary.fromasm.imprecise.no-opts
index 4680b89b5..4068732c0 100644
--- a/test/dynamicLibrary.fromasm.imprecise.no-opts
+++ b/test/dynamicLibrary.fromasm.imprecise.no-opts
@@ -1,17 +1,17 @@
(module
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(import "global" "NaN" (global $nan$asm2wasm$import f64))
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
diff --git a/test/dynamicLibrary.fromasm.no-opts b/test/dynamicLibrary.fromasm.no-opts
index 4680b89b5..4068732c0 100644
--- a/test/dynamicLibrary.fromasm.no-opts
+++ b/test/dynamicLibrary.fromasm.no-opts
@@ -1,17 +1,17 @@
(module
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(import "global" "NaN" (global $nan$asm2wasm$import f64))
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm
index aa1a08dc6..0bc4edf68 100644
--- a/test/emcc_O2_hello_world.fromasm
+++ b/test/emcc_O2_hello_world.fromasm
@@ -6,6 +6,9 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "abort" (func $abort (param i32)))
@@ -23,10 +26,6 @@
(import "env" "___unlock" (func $___unlock (param i32)))
(import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $__THREW__ (mut i32) (i32.const 0))
diff --git a/test/emcc_O2_hello_world.fromasm.clamp b/test/emcc_O2_hello_world.fromasm.clamp
index aa1a08dc6..0bc4edf68 100644
--- a/test/emcc_O2_hello_world.fromasm.clamp
+++ b/test/emcc_O2_hello_world.fromasm.clamp
@@ -6,6 +6,9 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "abort" (func $abort (param i32)))
@@ -23,10 +26,6 @@
(import "env" "___unlock" (func $___unlock (param i32)))
(import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $__THREW__ (mut i32) (i32.const 0))
diff --git a/test/emcc_O2_hello_world.fromasm.clamp.no-opts b/test/emcc_O2_hello_world.fromasm.clamp.no-opts
index 52192d925..1592aabd2 100644
--- a/test/emcc_O2_hello_world.fromasm.clamp.no-opts
+++ b/test/emcc_O2_hello_world.fromasm.clamp.no-opts
@@ -6,6 +6,10 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -27,10 +31,6 @@
(import "env" "___unlock" (func $___unlock (param i32)))
(import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise
index af05b1e3f..1fe0499f9 100644
--- a/test/emcc_O2_hello_world.fromasm.imprecise
+++ b/test/emcc_O2_hello_world.fromasm.imprecise
@@ -6,6 +6,9 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "abort" (func $abort (param i32)))
@@ -23,10 +26,6 @@
(import "env" "___unlock" (func $___unlock (param i32)))
(import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $__THREW__ (mut i32) (i32.const 0))
diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts
index f1b2457a3..6c44953e3 100644
--- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts
+++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts
@@ -6,6 +6,10 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -27,10 +31,6 @@
(import "env" "___unlock" (func $___unlock (param i32)))
(import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts
index 52192d925..1592aabd2 100644
--- a/test/emcc_O2_hello_world.fromasm.no-opts
+++ b/test/emcc_O2_hello_world.fromasm.no-opts
@@ -6,6 +6,10 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -27,10 +31,6 @@
(import "env" "___unlock" (func $___unlock (param i32)))
(import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm
index a9843a84e..17fb1483f 100644
--- a/test/emcc_hello_world.fromasm
+++ b/test/emcc_hello_world.fromasm
@@ -7,6 +7,9 @@
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -29,10 +32,6 @@
(import "env" "_sysconf" (func $_sysconf (param i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
(import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
diff --git a/test/emcc_hello_world.fromasm.clamp b/test/emcc_hello_world.fromasm.clamp
index 86bfe811e..230b06413 100644
--- a/test/emcc_hello_world.fromasm.clamp
+++ b/test/emcc_hello_world.fromasm.clamp
@@ -6,6 +6,9 @@
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -27,10 +30,6 @@
(import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32)))
(import "env" "_sysconf" (func $_sysconf (param i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
diff --git a/test/emcc_hello_world.fromasm.clamp.no-opts b/test/emcc_hello_world.fromasm.clamp.no-opts
index a90f8b5ad..ccb416d02 100644
--- a/test/emcc_hello_world.fromasm.clamp.no-opts
+++ b/test/emcc_hello_world.fromasm.clamp.no-opts
@@ -6,6 +6,10 @@
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -31,10 +35,6 @@
(import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32)))
(import "env" "_sysconf" (func $_sysconf (param i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise
index 54c162195..d932b35eb 100644
--- a/test/emcc_hello_world.fromasm.imprecise
+++ b/test/emcc_hello_world.fromasm.imprecise
@@ -6,6 +6,9 @@
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -27,10 +30,6 @@
(import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32)))
(import "env" "_sysconf" (func $_sysconf (param i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts
index 8f91b3adb..8663575ff 100644
--- a/test/emcc_hello_world.fromasm.imprecise.no-opts
+++ b/test/emcc_hello_world.fromasm.imprecise.no-opts
@@ -6,6 +6,10 @@
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -31,10 +35,6 @@
(import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32)))
(import "env" "_sysconf" (func $_sysconf (param i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts
index dd84b963a..2d7a706ae 100644
--- a/test/emcc_hello_world.fromasm.no-opts
+++ b/test/emcc_hello_world.fromasm.no-opts
@@ -7,6 +7,10 @@
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -33,10 +37,6 @@
(import "env" "_sysconf" (func $_sysconf (param i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
(import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
diff --git a/test/empty.fromasm b/test/empty.fromasm
index 0e8d5c63b..968902e3a 100644
--- a/test/empty.fromasm
+++ b/test/empty.fromasm
@@ -1,7 +1,4 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (i32.const 1024) "empty.asm.js")
)
diff --git a/test/empty.fromasm.clamp b/test/empty.fromasm.clamp
index 0e8d5c63b..968902e3a 100644
--- a/test/empty.fromasm.clamp
+++ b/test/empty.fromasm.clamp
@@ -1,7 +1,4 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (i32.const 1024) "empty.asm.js")
)
diff --git a/test/empty.fromasm.imprecise b/test/empty.fromasm.imprecise
index ddb433043..4427f36e0 100644
--- a/test/empty.fromasm.imprecise
+++ b/test/empty.fromasm.imprecise
@@ -1,6 +1,2 @@
(module
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
)
diff --git a/test/example/c-api-hello-world.txt b/test/example/c-api-hello-world.txt
index e61cf3761..624ba1571 100644
--- a/test/example/c-api-hello-world.txt
+++ b/test/example/c-api-hello-world.txt
@@ -1,6 +1,5 @@
(module
(type $iii (func (param i32 i32) (result i32)))
- (memory $0 0)
(func $adder (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(i32.add
(get_local $0)
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index e7ace6676..0d0fcbe79 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -543,7 +543,6 @@ BinaryenTypeAuto: -1
(module
(type $i (func (result i32)))
(type $I (func (result i64)))
- (memory $0 0)
(func $unreachable-fn (; 0 ;) (type $i) (result i32)
(call_indirect (type $I)
(unreachable)
@@ -556,7 +555,6 @@ raw:
(type $vi (func (param i32)))
(type $i (func (result i32)))
(import "module" "check" (func $check (param i32)))
- (memory $0 0)
(func $just-one-block (; 1 ;) (type $v)
(local $0 i32)
(call $check
@@ -1039,12 +1037,10 @@ raw:
)
optimized:
(module
- (memory $0 0)
)
module loaded from binary form:
(module
(type $0 (func (param i32 i32) (result i32)))
- (memory $0 0)
(func $adder (; 0 ;) (type $0) (param $var$0 i32) (param $var$1 i32) (result i32)
(i32.add
(get_local $var$0)
@@ -1056,7 +1052,6 @@ module loaded from binary form:
(type $vi (func (param i32)))
(type $v (func))
(import "spectest" "print" (func $print-i32 (param i32)))
- (memory $0 0)
(start $starter)
(func $starter (; 1 ;) (type $v)
(call $print-i32
@@ -1067,7 +1062,6 @@ module loaded from binary form:
(i32.const 1234)
(module
(type $v (func))
- (memory $0 0)
(func $func (; 0 ;) (type $v)
(local $0 i32)
(set_local $0
@@ -1078,7 +1072,6 @@ module loaded from binary form:
validation: 0
(module
(type $i (func (result i32)))
- (memory $0 0)
(func $func (; 0 ;) (type $i) (result i32)
(i32.sub
(i32.const 1234)
@@ -2431,7 +2424,6 @@ raw:
(type $vi (func (param i32)))
(type $i (func (result i32)))
(import "module" "check" (func $check (param i32)))
- (memory $0 0)
(func $just-one-block (; 1 ;) (type $v)
(local $0 i32)
(call $check
@@ -2918,7 +2910,6 @@ raw:
optimized:
BinaryenModulePrint(the_module);
(module
- (memory $0 0)
)
BinaryenModuleDispose(the_module);
functionTypes.clear();
diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt
index f7a454507..986c21bf6 100644
--- a/test/example/c-api-kitchen-sink.txt.txt
+++ b/test/example/c-api-kitchen-sink.txt.txt
@@ -538,7 +538,6 @@
(type $vi (func (param i32)))
(type $i (func (result i32)))
(import "module" "check" (func $check (param i32)))
- (memory $0 0)
(func $just-one-block (; 1 ;) (type $v)
(local $0 i32)
(call $check
@@ -1020,5 +1019,4 @@
)
)
(module
- (memory $0 0)
)
diff --git a/test/export-import.wast.from-wast b/test/export-import.wast.from-wast
index 3675ae243..174101e7c 100644
--- a/test/export-import.wast.from-wast
+++ b/test/export-import.wast.from-wast
@@ -3,7 +3,6 @@
(type $FUNCSIG$v (func))
(import "env" "test1" (func $test1))
(import "env" "test2" (global $test2 i32))
- (memory $0 0)
(export "test1" (func $test1))
(export "test2" (global $test2))
)
diff --git a/test/export-import.wast.fromBinary b/test/export-import.wast.fromBinary
index 468498a94..f35d385f1 100644
--- a/test/export-import.wast.fromBinary
+++ b/test/export-import.wast.fromBinary
@@ -3,7 +3,6 @@
(type $1 (func))
(import "env" "test2" (global $import$1 i32))
(import "env" "test1" (func $test1))
- (memory $0 0)
(export "test1" (func $test1))
(export "test2" (global $import$1))
)
diff --git a/test/export-import.wast.fromBinary.noDebugInfo b/test/export-import.wast.fromBinary.noDebugInfo
index 562a51cc6..b9c712134 100644
--- a/test/export-import.wast.fromBinary.noDebugInfo
+++ b/test/export-import.wast.fromBinary.noDebugInfo
@@ -3,7 +3,6 @@
(type $1 (func))
(import "env" "test2" (global $import$1 i32))
(import "env" "test1" (func $import$0))
- (memory $0 0)
(export "test1" (func $import$0))
(export "test2" (global $import$1))
)
diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm
index 0e0b870c5..a98f6895d 100644
--- a/test/hello_world.fromasm
+++ b/test/hello_world.fromasm
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "hello_world.asm.js")
(export "add" (func $add))
(func $add (; 0 ;) (param $0 i32) (param $1 i32) (result i32)
diff --git a/test/hello_world.fromasm.clamp b/test/hello_world.fromasm.clamp
index 0e0b870c5..a98f6895d 100644
--- a/test/hello_world.fromasm.clamp
+++ b/test/hello_world.fromasm.clamp
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "hello_world.asm.js")
(export "add" (func $add))
(func $add (; 0 ;) (param $0 i32) (param $1 i32) (result i32)
diff --git a/test/hello_world.fromasm.imprecise b/test/hello_world.fromasm.imprecise
index ab998a5bd..3655a5039 100644
--- a/test/hello_world.fromasm.imprecise
+++ b/test/hello_world.fromasm.imprecise
@@ -1,8 +1,4 @@
(module
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(export "add" (func $add))
(func $add (; 0 ;) (param $0 i32) (param $1 i32) (result i32)
(i32.add
diff --git a/test/i64-setTempRet0.fromasm b/test/i64-setTempRet0.fromasm
index 10a29ea79..fe57c690d 100644
--- a/test/i64-setTempRet0.fromasm
+++ b/test/i64-setTempRet0.fromasm
@@ -1,12 +1,10 @@
(module
(type $FUNCSIG$j (func (result i64)))
(type $legaltype$illegalImportResult (func (result i32)))
- (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
- (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
+ (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(data (get_global $memoryBase) "i64-setTempRet0.asm.js")
(export "illegalResult" (func $legalstub$illegalResult))
diff --git a/test/i64-setTempRet0.fromasm.clamp b/test/i64-setTempRet0.fromasm.clamp
index 10a29ea79..fe57c690d 100644
--- a/test/i64-setTempRet0.fromasm.clamp
+++ b/test/i64-setTempRet0.fromasm.clamp
@@ -1,12 +1,10 @@
(module
(type $FUNCSIG$j (func (result i64)))
(type $legaltype$illegalImportResult (func (result i32)))
- (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
- (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
+ (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(data (get_global $memoryBase) "i64-setTempRet0.asm.js")
(export "illegalResult" (func $legalstub$illegalResult))
diff --git a/test/i64-setTempRet0.fromasm.clamp.no-opts b/test/i64-setTempRet0.fromasm.clamp.no-opts
index 71fecb26b..6ade6f2a8 100644
--- a/test/i64-setTempRet0.fromasm.clamp.no-opts
+++ b/test/i64-setTempRet0.fromasm.clamp.no-opts
@@ -1,12 +1,12 @@
(module
(type $FUNCSIG$j (func (result i64)))
(type $legaltype$illegalImportResult (func (result i32)))
- (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
- (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
+ (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(export "illegalResult" (func $legalstub$illegalResult))
(export "imports" (func $imports))
diff --git a/test/i64-setTempRet0.fromasm.imprecise b/test/i64-setTempRet0.fromasm.imprecise
index 0d010664f..63abc8aef 100644
--- a/test/i64-setTempRet0.fromasm.imprecise
+++ b/test/i64-setTempRet0.fromasm.imprecise
@@ -3,10 +3,6 @@
(type $legaltype$illegalImportResult (func (result i32)))
(import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $tempRet0 (mut i32) (i32.const 0))
(export "illegalResult" (func $legalstub$illegalResult))
(export "imports" (func $imports))
diff --git a/test/i64-setTempRet0.fromasm.imprecise.no-opts b/test/i64-setTempRet0.fromasm.imprecise.no-opts
index 71fecb26b..6ade6f2a8 100644
--- a/test/i64-setTempRet0.fromasm.imprecise.no-opts
+++ b/test/i64-setTempRet0.fromasm.imprecise.no-opts
@@ -1,12 +1,12 @@
(module
(type $FUNCSIG$j (func (result i64)))
(type $legaltype$illegalImportResult (func (result i32)))
- (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
- (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
+ (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(export "illegalResult" (func $legalstub$illegalResult))
(export "imports" (func $imports))
diff --git a/test/i64-setTempRet0.fromasm.no-opts b/test/i64-setTempRet0.fromasm.no-opts
index 71fecb26b..6ade6f2a8 100644
--- a/test/i64-setTempRet0.fromasm.no-opts
+++ b/test/i64-setTempRet0.fromasm.no-opts
@@ -1,12 +1,12 @@
(module
(type $FUNCSIG$j (func (result i64)))
(type $legaltype$illegalImportResult (func (result i32)))
- (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
- (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
+ (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(export "illegalResult" (func $legalstub$illegalResult))
(export "imports" (func $imports))
diff --git a/test/importedSignCast.fromasm b/test/importedSignCast.fromasm
index 8b1fa1e7e..bc08b3596 100644
--- a/test/importedSignCast.fromasm
+++ b/test/importedSignCast.fromasm
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
- (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 1 1 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(elem (get_global $tableBase) $gm)
(data (get_global $memoryBase) "importedSignCast.asm.js")
(export "func" (func $func))
diff --git a/test/importedSignCast.fromasm.clamp b/test/importedSignCast.fromasm.clamp
index 8b1fa1e7e..bc08b3596 100644
--- a/test/importedSignCast.fromasm.clamp
+++ b/test/importedSignCast.fromasm.clamp
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
- (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 1 1 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(elem (get_global $tableBase) $gm)
(data (get_global $memoryBase) "importedSignCast.asm.js")
(export "func" (func $func))
diff --git a/test/importedSignCast.fromasm.clamp.no-opts b/test/importedSignCast.fromasm.clamp.no-opts
index c7cb282e8..0637c7517 100644
--- a/test/importedSignCast.fromasm.clamp.no-opts
+++ b/test/importedSignCast.fromasm.clamp.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
- (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 1 1 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(elem (get_global $tableBase) $gm)
(export "func" (func $func))
(func $func (; 1 ;)
diff --git a/test/importedSignCast.fromasm.imprecise b/test/importedSignCast.fromasm.imprecise
index 3c6fc1405..ecf04c851 100644
--- a/test/importedSignCast.fromasm.imprecise
+++ b/test/importedSignCast.fromasm.imprecise
@@ -1,10 +1,8 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
- (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 1 1 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(elem (get_global $tableBase) $gm)
(export "func" (func $func))
(func $func (; 1 ;)
diff --git a/test/importedSignCast.fromasm.imprecise.no-opts b/test/importedSignCast.fromasm.imprecise.no-opts
index c7cb282e8..0637c7517 100644
--- a/test/importedSignCast.fromasm.imprecise.no-opts
+++ b/test/importedSignCast.fromasm.imprecise.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
- (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 1 1 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(elem (get_global $tableBase) $gm)
(export "func" (func $func))
(func $func (; 1 ;)
diff --git a/test/importedSignCast.fromasm.no-opts b/test/importedSignCast.fromasm.no-opts
index c7cb282e8..0637c7517 100644
--- a/test/importedSignCast.fromasm.no-opts
+++ b/test/importedSignCast.fromasm.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
- (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 1 1 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(elem (get_global $tableBase) $gm)
(export "func" (func $func))
(func $func (; 1 ;)
diff --git a/test/memorygrowth-minimal.asm.js b/test/memorygrowth-minimal.asm.js
new file mode 100644
index 000000000..148a22958
--- /dev/null
+++ b/test/memorygrowth-minimal.asm.js
@@ -0,0 +1,41 @@
+Module["asm"] = (function(global,env,buffer) {
+
+ "almost asm";
+ var a = global.Int8Array;
+ var b = global.Int16Array;
+ var c = global.Int32Array;
+ var d = global.Uint8Array;
+ var e = global.Uint16Array;
+ var f = global.Uint32Array;
+ var g = global.Float32Array;
+ var h = global.Float64Array;
+ var i = new a(buffer);
+ var j = new b(buffer);
+ var k = new c(buffer);
+ var l = new d(buffer);
+ var m = new e(buffer);
+ var n = new f(buffer);
+ var o = new g(buffer);
+ var p = new h(buffer);
+ var q = global.byteLength;
+
+ function replaceBuffer(newBuffer) {
+ if (q(newBuffer) & 16777215 || q(newBuffer) <= 16777215 || q(newBuffer) > 2147483648) return false;
+ i = new a(newBuffer);
+ j = new b(newBuffer);
+ k = new c(newBuffer);
+ l = new d(newBuffer);
+ m = new e(newBuffer);
+ n = new f(newBuffer);
+ o = new g(newBuffer);
+ p = new h(newBuffer);
+ buffer = newBuffer;
+ return true;
+ }
+ return {
+ _emscripten_replace_memory: replaceBuffer
+ };
+})
+
+
+;
diff --git a/test/memorygrowth-minimal.fromasm b/test/memorygrowth-minimal.fromasm
new file mode 100644
index 000000000..5c5b303b3
--- /dev/null
+++ b/test/memorygrowth-minimal.fromasm
@@ -0,0 +1,11 @@
+(module
+ (import "env" "memory" (memory $0 256))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $memoryBase) "memorygrowth-minimal.asm.js")
+ (export "__growWasmMemory" (func $__growWasmMemory))
+ (func $__growWasmMemory (; 0 ;) (param $0 i32) (result i32)
+ (grow_memory
+ (get_local $0)
+ )
+ )
+)
diff --git a/test/memorygrowth-minimal.fromasm.clamp b/test/memorygrowth-minimal.fromasm.clamp
new file mode 100644
index 000000000..5c5b303b3
--- /dev/null
+++ b/test/memorygrowth-minimal.fromasm.clamp
@@ -0,0 +1,11 @@
+(module
+ (import "env" "memory" (memory $0 256))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $memoryBase) "memorygrowth-minimal.asm.js")
+ (export "__growWasmMemory" (func $__growWasmMemory))
+ (func $__growWasmMemory (; 0 ;) (param $0 i32) (result i32)
+ (grow_memory
+ (get_local $0)
+ )
+ )
+)
diff --git a/test/memorygrowth-minimal.fromasm.clamp.no-opts b/test/memorygrowth-minimal.fromasm.clamp.no-opts
new file mode 100644
index 000000000..74edd247b
--- /dev/null
+++ b/test/memorygrowth-minimal.fromasm.clamp.no-opts
@@ -0,0 +1,12 @@
+(module
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
+ (export "__growWasmMemory" (func $__growWasmMemory))
+ (func $__growWasmMemory (; 0 ;) (param $newSize i32) (result i32)
+ (grow_memory
+ (get_local $newSize)
+ )
+ )
+)
diff --git a/test/memorygrowth-minimal.fromasm.imprecise b/test/memorygrowth-minimal.fromasm.imprecise
new file mode 100644
index 000000000..4f308717e
--- /dev/null
+++ b/test/memorygrowth-minimal.fromasm.imprecise
@@ -0,0 +1,9 @@
+(module
+ (import "env" "memory" (memory $0 256))
+ (export "__growWasmMemory" (func $__growWasmMemory))
+ (func $__growWasmMemory (; 0 ;) (param $0 i32) (result i32)
+ (grow_memory
+ (get_local $0)
+ )
+ )
+)
diff --git a/test/memorygrowth-minimal.fromasm.imprecise.no-opts b/test/memorygrowth-minimal.fromasm.imprecise.no-opts
new file mode 100644
index 000000000..74edd247b
--- /dev/null
+++ b/test/memorygrowth-minimal.fromasm.imprecise.no-opts
@@ -0,0 +1,12 @@
+(module
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
+ (export "__growWasmMemory" (func $__growWasmMemory))
+ (func $__growWasmMemory (; 0 ;) (param $newSize i32) (result i32)
+ (grow_memory
+ (get_local $newSize)
+ )
+ )
+)
diff --git a/test/memorygrowth-minimal.fromasm.no-opts b/test/memorygrowth-minimal.fromasm.no-opts
new file mode 100644
index 000000000..74edd247b
--- /dev/null
+++ b/test/memorygrowth-minimal.fromasm.no-opts
@@ -0,0 +1,12 @@
+(module
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
+ (export "__growWasmMemory" (func $__growWasmMemory))
+ (func $__growWasmMemory (; 0 ;) (param $newSize i32) (result i32)
+ (grow_memory
+ (get_local $newSize)
+ )
+ )
+)
diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm
index c556c8896..c807bf937 100644
--- a/test/memorygrowth.fromasm
+++ b/test/memorygrowth.fromasm
@@ -5,6 +5,10 @@
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 8 8 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "abort" (func $ja (param i32)))
@@ -19,10 +23,6 @@
(import "env" "___syscall54" (func $wa (param i32 i32) (result i32)))
(import "env" "___unlock" (func $xa (param i32)))
(import "env" "___syscall146" (func $ya (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256))
- (import "env" "table" (table 8 8 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $r (mut i32) (get_global $r$asm2wasm$import))
(global $s (mut i32) (get_global $s$asm2wasm$import))
(global $v (mut i32) (i32.const 0))
@@ -30,6 +30,7 @@
(global $K (mut i32) (i32.const 0))
(elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
(data (get_global $memoryBase) "memorygrowth.asm.js")
+ (export "__growWasmMemory" (func $__growWasmMemory))
(export "_free" (func $fb))
(export "_main" (func $Na))
(export "_pthread_self" (func $ib))
@@ -49,8 +50,12 @@
(export "dynCall_ii" (func $kb))
(export "dynCall_iiii" (func $lb))
(export "dynCall_vi" (func $mb))
- (export "__growWasmMemory" (func $__growWasmMemory))
- (func $eb (; 12 ;) (param $0 i32) (result i32)
+ (func $__growWasmMemory (; 12 ;) (param $0 i32) (result i32)
+ (grow_memory
+ (get_local $0)
+ )
+ )
+ (func $eb (; 13 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -5905,7 +5910,7 @@
(i32.const 8)
)
)
- (func $fb (; 13 ;) (param $0 i32)
+ (func $fb (; 14 ;) (param $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -7736,7 +7741,7 @@
(i32.const -1)
)
)
- (func $Ra (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Ra (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -8110,7 +8115,7 @@
)
(get_local $15)
)
- (func $Wa (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Wa (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -8322,7 +8327,7 @@
)
(get_local $4)
)
- (func $Za (; 16 ;) (param $0 i32) (result i32)
+ (func $Za (; 17 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -8466,7 +8471,7 @@
(get_local $3)
)
)
- (func $_a (; 17 ;) (param $0 i32) (result i32)
+ (func $_a (; 18 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(block $do-once
@@ -8603,7 +8608,7 @@
)
(get_local $1)
)
- (func $ab (; 18 ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $ab (; 19 ;) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -8752,7 +8757,7 @@
)
(get_local $4)
)
- (func $$a (; 19 ;) (param $0 i32) (result i32)
+ (func $$a (; 20 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -8887,7 +8892,7 @@
)
(get_local $2)
)
- (func $jb (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $jb (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(if
(i32.ge_s
@@ -9034,10 +9039,10 @@
)
(get_local $3)
)
- (func $gb (; 21 ;)
+ (func $gb (; 22 ;)
(nop)
)
- (func $hb (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $hb (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -9175,7 +9180,7 @@
(get_local $2)
)
)
- (func $db (; 23 ;) (param $0 i32) (result i32)
+ (func $db (; 24 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -9284,7 +9289,7 @@
(i32.const 31)
)
)
- (func $Xa (; 24 ;) (param $0 i32) (result i32)
+ (func $Xa (; 25 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(set_local $2
@@ -9362,7 +9367,7 @@
)
)
)
- (func $bb (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (func $bb (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(set_local $4
@@ -9428,7 +9433,7 @@
)
(get_local $2)
)
- (func $Ua (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Ua (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(set_local $4
@@ -9497,7 +9502,7 @@
)
(get_local $0)
)
- (func $Va (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Va (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(set_local $4
@@ -9567,7 +9572,7 @@
)
(get_local $3)
)
- (func $Oa (; 28 ;) (param $0 i32) (result i32)
+ (func $Oa (; 29 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(set_local $1
@@ -9600,7 +9605,7 @@
)
(get_local $0)
)
- (func $Pa (; 29 ;) (param $0 i32) (result i32)
+ (func $Pa (; 30 ;) (param $0 i32) (result i32)
(if (result i32)
(i32.gt_u
(get_local $0)
@@ -9619,7 +9624,7 @@
(get_local $0)
)
)
- (func $Qa (; 30 ;) (result i32)
+ (func $Qa (; 31 ;) (result i32)
(if (result i32)
(i32.load
(i32.const 1160)
@@ -9630,7 +9635,7 @@
(i32.const 1204)
)
)
- (func $lb (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (func $lb (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(call_indirect (type $FUNCSIG$iiii)
(get_local $1)
(get_local $2)
@@ -9644,7 +9649,7 @@
)
)
)
- (func $Ea (; 32 ;) (param $0 i32) (result i32)
+ (func $Ea (; 33 ;) (param $0 i32) (result i32)
(local $1 i32)
(set_local $1
(get_global $r)
@@ -9666,13 +9671,13 @@
)
(get_local $1)
)
- (func $ob (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $ob (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(call $ja
(i32.const 1)
)
(i32.const 0)
)
- (func $Ia (; 34 ;) (param $0 i32) (param $1 i32)
+ (func $Ia (; 35 ;) (param $0 i32) (param $1 i32)
(if
(i32.eqz
(get_global $v)
@@ -9687,7 +9692,7 @@
)
)
)
- (func $kb (; 35 ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $kb (; 36 ;) (param $0 i32) (param $1 i32) (result i32)
(call_indirect (type $FUNCSIG$ii)
(get_local $1)
(i32.and
@@ -9696,7 +9701,7 @@
)
)
)
- (func $Sa (; 36 ;) (param $0 i32)
+ (func $Sa (; 37 ;) (param $0 i32)
(if
(i32.eqz
(i32.load offset=68
@@ -9708,7 +9713,7 @@
)
)
)
- (func $mb (; 37 ;) (param $0 i32) (param $1 i32)
+ (func $mb (; 38 ;) (param $0 i32) (param $1 i32)
(call_indirect (type $FUNCSIG$vi)
(get_local $1)
(i32.add
@@ -9720,7 +9725,7 @@
)
)
)
- (func $Ha (; 38 ;) (param $0 i32) (param $1 i32)
+ (func $Ha (; 39 ;) (param $0 i32) (param $1 i32)
(set_global $r
(get_local $0)
)
@@ -9728,13 +9733,13 @@
(get_local $1)
)
)
- (func $nb (; 39 ;) (param $0 i32) (result i32)
+ (func $nb (; 40 ;) (param $0 i32) (result i32)
(call $ja
(i32.const 0)
)
(i32.const 0)
)
- (func $Na (; 40 ;) (result i32)
+ (func $Na (; 41 ;) (result i32)
(drop
(call $db
(i32.const 1144)
@@ -9742,39 +9747,34 @@
)
(i32.const 0)
)
- (func $Ya (; 41 ;) (param $0 i32) (result i32)
+ (func $Ya (; 42 ;) (param $0 i32) (result i32)
(i32.const 0)
)
- (func $Ta (; 42 ;) (param $0 i32)
+ (func $Ta (; 43 ;) (param $0 i32)
(nop)
)
- (func $pb (; 43 ;) (param $0 i32)
+ (func $pb (; 44 ;) (param $0 i32)
(call $ja
(i32.const 2)
)
)
- (func $La (; 44 ;) (param $0 i32)
+ (func $La (; 45 ;) (param $0 i32)
(set_global $K
(get_local $0)
)
)
- (func $Ga (; 45 ;) (param $0 i32)
+ (func $Ga (; 46 ;) (param $0 i32)
(set_global $r
(get_local $0)
)
)
- (func $Ma (; 46 ;) (result i32)
+ (func $Ma (; 47 ;) (result i32)
(get_global $K)
)
- (func $Fa (; 47 ;) (result i32)
+ (func $Fa (; 48 ;) (result i32)
(get_global $r)
)
- (func $ib (; 48 ;) (result i32)
+ (func $ib (; 49 ;) (result i32)
(i32.const 0)
)
- (func $__growWasmMemory (; 49 ;) (param $newSize i32) (result i32)
- (grow_memory
- (get_local $newSize)
- )
- )
)
diff --git a/test/memorygrowth.fromasm.clamp b/test/memorygrowth.fromasm.clamp
index c556c8896..c807bf937 100644
--- a/test/memorygrowth.fromasm.clamp
+++ b/test/memorygrowth.fromasm.clamp
@@ -5,6 +5,10 @@
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 8 8 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "abort" (func $ja (param i32)))
@@ -19,10 +23,6 @@
(import "env" "___syscall54" (func $wa (param i32 i32) (result i32)))
(import "env" "___unlock" (func $xa (param i32)))
(import "env" "___syscall146" (func $ya (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256))
- (import "env" "table" (table 8 8 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $r (mut i32) (get_global $r$asm2wasm$import))
(global $s (mut i32) (get_global $s$asm2wasm$import))
(global $v (mut i32) (i32.const 0))
@@ -30,6 +30,7 @@
(global $K (mut i32) (i32.const 0))
(elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
(data (get_global $memoryBase) "memorygrowth.asm.js")
+ (export "__growWasmMemory" (func $__growWasmMemory))
(export "_free" (func $fb))
(export "_main" (func $Na))
(export "_pthread_self" (func $ib))
@@ -49,8 +50,12 @@
(export "dynCall_ii" (func $kb))
(export "dynCall_iiii" (func $lb))
(export "dynCall_vi" (func $mb))
- (export "__growWasmMemory" (func $__growWasmMemory))
- (func $eb (; 12 ;) (param $0 i32) (result i32)
+ (func $__growWasmMemory (; 12 ;) (param $0 i32) (result i32)
+ (grow_memory
+ (get_local $0)
+ )
+ )
+ (func $eb (; 13 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -5905,7 +5910,7 @@
(i32.const 8)
)
)
- (func $fb (; 13 ;) (param $0 i32)
+ (func $fb (; 14 ;) (param $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -7736,7 +7741,7 @@
(i32.const -1)
)
)
- (func $Ra (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Ra (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -8110,7 +8115,7 @@
)
(get_local $15)
)
- (func $Wa (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Wa (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -8322,7 +8327,7 @@
)
(get_local $4)
)
- (func $Za (; 16 ;) (param $0 i32) (result i32)
+ (func $Za (; 17 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -8466,7 +8471,7 @@
(get_local $3)
)
)
- (func $_a (; 17 ;) (param $0 i32) (result i32)
+ (func $_a (; 18 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(block $do-once
@@ -8603,7 +8608,7 @@
)
(get_local $1)
)
- (func $ab (; 18 ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $ab (; 19 ;) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -8752,7 +8757,7 @@
)
(get_local $4)
)
- (func $$a (; 19 ;) (param $0 i32) (result i32)
+ (func $$a (; 20 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -8887,7 +8892,7 @@
)
(get_local $2)
)
- (func $jb (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $jb (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(if
(i32.ge_s
@@ -9034,10 +9039,10 @@
)
(get_local $3)
)
- (func $gb (; 21 ;)
+ (func $gb (; 22 ;)
(nop)
)
- (func $hb (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $hb (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -9175,7 +9180,7 @@
(get_local $2)
)
)
- (func $db (; 23 ;) (param $0 i32) (result i32)
+ (func $db (; 24 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -9284,7 +9289,7 @@
(i32.const 31)
)
)
- (func $Xa (; 24 ;) (param $0 i32) (result i32)
+ (func $Xa (; 25 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(set_local $2
@@ -9362,7 +9367,7 @@
)
)
)
- (func $bb (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (func $bb (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(set_local $4
@@ -9428,7 +9433,7 @@
)
(get_local $2)
)
- (func $Ua (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Ua (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(set_local $4
@@ -9497,7 +9502,7 @@
)
(get_local $0)
)
- (func $Va (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Va (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(set_local $4
@@ -9567,7 +9572,7 @@
)
(get_local $3)
)
- (func $Oa (; 28 ;) (param $0 i32) (result i32)
+ (func $Oa (; 29 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(set_local $1
@@ -9600,7 +9605,7 @@
)
(get_local $0)
)
- (func $Pa (; 29 ;) (param $0 i32) (result i32)
+ (func $Pa (; 30 ;) (param $0 i32) (result i32)
(if (result i32)
(i32.gt_u
(get_local $0)
@@ -9619,7 +9624,7 @@
(get_local $0)
)
)
- (func $Qa (; 30 ;) (result i32)
+ (func $Qa (; 31 ;) (result i32)
(if (result i32)
(i32.load
(i32.const 1160)
@@ -9630,7 +9635,7 @@
(i32.const 1204)
)
)
- (func $lb (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (func $lb (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(call_indirect (type $FUNCSIG$iiii)
(get_local $1)
(get_local $2)
@@ -9644,7 +9649,7 @@
)
)
)
- (func $Ea (; 32 ;) (param $0 i32) (result i32)
+ (func $Ea (; 33 ;) (param $0 i32) (result i32)
(local $1 i32)
(set_local $1
(get_global $r)
@@ -9666,13 +9671,13 @@
)
(get_local $1)
)
- (func $ob (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $ob (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(call $ja
(i32.const 1)
)
(i32.const 0)
)
- (func $Ia (; 34 ;) (param $0 i32) (param $1 i32)
+ (func $Ia (; 35 ;) (param $0 i32) (param $1 i32)
(if
(i32.eqz
(get_global $v)
@@ -9687,7 +9692,7 @@
)
)
)
- (func $kb (; 35 ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $kb (; 36 ;) (param $0 i32) (param $1 i32) (result i32)
(call_indirect (type $FUNCSIG$ii)
(get_local $1)
(i32.and
@@ -9696,7 +9701,7 @@
)
)
)
- (func $Sa (; 36 ;) (param $0 i32)
+ (func $Sa (; 37 ;) (param $0 i32)
(if
(i32.eqz
(i32.load offset=68
@@ -9708,7 +9713,7 @@
)
)
)
- (func $mb (; 37 ;) (param $0 i32) (param $1 i32)
+ (func $mb (; 38 ;) (param $0 i32) (param $1 i32)
(call_indirect (type $FUNCSIG$vi)
(get_local $1)
(i32.add
@@ -9720,7 +9725,7 @@
)
)
)
- (func $Ha (; 38 ;) (param $0 i32) (param $1 i32)
+ (func $Ha (; 39 ;) (param $0 i32) (param $1 i32)
(set_global $r
(get_local $0)
)
@@ -9728,13 +9733,13 @@
(get_local $1)
)
)
- (func $nb (; 39 ;) (param $0 i32) (result i32)
+ (func $nb (; 40 ;) (param $0 i32) (result i32)
(call $ja
(i32.const 0)
)
(i32.const 0)
)
- (func $Na (; 40 ;) (result i32)
+ (func $Na (; 41 ;) (result i32)
(drop
(call $db
(i32.const 1144)
@@ -9742,39 +9747,34 @@
)
(i32.const 0)
)
- (func $Ya (; 41 ;) (param $0 i32) (result i32)
+ (func $Ya (; 42 ;) (param $0 i32) (result i32)
(i32.const 0)
)
- (func $Ta (; 42 ;) (param $0 i32)
+ (func $Ta (; 43 ;) (param $0 i32)
(nop)
)
- (func $pb (; 43 ;) (param $0 i32)
+ (func $pb (; 44 ;) (param $0 i32)
(call $ja
(i32.const 2)
)
)
- (func $La (; 44 ;) (param $0 i32)
+ (func $La (; 45 ;) (param $0 i32)
(set_global $K
(get_local $0)
)
)
- (func $Ga (; 45 ;) (param $0 i32)
+ (func $Ga (; 46 ;) (param $0 i32)
(set_global $r
(get_local $0)
)
)
- (func $Ma (; 46 ;) (result i32)
+ (func $Ma (; 47 ;) (result i32)
(get_global $K)
)
- (func $Fa (; 47 ;) (result i32)
+ (func $Fa (; 48 ;) (result i32)
(get_global $r)
)
- (func $ib (; 48 ;) (result i32)
+ (func $ib (; 49 ;) (result i32)
(i32.const 0)
)
- (func $__growWasmMemory (; 49 ;) (param $newSize i32) (result i32)
- (grow_memory
- (get_local $newSize)
- )
- )
)
diff --git a/test/memorygrowth.fromasm.clamp.no-opts b/test/memorygrowth.fromasm.clamp.no-opts
index 46625f4b0..3c25e569e 100644
--- a/test/memorygrowth.fromasm.clamp.no-opts
+++ b/test/memorygrowth.fromasm.clamp.no-opts
@@ -5,6 +5,10 @@
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 8 8 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $t$asm2wasm$import i32))
@@ -23,10 +27,6 @@
(import "env" "___syscall54" (func $wa (param i32 i32) (result i32)))
(import "env" "___unlock" (func $xa (param i32)))
(import "env" "___syscall146" (func $ya (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256))
- (import "env" "table" (table 8 8 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $r (mut i32) (get_global $r$asm2wasm$import))
(global $s (mut i32) (get_global $s$asm2wasm$import))
(global $t (mut i32) (get_global $t$asm2wasm$import))
@@ -58,6 +58,7 @@
(global $T (mut i32) (i32.const 0))
(global $za (mut f64) (f64.const 0))
(elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (export "__growWasmMemory" (func $__growWasmMemory))
(export "_free" (func $fb))
(export "_main" (func $Na))
(export "_pthread_self" (func $ib))
@@ -77,8 +78,12 @@
(export "dynCall_ii" (func $kb))
(export "dynCall_iiii" (func $lb))
(export "dynCall_vi" (func $mb))
- (export "__growWasmMemory" (func $__growWasmMemory))
- (func $eb (; 12 ;) (param $a i32) (result i32)
+ (func $__growWasmMemory (; 12 ;) (param $newSize i32) (result i32)
+ (grow_memory
+ (get_local $newSize)
+ )
+ )
+ (func $eb (; 13 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -7094,7 +7099,7 @@
(get_local $p)
)
)
- (func $fb (; 13 ;) (param $a i32)
+ (func $fb (; 14 ;) (param $a i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -9286,7 +9291,7 @@
)
(return)
)
- (func $Ra (; 14 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Ra (; 15 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -9751,7 +9756,7 @@
(get_local $z)
)
)
- (func $Wa (; 15 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Wa (; 16 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -10020,7 +10025,7 @@
(get_local $h)
)
)
- (func $Za (; 16 ;) (param $a i32) (result i32)
+ (func $Za (; 17 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -10219,7 +10224,7 @@
)
)
)
- (func $_a (; 17 ;) (param $a i32) (result i32)
+ (func $_a (; 18 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -10414,7 +10419,7 @@
(get_local $h)
)
)
- (func $ab (; 18 ;) (param $a i32) (param $b i32) (result i32)
+ (func $ab (; 19 ;) (param $a i32) (param $b i32) (result i32)
(local $c i32)
(local $d i32)
(local $e i32)
@@ -10590,7 +10595,7 @@
(get_local $m)
)
)
- (func $$a (; 19 ;) (param $a i32) (result i32)
+ (func $$a (; 20 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -10745,7 +10750,7 @@
(get_local $d)
)
)
- (func $jb (; 20 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $jb (; 21 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(if
(i32.ge_s
@@ -10909,10 +10914,10 @@
(get_local $d)
)
)
- (func $gb (; 21 ;)
+ (func $gb (; 22 ;)
(nop)
)
- (func $hb (; 22 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $hb (; 23 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -11072,7 +11077,7 @@
)
)
)
- (func $db (; 23 ;) (param $a i32) (result i32)
+ (func $db (; 24 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -11195,7 +11200,7 @@
)
)
)
- (func $Xa (; 24 ;) (param $a i32) (result i32)
+ (func $Xa (; 25 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -11305,7 +11310,7 @@
(get_local $d)
)
)
- (func $i32u-div (; 25 ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $i32u-div (; 26 ;) (param $0 i32) (param $1 i32) (result i32)
(if (result i32)
(i32.eqz
(get_local $1)
@@ -11317,7 +11322,7 @@
)
)
)
- (func $bb (; 26 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
+ (func $bb (; 27 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
(local $e i32)
(local $f i32)
(local $g i32)
@@ -11397,7 +11402,7 @@
(get_local $i)
)
)
- (func $Ua (; 27 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Ua (; 28 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -11489,7 +11494,7 @@
(get_local $g)
)
)
- (func $Va (; 28 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Va (; 29 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(set_local $d
@@ -11576,7 +11581,7 @@
(get_local $e)
)
)
- (func $Ka (; 29 ;) (param $a i32)
+ (func $Ka (; 30 ;) (param $a i32)
(i32.store8
(get_global $t)
(i32.load8_s
@@ -11668,7 +11673,7 @@
)
)
)
- (func $Oa (; 30 ;) (param $a i32) (result i32)
+ (func $Oa (; 31 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(set_local $b
@@ -11707,7 +11712,7 @@
(get_local $a)
)
)
- (func $Pa (; 31 ;) (param $a i32) (result i32)
+ (func $Pa (; 32 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(if
@@ -11738,7 +11743,7 @@
(get_local $c)
)
)
- (func $Ja (; 32 ;) (param $a i32)
+ (func $Ja (; 33 ;) (param $a i32)
(i32.store8
(get_global $t)
(i32.load8_s
@@ -11782,7 +11787,7 @@
)
)
)
- (func $Qa (; 33 ;) (result i32)
+ (func $Qa (; 34 ;) (result i32)
(local $a i32)
(local $b i32)
(if
@@ -11812,7 +11817,7 @@
(get_local $a)
)
)
- (func $lb (; 34 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
+ (func $lb (; 35 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
(return
(call_indirect (type $FUNCSIG$iiii)
(get_local $b)
@@ -11828,7 +11833,7 @@
)
)
)
- (func $Ea (; 35 ;) (param $a i32) (result i32)
+ (func $Ea (; 36 ;) (param $a i32) (result i32)
(local $b i32)
(set_local $b
(get_global $r)
@@ -11852,7 +11857,7 @@
(get_local $b)
)
)
- (func $cb (; 36 ;) (param $a i32) (param $b i32) (result i32)
+ (func $cb (; 37 ;) (param $a i32) (param $b i32) (result i32)
(return
(i32.add
(call $bb
@@ -11867,7 +11872,7 @@
)
)
)
- (func $ob (; 37 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $ob (; 38 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(call $ja
(i32.const 1)
)
@@ -11875,7 +11880,7 @@
(i32.const 0)
)
)
- (func $Ia (; 38 ;) (param $a i32) (param $b i32)
+ (func $Ia (; 39 ;) (param $a i32) (param $b i32)
(if
(i32.eqz
(get_global $v)
@@ -11890,7 +11895,7 @@
)
)
)
- (func $kb (; 39 ;) (param $a i32) (param $b i32) (result i32)
+ (func $kb (; 40 ;) (param $a i32) (param $b i32) (result i32)
(return
(call_indirect (type $FUNCSIG$ii)
(get_local $b)
@@ -11904,7 +11909,7 @@
)
)
)
- (func $Sa (; 40 ;) (param $a i32)
+ (func $Sa (; 41 ;) (param $a i32)
(if
(i32.eqz
(i32.load
@@ -11920,7 +11925,7 @@
)
(return)
)
- (func $mb (; 41 ;) (param $a i32) (param $b i32)
+ (func $mb (; 42 ;) (param $a i32) (param $b i32)
(call_indirect (type $FUNCSIG$vi)
(get_local $b)
(i32.add
@@ -11932,7 +11937,7 @@
)
)
)
- (func $Ha (; 42 ;) (param $a i32) (param $b i32)
+ (func $Ha (; 43 ;) (param $a i32) (param $b i32)
(set_global $r
(get_local $a)
)
@@ -11940,7 +11945,7 @@
(get_local $b)
)
)
- (func $nb (; 43 ;) (param $a i32) (result i32)
+ (func $nb (; 44 ;) (param $a i32) (result i32)
(call $ja
(i32.const 0)
)
@@ -11948,7 +11953,7 @@
(i32.const 0)
)
)
- (func $Na (; 44 ;) (result i32)
+ (func $Na (; 45 ;) (result i32)
(drop
(call $db
(i32.const 1144)
@@ -11958,47 +11963,42 @@
(i32.const 0)
)
)
- (func $Ya (; 45 ;) (param $a i32) (result i32)
+ (func $Ya (; 46 ;) (param $a i32) (result i32)
(return
(i32.const 0)
)
)
- (func $Ta (; 46 ;) (param $a i32)
+ (func $Ta (; 47 ;) (param $a i32)
(return)
)
- (func $pb (; 47 ;) (param $a i32)
+ (func $pb (; 48 ;) (param $a i32)
(call $ja
(i32.const 2)
)
)
- (func $La (; 48 ;) (param $a i32)
+ (func $La (; 49 ;) (param $a i32)
(set_global $K
(get_local $a)
)
)
- (func $Ga (; 49 ;) (param $a i32)
+ (func $Ga (; 50 ;) (param $a i32)
(set_global $r
(get_local $a)
)
)
- (func $Ma (; 50 ;) (result i32)
+ (func $Ma (; 51 ;) (result i32)
(return
(get_global $K)
)
)
- (func $Fa (; 51 ;) (result i32)
+ (func $Fa (; 52 ;) (result i32)
(return
(get_global $r)
)
)
- (func $ib (; 52 ;) (result i32)
+ (func $ib (; 53 ;) (result i32)
(return
(i32.const 0)
)
)
- (func $__growWasmMemory (; 53 ;) (param $newSize i32) (result i32)
- (grow_memory
- (get_local $newSize)
- )
- )
)
diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise
index 522944903..bf23a9a1f 100644
--- a/test/memorygrowth.fromasm.imprecise
+++ b/test/memorygrowth.fromasm.imprecise
@@ -5,6 +5,9 @@
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 8 8 anyfunc))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "abort" (func $ja (param i32)))
@@ -19,16 +22,13 @@
(import "env" "___syscall54" (func $wa (param i32 i32) (result i32)))
(import "env" "___unlock" (func $xa (param i32)))
(import "env" "___syscall146" (func $ya (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256))
- (import "env" "table" (table 8 8 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $r (mut i32) (get_global $r$asm2wasm$import))
(global $s (mut i32) (get_global $s$asm2wasm$import))
(global $v (mut i32) (i32.const 0))
(global $w (mut i32) (i32.const 0))
(global $K (mut i32) (i32.const 0))
(elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (export "__growWasmMemory" (func $__growWasmMemory))
(export "_free" (func $fb))
(export "_main" (func $Na))
(export "_pthread_self" (func $ib))
@@ -48,8 +48,12 @@
(export "dynCall_ii" (func $kb))
(export "dynCall_iiii" (func $lb))
(export "dynCall_vi" (func $mb))
- (export "__growWasmMemory" (func $__growWasmMemory))
- (func $eb (; 12 ;) (param $0 i32) (result i32)
+ (func $__growWasmMemory (; 12 ;) (param $0 i32) (result i32)
+ (grow_memory
+ (get_local $0)
+ )
+ )
+ (func $eb (; 13 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -5904,7 +5908,7 @@
(i32.const 8)
)
)
- (func $fb (; 13 ;) (param $0 i32)
+ (func $fb (; 14 ;) (param $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -7735,7 +7739,7 @@
(i32.const -1)
)
)
- (func $Ra (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Ra (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -8109,7 +8113,7 @@
)
(get_local $15)
)
- (func $Wa (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Wa (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -8321,7 +8325,7 @@
)
(get_local $4)
)
- (func $Za (; 16 ;) (param $0 i32) (result i32)
+ (func $Za (; 17 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -8465,7 +8469,7 @@
(get_local $3)
)
)
- (func $_a (; 17 ;) (param $0 i32) (result i32)
+ (func $_a (; 18 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(block $do-once
@@ -8602,7 +8606,7 @@
)
(get_local $1)
)
- (func $ab (; 18 ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $ab (; 19 ;) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -8751,7 +8755,7 @@
)
(get_local $4)
)
- (func $$a (; 19 ;) (param $0 i32) (result i32)
+ (func $$a (; 20 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -8886,7 +8890,7 @@
)
(get_local $2)
)
- (func $jb (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $jb (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(if
(i32.ge_s
@@ -9033,10 +9037,10 @@
)
(get_local $3)
)
- (func $gb (; 21 ;)
+ (func $gb (; 22 ;)
(nop)
)
- (func $hb (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $hb (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -9174,7 +9178,7 @@
(get_local $2)
)
)
- (func $db (; 23 ;) (param $0 i32) (result i32)
+ (func $db (; 24 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@@ -9283,7 +9287,7 @@
(i32.const 31)
)
)
- (func $Xa (; 24 ;) (param $0 i32) (result i32)
+ (func $Xa (; 25 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(set_local $2
@@ -9361,7 +9365,7 @@
)
)
)
- (func $bb (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (func $bb (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(set_local $4
@@ -9423,7 +9427,7 @@
)
(get_local $2)
)
- (func $Ua (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Ua (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(set_local $4
@@ -9492,7 +9496,7 @@
)
(get_local $0)
)
- (func $Va (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $Va (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(set_local $4
@@ -9562,7 +9566,7 @@
)
(get_local $3)
)
- (func $Oa (; 28 ;) (param $0 i32) (result i32)
+ (func $Oa (; 29 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(set_local $1
@@ -9595,7 +9599,7 @@
)
(get_local $0)
)
- (func $Pa (; 29 ;) (param $0 i32) (result i32)
+ (func $Pa (; 30 ;) (param $0 i32) (result i32)
(if (result i32)
(i32.gt_u
(get_local $0)
@@ -9614,7 +9618,7 @@
(get_local $0)
)
)
- (func $Qa (; 30 ;) (result i32)
+ (func $Qa (; 31 ;) (result i32)
(if (result i32)
(i32.load
(i32.const 1160)
@@ -9625,7 +9629,7 @@
(i32.const 1204)
)
)
- (func $lb (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (func $lb (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(call_indirect (type $FUNCSIG$iiii)
(get_local $1)
(get_local $2)
@@ -9639,7 +9643,7 @@
)
)
)
- (func $Ea (; 32 ;) (param $0 i32) (result i32)
+ (func $Ea (; 33 ;) (param $0 i32) (result i32)
(local $1 i32)
(set_local $1
(get_global $r)
@@ -9661,13 +9665,13 @@
)
(get_local $1)
)
- (func $ob (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $ob (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(call $ja
(i32.const 1)
)
(i32.const 0)
)
- (func $Ia (; 34 ;) (param $0 i32) (param $1 i32)
+ (func $Ia (; 35 ;) (param $0 i32) (param $1 i32)
(if
(i32.eqz
(get_global $v)
@@ -9682,7 +9686,7 @@
)
)
)
- (func $kb (; 35 ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $kb (; 36 ;) (param $0 i32) (param $1 i32) (result i32)
(call_indirect (type $FUNCSIG$ii)
(get_local $1)
(i32.and
@@ -9691,7 +9695,7 @@
)
)
)
- (func $Sa (; 36 ;) (param $0 i32)
+ (func $Sa (; 37 ;) (param $0 i32)
(if
(i32.eqz
(i32.load offset=68
@@ -9703,7 +9707,7 @@
)
)
)
- (func $mb (; 37 ;) (param $0 i32) (param $1 i32)
+ (func $mb (; 38 ;) (param $0 i32) (param $1 i32)
(call_indirect (type $FUNCSIG$vi)
(get_local $1)
(i32.add
@@ -9715,7 +9719,7 @@
)
)
)
- (func $Ha (; 38 ;) (param $0 i32) (param $1 i32)
+ (func $Ha (; 39 ;) (param $0 i32) (param $1 i32)
(set_global $r
(get_local $0)
)
@@ -9723,13 +9727,13 @@
(get_local $1)
)
)
- (func $nb (; 39 ;) (param $0 i32) (result i32)
+ (func $nb (; 40 ;) (param $0 i32) (result i32)
(call $ja
(i32.const 0)
)
(i32.const 0)
)
- (func $Na (; 40 ;) (result i32)
+ (func $Na (; 41 ;) (result i32)
(drop
(call $db
(i32.const 1144)
@@ -9737,39 +9741,34 @@
)
(i32.const 0)
)
- (func $Ya (; 41 ;) (param $0 i32) (result i32)
+ (func $Ya (; 42 ;) (param $0 i32) (result i32)
(i32.const 0)
)
- (func $Ta (; 42 ;) (param $0 i32)
+ (func $Ta (; 43 ;) (param $0 i32)
(nop)
)
- (func $pb (; 43 ;) (param $0 i32)
+ (func $pb (; 44 ;) (param $0 i32)
(call $ja
(i32.const 2)
)
)
- (func $La (; 44 ;) (param $0 i32)
+ (func $La (; 45 ;) (param $0 i32)
(set_global $K
(get_local $0)
)
)
- (func $Ga (; 45 ;) (param $0 i32)
+ (func $Ga (; 46 ;) (param $0 i32)
(set_global $r
(get_local $0)
)
)
- (func $Ma (; 46 ;) (result i32)
+ (func $Ma (; 47 ;) (result i32)
(get_global $K)
)
- (func $Fa (; 47 ;) (result i32)
+ (func $Fa (; 48 ;) (result i32)
(get_global $r)
)
- (func $ib (; 48 ;) (result i32)
+ (func $ib (; 49 ;) (result i32)
(i32.const 0)
)
- (func $__growWasmMemory (; 49 ;) (param $newSize i32) (result i32)
- (grow_memory
- (get_local $newSize)
- )
- )
)
diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts
index 86256f15a..2c75f349f 100644
--- a/test/memorygrowth.fromasm.imprecise.no-opts
+++ b/test/memorygrowth.fromasm.imprecise.no-opts
@@ -5,6 +5,10 @@
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 8 8 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $t$asm2wasm$import i32))
@@ -23,10 +27,6 @@
(import "env" "___syscall54" (func $wa (param i32 i32) (result i32)))
(import "env" "___unlock" (func $xa (param i32)))
(import "env" "___syscall146" (func $ya (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256))
- (import "env" "table" (table 8 8 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $r (mut i32) (get_global $r$asm2wasm$import))
(global $s (mut i32) (get_global $s$asm2wasm$import))
(global $t (mut i32) (get_global $t$asm2wasm$import))
@@ -58,6 +58,7 @@
(global $T (mut i32) (i32.const 0))
(global $za (mut f64) (f64.const 0))
(elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (export "__growWasmMemory" (func $__growWasmMemory))
(export "_free" (func $fb))
(export "_main" (func $Na))
(export "_pthread_self" (func $ib))
@@ -77,8 +78,12 @@
(export "dynCall_ii" (func $kb))
(export "dynCall_iiii" (func $lb))
(export "dynCall_vi" (func $mb))
- (export "__growWasmMemory" (func $__growWasmMemory))
- (func $eb (; 12 ;) (param $a i32) (result i32)
+ (func $__growWasmMemory (; 12 ;) (param $newSize i32) (result i32)
+ (grow_memory
+ (get_local $newSize)
+ )
+ )
+ (func $eb (; 13 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -7094,7 +7099,7 @@
(get_local $p)
)
)
- (func $fb (; 13 ;) (param $a i32)
+ (func $fb (; 14 ;) (param $a i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -9286,7 +9291,7 @@
)
(return)
)
- (func $Ra (; 14 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Ra (; 15 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -9751,7 +9756,7 @@
(get_local $z)
)
)
- (func $Wa (; 15 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Wa (; 16 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -10020,7 +10025,7 @@
(get_local $h)
)
)
- (func $Za (; 16 ;) (param $a i32) (result i32)
+ (func $Za (; 17 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -10219,7 +10224,7 @@
)
)
)
- (func $_a (; 17 ;) (param $a i32) (result i32)
+ (func $_a (; 18 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -10414,7 +10419,7 @@
(get_local $h)
)
)
- (func $ab (; 18 ;) (param $a i32) (param $b i32) (result i32)
+ (func $ab (; 19 ;) (param $a i32) (param $b i32) (result i32)
(local $c i32)
(local $d i32)
(local $e i32)
@@ -10590,7 +10595,7 @@
(get_local $m)
)
)
- (func $$a (; 19 ;) (param $a i32) (result i32)
+ (func $$a (; 20 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -10745,7 +10750,7 @@
(get_local $d)
)
)
- (func $jb (; 20 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $jb (; 21 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(if
(i32.ge_s
@@ -10909,10 +10914,10 @@
(get_local $d)
)
)
- (func $gb (; 21 ;)
+ (func $gb (; 22 ;)
(nop)
)
- (func $hb (; 22 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $hb (; 23 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -11072,7 +11077,7 @@
)
)
)
- (func $db (; 23 ;) (param $a i32) (result i32)
+ (func $db (; 24 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -11195,7 +11200,7 @@
)
)
)
- (func $Xa (; 24 ;) (param $a i32) (result i32)
+ (func $Xa (; 25 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -11305,7 +11310,7 @@
(get_local $d)
)
)
- (func $bb (; 25 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
+ (func $bb (; 26 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
(local $e i32)
(local $f i32)
(local $g i32)
@@ -11385,7 +11390,7 @@
(get_local $i)
)
)
- (func $Ua (; 26 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Ua (; 27 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -11477,7 +11482,7 @@
(get_local $g)
)
)
- (func $Va (; 27 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Va (; 28 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(set_local $d
@@ -11564,7 +11569,7 @@
(get_local $e)
)
)
- (func $Ka (; 28 ;) (param $a i32)
+ (func $Ka (; 29 ;) (param $a i32)
(i32.store8
(get_global $t)
(i32.load8_s
@@ -11656,7 +11661,7 @@
)
)
)
- (func $Oa (; 29 ;) (param $a i32) (result i32)
+ (func $Oa (; 30 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(set_local $b
@@ -11695,7 +11700,7 @@
(get_local $a)
)
)
- (func $Pa (; 30 ;) (param $a i32) (result i32)
+ (func $Pa (; 31 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(if
@@ -11726,7 +11731,7 @@
(get_local $c)
)
)
- (func $Ja (; 31 ;) (param $a i32)
+ (func $Ja (; 32 ;) (param $a i32)
(i32.store8
(get_global $t)
(i32.load8_s
@@ -11770,7 +11775,7 @@
)
)
)
- (func $Qa (; 32 ;) (result i32)
+ (func $Qa (; 33 ;) (result i32)
(local $a i32)
(local $b i32)
(if
@@ -11800,7 +11805,7 @@
(get_local $a)
)
)
- (func $lb (; 33 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
+ (func $lb (; 34 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
(return
(call_indirect (type $FUNCSIG$iiii)
(get_local $b)
@@ -11816,7 +11821,7 @@
)
)
)
- (func $Ea (; 34 ;) (param $a i32) (result i32)
+ (func $Ea (; 35 ;) (param $a i32) (result i32)
(local $b i32)
(set_local $b
(get_global $r)
@@ -11840,7 +11845,7 @@
(get_local $b)
)
)
- (func $cb (; 35 ;) (param $a i32) (param $b i32) (result i32)
+ (func $cb (; 36 ;) (param $a i32) (param $b i32) (result i32)
(return
(i32.add
(call $bb
@@ -11855,7 +11860,7 @@
)
)
)
- (func $ob (; 36 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $ob (; 37 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(call $ja
(i32.const 1)
)
@@ -11863,7 +11868,7 @@
(i32.const 0)
)
)
- (func $Ia (; 37 ;) (param $a i32) (param $b i32)
+ (func $Ia (; 38 ;) (param $a i32) (param $b i32)
(if
(i32.eqz
(get_global $v)
@@ -11878,7 +11883,7 @@
)
)
)
- (func $kb (; 38 ;) (param $a i32) (param $b i32) (result i32)
+ (func $kb (; 39 ;) (param $a i32) (param $b i32) (result i32)
(return
(call_indirect (type $FUNCSIG$ii)
(get_local $b)
@@ -11892,7 +11897,7 @@
)
)
)
- (func $Sa (; 39 ;) (param $a i32)
+ (func $Sa (; 40 ;) (param $a i32)
(if
(i32.eqz
(i32.load
@@ -11908,7 +11913,7 @@
)
(return)
)
- (func $mb (; 40 ;) (param $a i32) (param $b i32)
+ (func $mb (; 41 ;) (param $a i32) (param $b i32)
(call_indirect (type $FUNCSIG$vi)
(get_local $b)
(i32.add
@@ -11920,7 +11925,7 @@
)
)
)
- (func $Ha (; 41 ;) (param $a i32) (param $b i32)
+ (func $Ha (; 42 ;) (param $a i32) (param $b i32)
(set_global $r
(get_local $a)
)
@@ -11928,7 +11933,7 @@
(get_local $b)
)
)
- (func $nb (; 42 ;) (param $a i32) (result i32)
+ (func $nb (; 43 ;) (param $a i32) (result i32)
(call $ja
(i32.const 0)
)
@@ -11936,7 +11941,7 @@
(i32.const 0)
)
)
- (func $Na (; 43 ;) (result i32)
+ (func $Na (; 44 ;) (result i32)
(drop
(call $db
(i32.const 1144)
@@ -11946,47 +11951,42 @@
(i32.const 0)
)
)
- (func $Ya (; 44 ;) (param $a i32) (result i32)
+ (func $Ya (; 45 ;) (param $a i32) (result i32)
(return
(i32.const 0)
)
)
- (func $Ta (; 45 ;) (param $a i32)
+ (func $Ta (; 46 ;) (param $a i32)
(return)
)
- (func $pb (; 46 ;) (param $a i32)
+ (func $pb (; 47 ;) (param $a i32)
(call $ja
(i32.const 2)
)
)
- (func $La (; 47 ;) (param $a i32)
+ (func $La (; 48 ;) (param $a i32)
(set_global $K
(get_local $a)
)
)
- (func $Ga (; 48 ;) (param $a i32)
+ (func $Ga (; 49 ;) (param $a i32)
(set_global $r
(get_local $a)
)
)
- (func $Ma (; 49 ;) (result i32)
+ (func $Ma (; 50 ;) (result i32)
(return
(get_global $K)
)
)
- (func $Fa (; 50 ;) (result i32)
+ (func $Fa (; 51 ;) (result i32)
(return
(get_global $r)
)
)
- (func $ib (; 51 ;) (result i32)
+ (func $ib (; 52 ;) (result i32)
(return
(i32.const 0)
)
)
- (func $__growWasmMemory (; 52 ;) (param $newSize i32) (result i32)
- (grow_memory
- (get_local $newSize)
- )
- )
)
diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts
index 46625f4b0..3c25e569e 100644
--- a/test/memorygrowth.fromasm.no-opts
+++ b/test/memorygrowth.fromasm.no-opts
@@ -5,6 +5,10 @@
(type $FUNCSIG$v (func))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 8 8 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $t$asm2wasm$import i32))
@@ -23,10 +27,6 @@
(import "env" "___syscall54" (func $wa (param i32 i32) (result i32)))
(import "env" "___unlock" (func $xa (param i32)))
(import "env" "___syscall146" (func $ya (param i32 i32) (result i32)))
- (import "env" "memory" (memory $0 256))
- (import "env" "table" (table 8 8 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $r (mut i32) (get_global $r$asm2wasm$import))
(global $s (mut i32) (get_global $s$asm2wasm$import))
(global $t (mut i32) (get_global $t$asm2wasm$import))
@@ -58,6 +58,7 @@
(global $T (mut i32) (i32.const 0))
(global $za (mut f64) (f64.const 0))
(elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (export "__growWasmMemory" (func $__growWasmMemory))
(export "_free" (func $fb))
(export "_main" (func $Na))
(export "_pthread_self" (func $ib))
@@ -77,8 +78,12 @@
(export "dynCall_ii" (func $kb))
(export "dynCall_iiii" (func $lb))
(export "dynCall_vi" (func $mb))
- (export "__growWasmMemory" (func $__growWasmMemory))
- (func $eb (; 12 ;) (param $a i32) (result i32)
+ (func $__growWasmMemory (; 12 ;) (param $newSize i32) (result i32)
+ (grow_memory
+ (get_local $newSize)
+ )
+ )
+ (func $eb (; 13 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -7094,7 +7099,7 @@
(get_local $p)
)
)
- (func $fb (; 13 ;) (param $a i32)
+ (func $fb (; 14 ;) (param $a i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -9286,7 +9291,7 @@
)
(return)
)
- (func $Ra (; 14 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Ra (; 15 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -9751,7 +9756,7 @@
(get_local $z)
)
)
- (func $Wa (; 15 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Wa (; 16 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -10020,7 +10025,7 @@
(get_local $h)
)
)
- (func $Za (; 16 ;) (param $a i32) (result i32)
+ (func $Za (; 17 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -10219,7 +10224,7 @@
)
)
)
- (func $_a (; 17 ;) (param $a i32) (result i32)
+ (func $_a (; 18 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -10414,7 +10419,7 @@
(get_local $h)
)
)
- (func $ab (; 18 ;) (param $a i32) (param $b i32) (result i32)
+ (func $ab (; 19 ;) (param $a i32) (param $b i32) (result i32)
(local $c i32)
(local $d i32)
(local $e i32)
@@ -10590,7 +10595,7 @@
(get_local $m)
)
)
- (func $$a (; 19 ;) (param $a i32) (result i32)
+ (func $$a (; 20 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -10745,7 +10750,7 @@
(get_local $d)
)
)
- (func $jb (; 20 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $jb (; 21 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(if
(i32.ge_s
@@ -10909,10 +10914,10 @@
(get_local $d)
)
)
- (func $gb (; 21 ;)
+ (func $gb (; 22 ;)
(nop)
)
- (func $hb (; 22 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $hb (; 23 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -11072,7 +11077,7 @@
)
)
)
- (func $db (; 23 ;) (param $a i32) (result i32)
+ (func $db (; 24 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -11195,7 +11200,7 @@
)
)
)
- (func $Xa (; 24 ;) (param $a i32) (result i32)
+ (func $Xa (; 25 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(local $d i32)
@@ -11305,7 +11310,7 @@
(get_local $d)
)
)
- (func $i32u-div (; 25 ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $i32u-div (; 26 ;) (param $0 i32) (param $1 i32) (result i32)
(if (result i32)
(i32.eqz
(get_local $1)
@@ -11317,7 +11322,7 @@
)
)
)
- (func $bb (; 26 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
+ (func $bb (; 27 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
(local $e i32)
(local $f i32)
(local $g i32)
@@ -11397,7 +11402,7 @@
(get_local $i)
)
)
- (func $Ua (; 27 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Ua (; 28 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(local $f i32)
@@ -11489,7 +11494,7 @@
(get_local $g)
)
)
- (func $Va (; 28 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $Va (; 29 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(local $d i32)
(local $e i32)
(set_local $d
@@ -11576,7 +11581,7 @@
(get_local $e)
)
)
- (func $Ka (; 29 ;) (param $a i32)
+ (func $Ka (; 30 ;) (param $a i32)
(i32.store8
(get_global $t)
(i32.load8_s
@@ -11668,7 +11673,7 @@
)
)
)
- (func $Oa (; 30 ;) (param $a i32) (result i32)
+ (func $Oa (; 31 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(set_local $b
@@ -11707,7 +11712,7 @@
(get_local $a)
)
)
- (func $Pa (; 31 ;) (param $a i32) (result i32)
+ (func $Pa (; 32 ;) (param $a i32) (result i32)
(local $b i32)
(local $c i32)
(if
@@ -11738,7 +11743,7 @@
(get_local $c)
)
)
- (func $Ja (; 32 ;) (param $a i32)
+ (func $Ja (; 33 ;) (param $a i32)
(i32.store8
(get_global $t)
(i32.load8_s
@@ -11782,7 +11787,7 @@
)
)
)
- (func $Qa (; 33 ;) (result i32)
+ (func $Qa (; 34 ;) (result i32)
(local $a i32)
(local $b i32)
(if
@@ -11812,7 +11817,7 @@
(get_local $a)
)
)
- (func $lb (; 34 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
+ (func $lb (; 35 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32)
(return
(call_indirect (type $FUNCSIG$iiii)
(get_local $b)
@@ -11828,7 +11833,7 @@
)
)
)
- (func $Ea (; 35 ;) (param $a i32) (result i32)
+ (func $Ea (; 36 ;) (param $a i32) (result i32)
(local $b i32)
(set_local $b
(get_global $r)
@@ -11852,7 +11857,7 @@
(get_local $b)
)
)
- (func $cb (; 36 ;) (param $a i32) (param $b i32) (result i32)
+ (func $cb (; 37 ;) (param $a i32) (param $b i32) (result i32)
(return
(i32.add
(call $bb
@@ -11867,7 +11872,7 @@
)
)
)
- (func $ob (; 37 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
+ (func $ob (; 38 ;) (param $a i32) (param $b i32) (param $c i32) (result i32)
(call $ja
(i32.const 1)
)
@@ -11875,7 +11880,7 @@
(i32.const 0)
)
)
- (func $Ia (; 38 ;) (param $a i32) (param $b i32)
+ (func $Ia (; 39 ;) (param $a i32) (param $b i32)
(if
(i32.eqz
(get_global $v)
@@ -11890,7 +11895,7 @@
)
)
)
- (func $kb (; 39 ;) (param $a i32) (param $b i32) (result i32)
+ (func $kb (; 40 ;) (param $a i32) (param $b i32) (result i32)
(return
(call_indirect (type $FUNCSIG$ii)
(get_local $b)
@@ -11904,7 +11909,7 @@
)
)
)
- (func $Sa (; 40 ;) (param $a i32)
+ (func $Sa (; 41 ;) (param $a i32)
(if
(i32.eqz
(i32.load
@@ -11920,7 +11925,7 @@
)
(return)
)
- (func $mb (; 41 ;) (param $a i32) (param $b i32)
+ (func $mb (; 42 ;) (param $a i32) (param $b i32)
(call_indirect (type $FUNCSIG$vi)
(get_local $b)
(i32.add
@@ -11932,7 +11937,7 @@
)
)
)
- (func $Ha (; 42 ;) (param $a i32) (param $b i32)
+ (func $Ha (; 43 ;) (param $a i32) (param $b i32)
(set_global $r
(get_local $a)
)
@@ -11940,7 +11945,7 @@
(get_local $b)
)
)
- (func $nb (; 43 ;) (param $a i32) (result i32)
+ (func $nb (; 44 ;) (param $a i32) (result i32)
(call $ja
(i32.const 0)
)
@@ -11948,7 +11953,7 @@
(i32.const 0)
)
)
- (func $Na (; 44 ;) (result i32)
+ (func $Na (; 45 ;) (result i32)
(drop
(call $db
(i32.const 1144)
@@ -11958,47 +11963,42 @@
(i32.const 0)
)
)
- (func $Ya (; 45 ;) (param $a i32) (result i32)
+ (func $Ya (; 46 ;) (param $a i32) (result i32)
(return
(i32.const 0)
)
)
- (func $Ta (; 46 ;) (param $a i32)
+ (func $Ta (; 47 ;) (param $a i32)
(return)
)
- (func $pb (; 47 ;) (param $a i32)
+ (func $pb (; 48 ;) (param $a i32)
(call $ja
(i32.const 2)
)
)
- (func $La (; 48 ;) (param $a i32)
+ (func $La (; 49 ;) (param $a i32)
(set_global $K
(get_local $a)
)
)
- (func $Ga (; 49 ;) (param $a i32)
+ (func $Ga (; 50 ;) (param $a i32)
(set_global $r
(get_local $a)
)
)
- (func $Ma (; 50 ;) (result i32)
+ (func $Ma (; 51 ;) (result i32)
(return
(get_global $K)
)
)
- (func $Fa (; 51 ;) (result i32)
+ (func $Fa (; 52 ;) (result i32)
(return
(get_global $r)
)
)
- (func $ib (; 52 ;) (result i32)
+ (func $ib (; 53 ;) (result i32)
(return
(i32.const 0)
)
)
- (func $__growWasmMemory (; 53 ;) (param $newSize i32) (result i32)
- (grow_memory
- (get_local $newSize)
- )
- )
)
diff --git a/test/merge/post-instantiate-a.wast.combined b/test/merge/post-instantiate-a.wast.combined
index 23ff598af..ae25b3e75 100644
--- a/test/merge/post-instantiate-a.wast.combined
+++ b/test/merge/post-instantiate-a.wast.combined
@@ -5,8 +5,6 @@
(import "env" "tableBase" (global $tableBase i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
- (memory $0 0)
- (data (get_global $memoryBase) "")
(export "__post_instantiate" (func $0))
(func $0 (; 0 ;) (type $0)
(drop
diff --git a/test/merge/post-instantiate-a.wast.combined.finalized b/test/merge/post-instantiate-a.wast.combined.finalized
index edd0d85e3..ae25b3e75 100644
--- a/test/merge/post-instantiate-a.wast.combined.finalized
+++ b/test/merge/post-instantiate-a.wast.combined.finalized
@@ -5,8 +5,6 @@
(import "env" "tableBase" (global $tableBase i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
- (memory $0 1)
- (data (i32.const 1024) "")
(export "__post_instantiate" (func $0))
(func $0 (; 0 ;) (type $0)
(drop
diff --git a/test/merge/post-instantiate-a.wast.combined.finalized.opt b/test/merge/post-instantiate-a.wast.combined.finalized.opt
index 38b293167..0fd96ee6e 100644
--- a/test/merge/post-instantiate-a.wast.combined.finalized.opt
+++ b/test/merge/post-instantiate-a.wast.combined.finalized.opt
@@ -1,7 +1,5 @@
(module
(type $0 (func))
- (memory $0 1)
- (data (i32.const 1024) "")
(export "__post_instantiate" (func $0))
(func $0 (; 0 ;) (type $0)
(nop)
diff --git a/test/merge/post-instantiate-a.wast.combined.opt b/test/merge/post-instantiate-a.wast.combined.opt
index 8d0f05db2..933ee2c2c 100644
--- a/test/merge/post-instantiate-a.wast.combined.opt
+++ b/test/merge/post-instantiate-a.wast.combined.opt
@@ -2,8 +2,6 @@
(type $0 (func))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
- (memory $0 0)
- (data (get_global $memoryBase) "")
(export "__post_instantiate" (func $0))
(func $0 (; 0 ;) (type $0)
(nop)
diff --git a/test/merge/post-instantiate-b.wast.combined b/test/merge/post-instantiate-b.wast.combined
index 74f4ede17..f832716a9 100644
--- a/test/merge/post-instantiate-b.wast.combined
+++ b/test/merge/post-instantiate-b.wast.combined
@@ -5,8 +5,6 @@
(import "env" "tableBase" (global $tableBase i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
- (memory $0 0)
- (data (get_global $memoryBase) "")
(export "__post_instantiate" (func $0$0))
(func $0 (; 0 ;) (type $0)
(nop)
diff --git a/test/merge/post-instantiate-b.wast.combined.finalized b/test/merge/post-instantiate-b.wast.combined.finalized
index b9ec7cba5..f832716a9 100644
--- a/test/merge/post-instantiate-b.wast.combined.finalized
+++ b/test/merge/post-instantiate-b.wast.combined.finalized
@@ -5,8 +5,6 @@
(import "env" "tableBase" (global $tableBase i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
- (memory $0 1)
- (data (i32.const 1024) "")
(export "__post_instantiate" (func $0$0))
(func $0 (; 0 ;) (type $0)
(nop)
diff --git a/test/merge/post-instantiate-b.wast.combined.finalized.opt b/test/merge/post-instantiate-b.wast.combined.finalized.opt
index 749a6a74e..8c173a5b4 100644
--- a/test/merge/post-instantiate-b.wast.combined.finalized.opt
+++ b/test/merge/post-instantiate-b.wast.combined.finalized.opt
@@ -1,7 +1,5 @@
(module
(type $0$0 (func))
- (memory $0 1)
- (data (i32.const 1024) "")
(export "__post_instantiate" (func $0$0))
(func $0$0 (; 0 ;) (type $0$0)
(nop)
diff --git a/test/merge/post-instantiate-b.wast.combined.opt b/test/merge/post-instantiate-b.wast.combined.opt
index f52546012..8ec2a5ca8 100644
--- a/test/merge/post-instantiate-b.wast.combined.opt
+++ b/test/merge/post-instantiate-b.wast.combined.opt
@@ -2,8 +2,6 @@
(type $0$0 (func))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
- (memory $0 0)
- (data (get_global $memoryBase) "")
(export "__post_instantiate" (func $0$0))
(func $0$0 (; 0 ;) (type $0$0)
(nop)
diff --git a/test/metadce/all-outside.wast.dced b/test/metadce/all-outside.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/all-outside.wast.dced
+++ b/test/metadce/all-outside.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)
diff --git a/test/metadce/corners.wast.dced b/test/metadce/corners.wast.dced
index cf6346877..772b38653 100644
--- a/test/metadce/corners.wast.dced
+++ b/test/metadce/corners.wast.dced
@@ -6,7 +6,6 @@
(import "env" "table" (table 10 10 anyfunc))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(elem (i32.const 0) $imported_table_func)
- (memory $0 0)
(export "stackAlloc" (func $stackAlloc))
(func $stackAlloc (; 2 ;) (type $FUNCSIG$v)
(drop
diff --git a/test/metadce/no-outside.wast.dced b/test/metadce/no-outside.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/no-outside.wast.dced
+++ b/test/metadce/no-outside.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)
diff --git a/test/metadce/rooted-export.wast.dced b/test/metadce/rooted-export.wast.dced
index 6648c2791..a66014133 100644
--- a/test/metadce/rooted-export.wast.dced
+++ b/test/metadce/rooted-export.wast.dced
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(export "wasm_func_b" (func $b_wasm_func))
(func $b_wasm_func (; 0 ;) (type $0)
(unreachable)
diff --git a/test/metadce/spanning_cycle.wast.dced b/test/metadce/spanning_cycle.wast.dced
index 9d2b4ced3..74c4eb4a5 100644
--- a/test/metadce/spanning_cycle.wast.dced
+++ b/test/metadce/spanning_cycle.wast.dced
@@ -1,7 +1,6 @@
(module
(type $FUNCSIG$v (func))
(import "env" "js_func" (func $a_js_func))
- (memory $0 0)
(export "wasm_func_a" (func $a_wasm_func))
(func $a_wasm_func (; 1 ;) (type $FUNCSIG$v)
(call $a_js_func)
diff --git a/test/metadce/spanning_cycle_unrooted.wast.dced b/test/metadce/spanning_cycle_unrooted.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/spanning_cycle_unrooted.wast.dced
+++ b/test/metadce/spanning_cycle_unrooted.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)
diff --git a/test/metadce/threaded.wast.dced b/test/metadce/threaded.wast.dced
index 1122cb536..1ee6158a5 100644
--- a/test/metadce/threaded.wast.dced
+++ b/test/metadce/threaded.wast.dced
@@ -3,7 +3,6 @@
(import "env" "js_func2" (func $js_func_2))
(import "env" "js_func3" (func $js_func_3))
(import "env" "js_func4" (func $js_func_4))
- (memory $0 0)
(export "wasm_func1" (func $wasm_func_1))
(export "wasm_func2" (func $wasm_func_2))
(export "wasm_func3" (func $wasm_func_3))
diff --git a/test/metadce/threaded_cycle.wast.dced b/test/metadce/threaded_cycle.wast.dced
index b73266fcc..34e299b8c 100644
--- a/test/metadce/threaded_cycle.wast.dced
+++ b/test/metadce/threaded_cycle.wast.dced
@@ -4,7 +4,6 @@
(import "env" "js_func2" (func $js_func_2))
(import "env" "js_func3" (func $js_func_3))
(import "env" "js_func4" (func $js_func_4))
- (memory $0 0)
(export "wasm_func1" (func $wasm_func_1))
(export "wasm_func2" (func $wasm_func_2))
(export "wasm_func3" (func $wasm_func_3))
diff --git a/test/metadce/threaded_unrooted.wast.dced b/test/metadce/threaded_unrooted.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/threaded_unrooted.wast.dced
+++ b/test/metadce/threaded_unrooted.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)
diff --git a/test/metadce/threaded_unrooted_cycle.wast.dced b/test/metadce/threaded_unrooted_cycle.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/threaded_unrooted_cycle.wast.dced
+++ b/test/metadce/threaded_unrooted_cycle.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)
diff --git a/test/min.fromasm b/test/min.fromasm
index ecee68833..726093972 100644
--- a/test/min.fromasm
+++ b/test/min.fromasm
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $M (mut i32) (i32.const 0))
(data (get_global $memoryBase) "min.asm.js")
(export "floats" (func $legalstub$floats))
diff --git a/test/min.fromasm.clamp b/test/min.fromasm.clamp
index ecee68833..726093972 100644
--- a/test/min.fromasm.clamp
+++ b/test/min.fromasm.clamp
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $M (mut i32) (i32.const 0))
(data (get_global $memoryBase) "min.asm.js")
(export "floats" (func $legalstub$floats))
diff --git a/test/min.fromasm.clamp.no-opts b/test/min.fromasm.clamp.no-opts
index 02579216d..7586e5fc2 100644
--- a/test/min.fromasm.clamp.no-opts
+++ b/test/min.fromasm.clamp.no-opts
@@ -1,9 +1,9 @@
(module
- (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32))
(global $tDP (mut i32) (get_global $tDP$asm2wasm$import))
(global $M (mut i32) (i32.const 0))
(export "floats" (func $legalstub$floats))
diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise
index 37a1416ff..f3f43112b 100644
--- a/test/min.fromasm.imprecise
+++ b/test/min.fromasm.imprecise
@@ -1,8 +1,5 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $M (mut i32) (i32.const 0))
(export "floats" (func $legalstub$floats))
(export "getTempRet0" (func $ub))
diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts
index 02579216d..7586e5fc2 100644
--- a/test/min.fromasm.imprecise.no-opts
+++ b/test/min.fromasm.imprecise.no-opts
@@ -1,9 +1,9 @@
(module
- (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32))
(global $tDP (mut i32) (get_global $tDP$asm2wasm$import))
(global $M (mut i32) (i32.const 0))
(export "floats" (func $legalstub$floats))
diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts
index 02579216d..7586e5fc2 100644
--- a/test/min.fromasm.no-opts
+++ b/test/min.fromasm.no-opts
@@ -1,9 +1,9 @@
(module
- (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32))
(global $tDP (mut i32) (get_global $tDP$asm2wasm$import))
(global $M (mut i32) (i32.const 0))
(export "floats" (func $legalstub$floats))
diff --git a/test/noffi_f32.fromasm b/test/noffi_f32.fromasm
index bc91cd66b..00ca4dc3d 100644
--- a/test/noffi_f32.fromasm
+++ b/test/noffi_f32.fromasm
@@ -1,10 +1,8 @@
(module
(type $FUNCSIG$ff (func (param f32) (result f32)))
- (import "env" "_importf" (func $importf (param f32) (result f32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importf" (func $importf (param f32) (result f32)))
(data (get_global $memoryBase) "noffi_f32.asm.js")
(export "main" (func $main))
(export "exportf" (func $exportf))
diff --git a/test/noffi_f32.fromasm.clamp b/test/noffi_f32.fromasm.clamp
index bc91cd66b..00ca4dc3d 100644
--- a/test/noffi_f32.fromasm.clamp
+++ b/test/noffi_f32.fromasm.clamp
@@ -1,10 +1,8 @@
(module
(type $FUNCSIG$ff (func (param f32) (result f32)))
- (import "env" "_importf" (func $importf (param f32) (result f32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importf" (func $importf (param f32) (result f32)))
(data (get_global $memoryBase) "noffi_f32.asm.js")
(export "main" (func $main))
(export "exportf" (func $exportf))
diff --git a/test/noffi_f32.fromasm.clamp.no-opts b/test/noffi_f32.fromasm.clamp.no-opts
index 2dce4dbaa..1e600b0f0 100644
--- a/test/noffi_f32.fromasm.clamp.no-opts
+++ b/test/noffi_f32.fromasm.clamp.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$ff (func (param f32) (result f32)))
- (import "env" "_importf" (func $importf (param f32) (result f32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importf" (func $importf (param f32) (result f32)))
(export "main" (func $main))
(export "exportf" (func $exportf))
(func $exportf (; 1 ;) (param $a f32) (result f32)
diff --git a/test/noffi_f32.fromasm.imprecise b/test/noffi_f32.fromasm.imprecise
index 94c518385..85fc2b07c 100644
--- a/test/noffi_f32.fromasm.imprecise
+++ b/test/noffi_f32.fromasm.imprecise
@@ -1,10 +1,6 @@
(module
(type $FUNCSIG$ff (func (param f32) (result f32)))
(import "env" "_importf" (func $importf (param f32) (result f32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(export "main" (func $main))
(export "exportf" (func $exportf))
(func $exportf (; 1 ;) (param $0 f32) (result f32)
diff --git a/test/noffi_f32.fromasm.imprecise.no-opts b/test/noffi_f32.fromasm.imprecise.no-opts
index 2dce4dbaa..1e600b0f0 100644
--- a/test/noffi_f32.fromasm.imprecise.no-opts
+++ b/test/noffi_f32.fromasm.imprecise.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$ff (func (param f32) (result f32)))
- (import "env" "_importf" (func $importf (param f32) (result f32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importf" (func $importf (param f32) (result f32)))
(export "main" (func $main))
(export "exportf" (func $exportf))
(func $exportf (; 1 ;) (param $a f32) (result f32)
diff --git a/test/noffi_f32.fromasm.no-opts b/test/noffi_f32.fromasm.no-opts
index 2dce4dbaa..1e600b0f0 100644
--- a/test/noffi_f32.fromasm.no-opts
+++ b/test/noffi_f32.fromasm.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$ff (func (param f32) (result f32)))
- (import "env" "_importf" (func $importf (param f32) (result f32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importf" (func $importf (param f32) (result f32)))
(export "main" (func $main))
(export "exportf" (func $exportf))
(func $exportf (; 1 ;) (param $a f32) (result f32)
diff --git a/test/noffi_i64.fromasm b/test/noffi_i64.fromasm
index fd179943c..1254149fa 100644
--- a/test/noffi_i64.fromasm
+++ b/test/noffi_i64.fromasm
@@ -1,10 +1,8 @@
(module
(type $FUNCSIG$jj (func (param i64) (result i64)))
- (import "env" "_importll" (func $importll (param i64) (result i64)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importll" (func $importll (param i64) (result i64)))
(data (get_global $memoryBase) "noffi_i64.asm.js")
(export "_add" (func $add))
(export "_main" (func $main))
diff --git a/test/noffi_i64.fromasm.clamp b/test/noffi_i64.fromasm.clamp
index fd179943c..1254149fa 100644
--- a/test/noffi_i64.fromasm.clamp
+++ b/test/noffi_i64.fromasm.clamp
@@ -1,10 +1,8 @@
(module
(type $FUNCSIG$jj (func (param i64) (result i64)))
- (import "env" "_importll" (func $importll (param i64) (result i64)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importll" (func $importll (param i64) (result i64)))
(data (get_global $memoryBase) "noffi_i64.asm.js")
(export "_add" (func $add))
(export "_main" (func $main))
diff --git a/test/noffi_i64.fromasm.clamp.no-opts b/test/noffi_i64.fromasm.clamp.no-opts
index 20eb477d2..905c2727d 100644
--- a/test/noffi_i64.fromasm.clamp.no-opts
+++ b/test/noffi_i64.fromasm.clamp.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$jj (func (param i64) (result i64)))
- (import "env" "_importll" (func $importll (param i64) (result i64)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importll" (func $importll (param i64) (result i64)))
(export "_add" (func $add))
(export "_main" (func $main))
(func $add (; 1 ;) (param $a i64) (param $b i64) (result i64)
diff --git a/test/noffi_i64.fromasm.imprecise b/test/noffi_i64.fromasm.imprecise
index 014bcaec0..8eb41d2b8 100644
--- a/test/noffi_i64.fromasm.imprecise
+++ b/test/noffi_i64.fromasm.imprecise
@@ -1,10 +1,6 @@
(module
(type $FUNCSIG$jj (func (param i64) (result i64)))
(import "env" "_importll" (func $importll (param i64) (result i64)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(export "_add" (func $add))
(export "_main" (func $main))
(func $add (; 1 ;) (param $0 i64) (param $1 i64) (result i64)
diff --git a/test/noffi_i64.fromasm.imprecise.no-opts b/test/noffi_i64.fromasm.imprecise.no-opts
index 20eb477d2..905c2727d 100644
--- a/test/noffi_i64.fromasm.imprecise.no-opts
+++ b/test/noffi_i64.fromasm.imprecise.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$jj (func (param i64) (result i64)))
- (import "env" "_importll" (func $importll (param i64) (result i64)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importll" (func $importll (param i64) (result i64)))
(export "_add" (func $add))
(export "_main" (func $main))
(func $add (; 1 ;) (param $a i64) (param $b i64) (result i64)
diff --git a/test/noffi_i64.fromasm.no-opts b/test/noffi_i64.fromasm.no-opts
index 20eb477d2..905c2727d 100644
--- a/test/noffi_i64.fromasm.no-opts
+++ b/test/noffi_i64.fromasm.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$jj (func (param i64) (result i64)))
- (import "env" "_importll" (func $importll (param i64) (result i64)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "_importll" (func $importll (param i64) (result i64)))
(export "_add" (func $add))
(export "_main" (func $main))
(func $add (; 1 ;) (param $a i64) (param $b i64) (result i64)
diff --git a/test/passes/O.bin.txt b/test/passes/O.bin.txt
index 1b74f5db4..d1f85899f 100644
--- a/test/passes/O.bin.txt
+++ b/test/passes/O.bin.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func (param i64) (result i64)))
- (memory $0 0)
(export "fac-rec" (func $0))
(export "fac-rec-named" (func $1))
(export "fac-iter" (func $2))
diff --git a/test/passes/O.txt b/test/passes/O.txt
index 7a4f76084..390f0783b 100644
--- a/test/passes/O.txt
+++ b/test/passes/O.txt
@@ -1,7 +1,6 @@
(module
(type $0 (func (result i32)))
(type $1 (func (param i64)))
- (memory $0 0)
(export "ret" (func $ret))
(export "waka" (func $if-0-unreachable-to-none))
(func $ret (; 0 ;) (type $0) (result i32)
diff --git a/test/passes/code-pushing_ignore-implicit-traps.txt b/test/passes/code-pushing_ignore-implicit-traps.txt
index 58b124ec9..5558504c8 100644
--- a/test/passes/code-pushing_ignore-implicit-traps.txt
+++ b/test/passes/code-pushing_ignore-implicit-traps.txt
@@ -1,7 +1,6 @@
(module
(type $0 (func))
(type $1 (func (result i32)))
- (memory $0 0)
(func $push1 (; 0 ;) (type $0)
(local $x i32)
(block $out
diff --git a/test/passes/const-hoisting.txt b/test/passes/const-hoisting.txt
index e878e3f72..130f3214c 100644
--- a/test/passes/const-hoisting.txt
+++ b/test/passes/const-hoisting.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $10-of-each (; 0 ;) (type $0)
(local $0 i32)
(local $1 i32)
diff --git a/test/passes/dce.txt b/test/passes/dce.txt
index cdcf7035c..6f2422b2a 100644
--- a/test/passes/dce.txt
+++ b/test/passes/dce.txt
@@ -482,7 +482,6 @@
(module
(type $0 (func))
(global $global (mut f64) (f64.const 0))
- (memory $0 0)
(func $0 (; 0 ;) (type $0)
(if
(i32.const 0)
@@ -493,7 +492,6 @@
)
(module
(type $0 (func))
- (memory $0 0)
(func $0 (; 0 ;) (type $0)
(local $local f64)
(if
diff --git a/test/passes/dce_vacuum.bin.txt b/test/passes/dce_vacuum.bin.txt
index 8e41656b4..45c69f17b 100644
--- a/test/passes/dce_vacuum.bin.txt
+++ b/test/passes/dce_vacuum.bin.txt
@@ -1,7 +1,6 @@
(module
(type $0 (func (param f32 f32) (result f32)))
(type $1 (func (param f64 f64) (result f64)))
- (memory $0 0)
(export "f32.compute_radix" (func $0))
(export "f64.compute_radix" (func $1))
(func $0 (; 0 ;) (type $0) (param $var$0 f32) (param $var$1 f32) (result f32)
diff --git a/test/passes/dce_vacuum.txt b/test/passes/dce_vacuum.txt
index 6ee0a7876..d162979de 100644
--- a/test/passes/dce_vacuum.txt
+++ b/test/passes/dce_vacuum.txt
@@ -2,7 +2,6 @@
(type $0 (func (result i32)))
(type $1 (func (param f32 f32) (result f32)))
(type $2 (func (param i64) (result i64)))
- (memory $0 0)
(func $__Z12serveroptionPc (; 0 ;) (type $0) (result i32)
(return
(i32.const 0)
diff --git a/test/passes/flatten.bin.txt b/test/passes/flatten.bin.txt
index c035ebe4a..bc406e1ae 100644
--- a/test/passes/flatten.bin.txt
+++ b/test/passes/flatten.bin.txt
@@ -9,7 +9,6 @@
(type $7 (func (param f64) (result f64)))
(type $8 (func (param i64 f32 f64 i32 i32)))
(type $9 (func (param i64 f32 f64 i32 i32) (result f64)))
- (memory $0 0)
(export "type-local-i32" (func $0))
(export "type-local-i64" (func $1))
(export "type-local-f32" (func $2))
diff --git a/test/passes/flatten_rereloop.txt b/test/passes/flatten_rereloop.txt
index 587124191..efab836c8 100644
--- a/test/passes/flatten_rereloop.txt
+++ b/test/passes/flatten_rereloop.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func (result f64)))
- (memory $0 0)
(func $0 (; 0 ;) (type $0) (result f64)
(local $0 f64)
(local $1 f64)
@@ -45,7 +44,6 @@
)
(module
(type $0 (func (result i32)))
- (memory $0 0)
(func $0 (; 0 ;) (type $0) (result i32)
(local $0 i32)
(local $1 i32)
diff --git a/test/passes/fuzz-exec.txt b/test/passes/fuzz-exec.txt
index 7d3ae35c0..926803150 100644
--- a/test/passes/fuzz-exec.txt
+++ b/test/passes/fuzz-exec.txt
@@ -7,7 +7,6 @@
(module
(type $0 (func (result i32)))
(type $1 (func (result i64)))
- (memory $0 0)
(export "a" (func $a))
(export "b" (func $b))
(export "c" (func $c))
diff --git a/test/passes/inlining-optimizing.txt b/test/passes/inlining-optimizing.txt
index e01882716..d4de780d5 100644
--- a/test/passes/inlining-optimizing.txt
+++ b/test/passes/inlining-optimizing.txt
@@ -5,7 +5,6 @@
(type $3 (func (param f32 i64)))
(table 1 1 anyfunc)
(elem (i32.const 0) $tabled)
- (memory $0 0)
(export "user" (func $user))
(export "exported" (func $exported))
(func $user (; 0 ;) (type $0)
@@ -36,7 +35,6 @@
(module
(type $0 (func (result i32)))
(type $1 (func))
- (memory $0 0)
(func $main (; 0 ;) (type $0) (result i32)
(unreachable)
)
diff --git a/test/passes/inlining.txt b/test/passes/inlining.txt
index 8a195b96d..e1e47176f 100644
--- a/test/passes/inlining.txt
+++ b/test/passes/inlining.txt
@@ -5,7 +5,6 @@
(type $3 (func (param f32 i64)))
(table 1 1 anyfunc)
(elem (i32.const 0) $tabled)
- (memory $0 0)
(export "user" (func $user))
(export "exported" (func $exported))
(func $user (; 0 ;) (type $0)
@@ -142,7 +141,6 @@
(module
(type $0 (func (param i32) (result i32)))
(type $1 (func (result i32)))
- (memory $0 0)
(func $child (; 0 ;) (type $0) (param $0 i32) (result i32)
(i32.const 1234)
)
@@ -222,7 +220,6 @@
(type $T (func (param i32)))
(type $1 (func))
(table 10 anyfunc)
- (memory $0 0)
(func $0 (; 0 ;) (type $1)
(block $__inlined_func$1
(call_indirect (type $T)
@@ -238,7 +235,6 @@
)
(module
(type $0 (func))
- (memory $0 0)
(func $1 (; 0 ;) (type $0)
(block $__inlined_func$0
(block $label$1
diff --git a/test/passes/inlining_optimize-level=3.txt b/test/passes/inlining_optimize-level=3.txt
index 238aaa9d2..b245396c7 100644
--- a/test/passes/inlining_optimize-level=3.txt
+++ b/test/passes/inlining_optimize-level=3.txt
@@ -3,7 +3,6 @@
(type $1 (func))
(table 1 1 anyfunc)
(elem (i32.const 0) $no-loops-but-one-use-but-tabled)
- (memory $0 0)
(export "yes" (func $yes))
(export "no-loops-but-one-use-but-exported" (func $no-loops-but-one-use-but-exported))
(func $yes (; 0 ;) (type $0) (result i32)
diff --git a/test/passes/instrument-locals.txt b/test/passes/instrument-locals.txt
index 26f04d083..9703fcc50 100644
--- a/test/passes/instrument-locals.txt
+++ b/test/passes/instrument-locals.txt
@@ -12,7 +12,6 @@
(import "instrument" "set_i64" (func $set_i64 (param i32 i32 i64) (result i64)))
(import "instrument" "set_f32" (func $set_f32 (param i32 i32 f32) (result f32)))
(import "instrument" "set_f64" (func $set_f64 (param i32 i32 f64) (result f64)))
- (memory $0 0)
(func $A (; 8 ;) (type $0)
(local $x i32)
(local $y i64)
diff --git a/test/passes/log-execution.txt b/test/passes/log-execution.txt
index e756385ab..f09346a31 100644
--- a/test/passes/log-execution.txt
+++ b/test/passes/log-execution.txt
@@ -3,7 +3,6 @@
(type $1 (func (result i32)))
(type $FUNCSIG$vi (func (param i32)))
(import "env" "log_execution" (func $log_execution (param i32)))
- (memory $0 0)
(func $nopp (; 1 ;) (type $0)
(call $log_execution
(i32.const 0)
diff --git a/test/passes/merge-blocks.txt b/test/passes/merge-blocks.txt
index b5be6f2cf..8a74ed895 100644
--- a/test/passes/merge-blocks.txt
+++ b/test/passes/merge-blocks.txt
@@ -2,7 +2,6 @@
(type $0 (func))
(type $1 (func (param i32)))
(type $2 (func (result i32)))
- (memory $0 0)
(func $drop-block (; 0 ;) (type $0)
(block $block
(block $x
diff --git a/test/passes/merge-locals.txt b/test/passes/merge-locals.txt
index 21a71af4c..8d30ec119 100644
--- a/test/passes/merge-locals.txt
+++ b/test/passes/merge-locals.txt
@@ -4,7 +4,6 @@
(type $2 (func (param i32 f32 f32) (result i64)))
(type $3 (func (param i32 i32 i32)))
(global $global$0 (mut i32) (i32.const 10))
- (memory $0 0)
(func $test (; 0 ;) (type $0) (param $x i32) (param $y i32) (result i32)
(drop
(if (result i32)
diff --git a/test/passes/metrics.txt b/test/passes/metrics.txt
index fd8aa790f..9041f36fe 100644
--- a/test/passes/metrics.txt
+++ b/test/passes/metrics.txt
@@ -61,5 +61,4 @@ Counts
[total] : 0
[vars] : 0
(module
- (memory $0 0)
)
diff --git a/test/passes/pick-load-signs.txt b/test/passes/pick-load-signs.txt
index 24b955857..828841c96 100644
--- a/test/passes/pick-load-signs.txt
+++ b/test/passes/pick-load-signs.txt
@@ -1,7 +1,6 @@
(module
(type $0 (func))
(type $1 (func (result i32)))
- (memory $0 0)
(func $a (; 0 ;) (type $0)
(local $y i32)
(set_local $y
diff --git a/test/passes/precompute-propagate.txt b/test/passes/precompute-propagate.txt
index 4477b2294..262b4880c 100644
--- a/test/passes/precompute-propagate.txt
+++ b/test/passes/precompute-propagate.txt
@@ -1,7 +1,6 @@
(module
(type $0 (func (param i32)))
(type $1 (func (param i32) (result i32)))
- (memory $0 0)
(func $basic (; 0 ;) (type $0) (param $p i32)
(local $x i32)
(set_local $x
diff --git a/test/passes/precompute_coalesce-locals_vacuum.txt b/test/passes/precompute_coalesce-locals_vacuum.txt
index 9113fd97e..a4d1ce982 100644
--- a/test/passes/precompute_coalesce-locals_vacuum.txt
+++ b/test/passes/precompute_coalesce-locals_vacuum.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func (param i32) (result i32)))
- (memory $0 0)
(func $nested-br_if-value (; 0 ;) (type $0) (param $0 i32) (result i32)
(loop $label$0
(br $label$0)
diff --git a/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt b/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt
index be58b2f90..25adbdb64 100644
--- a/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt
+++ b/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt
@@ -1,7 +1,6 @@
(module
(type $0 (func (param i32) (result f64)))
(global $global$3 (mut f64) (f64.const 0))
- (memory $0 0)
(func $1 (; 0 ;) (type $0) (param $x i32) (result f64)
(local $var$0 f64)
(block $label$0 (result f64)
diff --git a/test/passes/remove-unused-module-elements.txt b/test/passes/remove-unused-module-elements.txt
index a577c187c..7bd274d56 100644
--- a/test/passes/remove-unused-module-elements.txt
+++ b/test/passes/remove-unused-module-elements.txt
@@ -80,8 +80,129 @@
)
)
(module
+)
+(module
+)
+(module
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 1 anyfunc))
+ (export "mem" (memory $0))
+ (export "tab" (table $0))
+)
+(module
+ (type $0 (func))
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 1 anyfunc))
+ (elem (i32.const 0) $waka)
+ (data (i32.const 1) "hello, world!")
+ (func $waka (; 0 ;) (type $0)
+ (nop)
+ )
+)
+(module
+ (type $0 (func))
(import "env" "memory" (memory $0 256))
(import "env" "table" (table 0 anyfunc))
+ (export "user" (func $user))
+ (func $user (; 0 ;) (type $0)
+ (drop
+ (i32.load
+ (i32.const 0)
+ )
+ )
+ (call_indirect (type $0)
+ (i32.const 0)
+ )
+ )
+)
+(module
+ (type $0 (func))
+ (memory $0 (shared 23 256))
+ (export "user" (func $user))
+ (func $user (; 0 ;) (type $0)
+ (i32.store
+ (i32.const 0)
+ (i32.const 0)
+ )
+ )
+)
+(module
+ (type $0 (func (result i32)))
+ (memory $0 (shared 23 256))
+ (export "user" (func $user))
+ (func $user (; 0 ;) (type $0) (result i32)
+ (i32.atomic.rmw.add
+ (i32.const 0)
+ (i32.const 0)
+ )
+ )
+)
+(module
+ (type $0 (func (result i32)))
+ (memory $0 (shared 23 256))
+ (export "user" (func $user))
+ (func $user (; 0 ;) (type $0) (result i32)
+ (i32.atomic.rmw8_u.cmpxchg
+ (i32.const 0)
+ (i32.const 0)
+ (i32.const 0)
+ )
+ )
+)
+(module
+ (type $0 (func))
+ (memory $0 (shared 23 256))
+ (export "user" (func $user))
+ (func $user (; 0 ;) (type $0)
+ (local $0 i32)
+ (local $1 i64)
+ (drop
+ (i32.wait
+ (get_local $0)
+ (get_local $0)
+ (get_local $1)
+ )
+ )
+ )
+)
+(module
+ (type $0 (func (result i32)))
+ (memory $0 (shared 23 256))
+ (export "user" (func $user))
+ (func $user (; 0 ;) (type $0) (result i32)
+ (wake
+ (i32.const 0)
+ (i32.const 0)
+ )
+ )
+)
+(module
+ (type $0 (func (result i32)))
+ (memory $0 23 256)
+ (export "user" (func $user))
+ (func $user (; 0 ;) (type $0) (result i32)
+ (grow_memory
+ (i32.const 0)
+ )
+ )
+)
+(module
+ (type $0 (func (result i32)))
+ (import "env" "memory" (memory $0 256))
+ (export "user" (func $user))
+ (func $user (; 0 ;) (type $0) (result i32)
+ (grow_memory
+ (i32.const 0)
+ )
+ )
+)
+(module
+ (type $0 (func (result i32)))
+ (memory $0 23 256)
+ (export "user" (func $user))
+ (func $user (; 0 ;) (type $0) (result i32)
+ (current_memory)
+ )
)
(module
(type $0 (func))
@@ -104,7 +225,6 @@
(global $int (mut i32) (get_global $imported))
(global $set (mut i32) (i32.const 100))
(global $exp_glob i32 (i32.const 600))
- (memory $0 0)
(export "one" (func $one))
(export "three" (func $three))
(export "exp_glob" (global $exp_glob))
diff --git a/test/passes/remove-unused-module-elements.wast b/test/passes/remove-unused-module-elements.wast
index 4dfb9300f..e1a704355 100644
--- a/test/passes/remove-unused-module-elements.wast
+++ b/test/passes/remove-unused-module-elements.wast
@@ -69,10 +69,101 @@
(unreachable)
)
)
-(module ;; leave the table and memory alone
+(module ;; remove the table and memory
(import "env" "memory" (memory $0 256))
(import "env" "table" (table 0 anyfunc))
)
+(module ;; also when not imported
+ (memory 256)
+ (table 1 anyfunc)
+)
+(module ;; but not when exported
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 1 anyfunc))
+ (export "mem" (memory 0))
+ (export "tab" (table 0))
+)
+(module ;; and not when there are segments
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 1 anyfunc))
+ (data (i32.const 1) "hello, world!")
+ (elem (i32.const 0) $waka)
+ (func $waka)
+)
+(module ;; and not when used
+ (type $0 (func))
+ (import "env" "memory" (memory $0 256))
+ (import "env" "table" (table 0 anyfunc))
+ (export "user" $user)
+ (func $user
+ (drop (i32.load (i32.const 0)))
+ (call_indirect (type $0) (i32.const 0))
+ )
+)
+(module ;; more use checks
+ (memory $0 (shared 23 256))
+ (export "user" $user)
+ (func $user
+ (i32.store (i32.const 0) (i32.const 0))
+ )
+)
+(module ;; more use checks
+ (memory $0 (shared 23 256))
+ (export "user" $user)
+ (func $user (result i32)
+ (i32.atomic.rmw.add (i32.const 0) (i32.const 0))
+ )
+)
+(module ;; more use checks
+ (memory $0 (shared 23 256))
+ (export "user" $user)
+ (func $user (result i32)
+ (i32.atomic.rmw8_u.cmpxchg (i32.const 0) (i32.const 0) (i32.const 0))
+ )
+)
+(module ;; more use checks
+ (memory $0 (shared 23 256))
+ (export "user" $user)
+ (func $user
+ (local $0 i32)
+ (local $1 i64)
+ (drop
+ (i32.wait
+ (get_local $0)
+ (get_local $0)
+ (get_local $1)
+ )
+ )
+ )
+)
+(module ;; more use checks
+ (memory $0 (shared 23 256))
+ (export "user" $user)
+ (func $user (result i32)
+ (wake (i32.const 0) (i32.const 0))
+ )
+)
+(module ;; more use checks
+ (memory $0 23 256)
+ (export "user" $user)
+ (func $user (result i32)
+ (grow_memory (i32.const 0))
+ )
+)
+(module ;; more use checks
+ (import "env" "memory" (memory $0 256))
+ (export "user" $user)
+ (func $user (result i32)
+ (grow_memory (i32.const 0))
+ )
+)
+(module ;; more use checks
+ (memory $0 23 256)
+ (export "user" $user)
+ (func $user (result i32)
+ (current_memory)
+ )
+)
(module
(import "env" "memory" (memory $0 256))
(import "env" "table" (table 0 anyfunc))
diff --git a/test/passes/remove-unused-names_code-folding.txt b/test/passes/remove-unused-names_code-folding.txt
index c037c95ef..5f5b30e7e 100644
--- a/test/passes/remove-unused-names_code-folding.txt
+++ b/test/passes/remove-unused-names_code-folding.txt
@@ -2,7 +2,6 @@
(type $0 (func))
(type $1 (func (param i32 i32) (result i32)))
(type $2 (func (result i32)))
- (memory $0 0)
(func $ifs (; 0 ;) (type $0)
(if
(i32.const 0)
diff --git a/test/passes/remove-unused-names_vacuum.txt b/test/passes/remove-unused-names_vacuum.txt
index e02fa3e9e..07b41cf13 100644
--- a/test/passes/remove-unused-names_vacuum.txt
+++ b/test/passes/remove-unused-names_vacuum.txt
@@ -1,7 +1,6 @@
(module
(type $0 (func (result i32)))
(type $1 (func))
- (memory $0 0)
(func $return-i32-but-body-is-unreachable3 (; 0 ;) (type $0) (result i32)
(local $label i32)
(loop $while-in$1
diff --git a/test/passes/rereloop.txt b/test/passes/rereloop.txt
index 52f088594..8d5c3eaef 100644
--- a/test/passes/rereloop.txt
+++ b/test/passes/rereloop.txt
@@ -3,7 +3,6 @@
(type $1 (func (result i32)))
(type $2 (func (param i32) (result i32)))
(type $3 (func (param i32)))
- (memory $0 0)
(func $trivial (; 0 ;) (type $0)
(local $0 i32)
(block
@@ -761,7 +760,6 @@
(type $0 (func))
(type $1 (func (result i32)))
(global $global$0 (mut i32) (i32.const 1))
- (memory $0 0)
(export "one" (func $0))
(export "two" (func $1))
(func $0 (; 0 ;) (type $0)
diff --git a/test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt b/test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt
index 6aecee123..f46805f2e 100644
--- a/test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt
+++ b/test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt
@@ -3,7 +3,6 @@
(type $1 (func (result i32)))
(type $2 (func (param i32) (result i32)))
(type $3 (func (param i32)))
- (memory $0 0)
(func $trivial (; 0 ;) (type $0)
(nop)
)
diff --git a/test/passes/rse.txt b/test/passes/rse.txt
index 017616cce..ba31b58cc 100644
--- a/test/passes/rse.txt
+++ b/test/passes/rse.txt
@@ -3,7 +3,6 @@
(type $1 (func (param i32)))
(type $2 (func))
(type $3 (func (param i32 i32)))
- (memory $0 0)
(func $basic (; 0 ;) (type $0) (param $x i32) (param $y f64)
(local $a f32)
(local $b i64)
diff --git a/test/passes/simplify-locals-nostructure.txt b/test/passes/simplify-locals-nostructure.txt
index b94d681fc..4b1d1002a 100644
--- a/test/passes/simplify-locals-nostructure.txt
+++ b/test/passes/simplify-locals-nostructure.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $contrast (; 0 ;) (type $0)
(local $x i32)
(local $y i32)
diff --git a/test/passes/simplify-locals-notee-nostructure.txt b/test/passes/simplify-locals-notee-nostructure.txt
index 9133ed092..fc88d14d6 100644
--- a/test/passes/simplify-locals-notee-nostructure.txt
+++ b/test/passes/simplify-locals-notee-nostructure.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $contrast (; 0 ;) (type $0)
(local $x i32)
(local $y i32)
diff --git a/test/passes/simplify-locals-notee.txt b/test/passes/simplify-locals-notee.txt
index 57b8e19c4..b6855d235 100644
--- a/test/passes/simplify-locals-notee.txt
+++ b/test/passes/simplify-locals-notee.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $contrast (; 0 ;) (type $0)
(local $x i32)
(local $y i32)
diff --git a/test/passes/ssa.txt b/test/passes/ssa.txt
index 1370e4096..657ccc128 100644
--- a/test/passes/ssa.txt
+++ b/test/passes/ssa.txt
@@ -3,7 +3,6 @@
(type $1 (func))
(type $2 (func (result i32)))
(global $global$0 (mut i32) (i32.const 1))
- (memory $0 0)
(func $basics (; 0 ;) (type $0) (param $x i32)
(local $y i32)
(local $z f32)
diff --git a/test/passes/trap-mode-clamp.txt b/test/passes/trap-mode-clamp.txt
index 6bed7c829..69a2312c9 100644
--- a/test/passes/trap-mode-clamp.txt
+++ b/test/passes/trap-mode-clamp.txt
@@ -2,7 +2,6 @@
(type $0 (func (param i32 i64)))
(type $1 (func (param f32)))
(type $2 (func (param f64)))
- (memory $0 0)
(func $test_div (; 0 ;) (type $0) (param $0 i32) (param $1 i64)
(drop
(call $i32s-div
diff --git a/test/passes/trap-mode-js.txt b/test/passes/trap-mode-js.txt
index 82221b1a9..5a1ca36f1 100644
--- a/test/passes/trap-mode-js.txt
+++ b/test/passes/trap-mode-js.txt
@@ -4,7 +4,6 @@
(type $2 (func (param f64)))
(type $FUNCSIG$id (func (param f64) (result i32)))
(import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
- (memory $0 0)
(func $test_div (; 1 ;) (type $0) (param $0 i32) (param $1 i64)
(drop
(call $i32s-div
diff --git a/test/passes/untee.txt b/test/passes/untee.txt
index 176e77897..c3299ddf8 100644
--- a/test/passes/untee.txt
+++ b/test/passes/untee.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $tee (; 0 ;) (type $0)
(local $x i32)
(local $y f64)
diff --git a/test/passes/vacuum_ignore-implicit-traps.txt b/test/passes/vacuum_ignore-implicit-traps.txt
index 085f37914..46db916c8 100644
--- a/test/passes/vacuum_ignore-implicit-traps.txt
+++ b/test/passes/vacuum_ignore-implicit-traps.txt
@@ -1,7 +1,6 @@
(module
(type $0 (func (result i32)))
(type $1 (func))
- (memory $0 0)
(func $load-would-normally-have-side-effects (; 0 ;) (type $0) (result i32)
(i64.ge_s
(i64.const 2912825531628789796)
diff --git a/test/passes/vacuum_remove-unused-names_merge-blocks.txt b/test/passes/vacuum_remove-unused-names_merge-blocks.txt
index 3cc085e0b..716ff66b2 100644
--- a/test/passes/vacuum_remove-unused-names_merge-blocks.txt
+++ b/test/passes/vacuum_remove-unused-names_merge-blocks.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func (param i32) (result i32)))
- (memory $0 0)
(func $return-block (; 0 ;) (type $0) (param $x i32) (result i32)
(set_local $x
(get_local $x)
diff --git a/test/polymorphic_stack.wast.from-wast b/test/polymorphic_stack.wast.from-wast
index f58d04ca8..a0eb1172a 100644
--- a/test/polymorphic_stack.wast.from-wast
+++ b/test/polymorphic_stack.wast.from-wast
@@ -4,7 +4,6 @@
(type $2 (func (param i32)))
(type $3 (func))
(import "env" "table" (table 9 9 anyfunc))
- (memory $0 0)
(func $break-and-binary (; 0 ;) (type $1) (result i32)
(block $x (result i32)
(f32.add
diff --git a/test/polymorphic_stack.wast.fromBinary b/test/polymorphic_stack.wast.fromBinary
index 10348a8e0..9d4ee909c 100644
--- a/test/polymorphic_stack.wast.fromBinary
+++ b/test/polymorphic_stack.wast.fromBinary
@@ -4,7 +4,6 @@
(type $2 (func (param i32)))
(type $3 (func))
(import "env" "table" (table 9 9 anyfunc))
- (memory $0 0)
(func $break-and-binary (; 0 ;) (type $1) (result i32)
(block $label$1 (result i32)
(unreachable)
diff --git a/test/polymorphic_stack.wast.fromBinary.noDebugInfo b/test/polymorphic_stack.wast.fromBinary.noDebugInfo
index a360a2fe3..6a7a97774 100644
--- a/test/polymorphic_stack.wast.fromBinary.noDebugInfo
+++ b/test/polymorphic_stack.wast.fromBinary.noDebugInfo
@@ -4,7 +4,6 @@
(type $2 (func (param i32)))
(type $3 (func))
(import "env" "table" (table 9 9 anyfunc))
- (memory $0 0)
(func $0 (; 0 ;) (type $1) (result i32)
(block $label$1 (result i32)
(unreachable)
diff --git a/test/reduce/destructive.wast.txt b/test/reduce/destructive.wast.txt
index d58f0ed7a..05a3d3118 100644
--- a/test/reduce/destructive.wast.txt
+++ b/test/reduce/destructive.wast.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func (param i32) (result i32)))
- (memory $0 0)
(export "x" (func $0))
(func $0 (; 0 ;) (type $0) (param $var$0 i32) (result i32)
(i32.const 100)
diff --git a/test/reduce/simple.wast.txt b/test/reduce/simple.wast.txt
index 9c162a7a6..adfd5ff04 100644
--- a/test/reduce/simple.wast.txt
+++ b/test/reduce/simple.wast.txt
@@ -1,6 +1,5 @@
(module
(type $0 (func (result i32)))
- (memory $0 0)
(export "x" (func $0))
(func $0 (; 0 ;) (type $0) (result i32)
(i32.const 5678)
diff --git a/test/signext.wast.from-wast b/test/signext.wast.from-wast
index 0256c06ff..e87773877 100644
--- a/test/signext.wast.from-wast
+++ b/test/signext.wast.from-wast
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $signext (; 0 ;) (type $0)
(local $0 i32)
(local $1 i64)
diff --git a/test/signext.wast.fromBinary b/test/signext.wast.fromBinary
index acd40f021..9af6f6ca1 100644
--- a/test/signext.wast.fromBinary
+++ b/test/signext.wast.fromBinary
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $signext (; 0 ;) (type $0)
(local $var$0 i32)
(local $var$1 i64)
diff --git a/test/signext.wast.fromBinary.noDebugInfo b/test/signext.wast.fromBinary.noDebugInfo
index cbbf4350f..3c46c6eeb 100644
--- a/test/signext.wast.fromBinary.noDebugInfo
+++ b/test/signext.wast.fromBinary.noDebugInfo
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $0 (; 0 ;) (type $0)
(local $var$0 i32)
(local $var$1 i64)
diff --git a/test/threads.fromasm b/test/threads.fromasm
index 97a3f7de9..4d191732c 100644
--- a/test/threads.fromasm
+++ b/test/threads.fromasm
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 (shared 256 256)))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "threads.asm.js")
(export "test" (func $test))
(func $test (; 0 ;)
diff --git a/test/threads.fromasm.clamp b/test/threads.fromasm.clamp
index 97a3f7de9..4d191732c 100644
--- a/test/threads.fromasm.clamp
+++ b/test/threads.fromasm.clamp
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 (shared 256 256)))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "threads.asm.js")
(export "test" (func $test))
(func $test (; 0 ;)
diff --git a/test/threads.fromasm.clamp.no-opts b/test/threads.fromasm.clamp.no-opts
index 512d6bac3..dc353d039 100644
--- a/test/threads.fromasm.clamp.no-opts
+++ b/test/threads.fromasm.clamp.no-opts
@@ -1,4 +1,8 @@
(module
+ (import "env" "memory" (memory $0 (shared 256 256)))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
@@ -6,10 +10,6 @@
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "global" "NaN" (global $nan$asm2wasm$import f64))
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
- (import "env" "memory" (memory $0 (shared 256 256)))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
diff --git a/test/threads.fromasm.imprecise b/test/threads.fromasm.imprecise
index a166a49ef..c8967ab2e 100644
--- a/test/threads.fromasm.imprecise
+++ b/test/threads.fromasm.imprecise
@@ -1,8 +1,5 @@
(module
(import "env" "memory" (memory $0 (shared 256 256)))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(export "test" (func $test))
(func $test (; 0 ;)
(local $0 i32)
diff --git a/test/threads.fromasm.imprecise.no-opts b/test/threads.fromasm.imprecise.no-opts
index 512d6bac3..dc353d039 100644
--- a/test/threads.fromasm.imprecise.no-opts
+++ b/test/threads.fromasm.imprecise.no-opts
@@ -1,4 +1,8 @@
(module
+ (import "env" "memory" (memory $0 (shared 256 256)))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
@@ -6,10 +10,6 @@
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "global" "NaN" (global $nan$asm2wasm$import f64))
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
- (import "env" "memory" (memory $0 (shared 256 256)))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
diff --git a/test/threads.fromasm.no-opts b/test/threads.fromasm.no-opts
index 512d6bac3..dc353d039 100644
--- a/test/threads.fromasm.no-opts
+++ b/test/threads.fromasm.no-opts
@@ -1,4 +1,8 @@
(module
+ (import "env" "memory" (memory $0 (shared 256 256)))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
@@ -6,10 +10,6 @@
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "global" "NaN" (global $nan$asm2wasm$import f64))
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
- (import "env" "memory" (memory $0 (shared 256 256)))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
diff --git a/test/threads.wasm-only.fromasm b/test/threads.wasm-only.fromasm
index 7ad7acf49..79ef9eb00 100644
--- a/test/threads.wasm-only.fromasm
+++ b/test/threads.wasm-only.fromasm
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 (shared 256 256)))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $tempRet0 (mut i32) (i32.const 0))
(data (get_global $memoryBase) "threads.wasm-only.asm.js")
(export "test64" (func $legalstub$test64))
diff --git a/test/threads.wasm-only.fromasm.clamp b/test/threads.wasm-only.fromasm.clamp
index 7ad7acf49..79ef9eb00 100644
--- a/test/threads.wasm-only.fromasm.clamp
+++ b/test/threads.wasm-only.fromasm.clamp
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 (shared 256 256)))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $tempRet0 (mut i32) (i32.const 0))
(data (get_global $memoryBase) "threads.wasm-only.asm.js")
(export "test64" (func $legalstub$test64))
diff --git a/test/threads.wasm-only.fromasm.clamp.no-opts b/test/threads.wasm-only.fromasm.clamp.no-opts
index abaca2010..35b506e2b 100644
--- a/test/threads.wasm-only.fromasm.clamp.no-opts
+++ b/test/threads.wasm-only.fromasm.clamp.no-opts
@@ -1,9 +1,9 @@
(module
- (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "memory" (memory $0 (shared 256 256)))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $legalstub$test64))
diff --git a/test/threads.wasm-only.fromasm.imprecise b/test/threads.wasm-only.fromasm.imprecise
index 672653913..ccbb5870f 100644
--- a/test/threads.wasm-only.fromasm.imprecise
+++ b/test/threads.wasm-only.fromasm.imprecise
@@ -1,8 +1,5 @@
(module
(import "env" "memory" (memory $0 (shared 256 256)))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $legalstub$test64))
(func $test64 (; 0 ;) (result i64)
diff --git a/test/threads.wasm-only.fromasm.imprecise.no-opts b/test/threads.wasm-only.fromasm.imprecise.no-opts
index abaca2010..35b506e2b 100644
--- a/test/threads.wasm-only.fromasm.imprecise.no-opts
+++ b/test/threads.wasm-only.fromasm.imprecise.no-opts
@@ -1,9 +1,9 @@
(module
- (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "memory" (memory $0 (shared 256 256)))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $legalstub$test64))
diff --git a/test/threads.wasm-only.fromasm.no-opts b/test/threads.wasm-only.fromasm.no-opts
index abaca2010..35b506e2b 100644
--- a/test/threads.wasm-only.fromasm.no-opts
+++ b/test/threads.wasm-only.fromasm.no-opts
@@ -1,9 +1,9 @@
(module
- (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "memory" (memory $0 (shared 256 256)))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $legalstub$test64))
diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm
index 49f68a7ff..57d11e478 100644
--- a/test/two_sides.fromasm
+++ b/test/two_sides.fromasm
@@ -1,10 +1,8 @@
(module
(type $FUNCSIG$id (func (param f64) (result i32)))
- (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
(data (get_global $memoryBase) "two_sides.asm.js")
(export "_test" (func $_test))
(func $_test (; 1 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
diff --git a/test/two_sides.fromasm.clamp b/test/two_sides.fromasm.clamp
index 6de1055d1..de51f2281 100644
--- a/test/two_sides.fromasm.clamp
+++ b/test/two_sides.fromasm.clamp
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "two_sides.asm.js")
(export "_test" (func $_test))
(func $f64-to-int (; 0 ;) (param $0 f64) (result i32)
diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise
index 1bd9a6ab4..c4dbbb386 100644
--- a/test/two_sides.fromasm.imprecise
+++ b/test/two_sides.fromasm.imprecise
@@ -1,8 +1,4 @@
(module
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(export "_test" (func $_test))
(func $_test (; 0 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(local $5 f64)
diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts
index 103b3b9e0..9def57a12 100644
--- a/test/two_sides.fromasm.no-opts
+++ b/test/two_sides.fromasm.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$id (func (param f64) (result i32)))
- (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
(export "_test" (func $_test))
(func $_test (; 1 ;) (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32)
(local $d6 f64)
diff --git a/test/unit.fromasm b/test/unit.fromasm
index 9a58b7747..1eda39ee0 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -8,6 +8,10 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$dd (func (param f64) (result f64)))
(type $FUNCSIG$i (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 25 25 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "gb" (global $n$asm2wasm$import i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32)))
(import "env" "abort" (func $abort (param f64) (result f64)))
@@ -17,10 +21,6 @@
(import "env" "emscripten_log" (func $emscripten_log))
(import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
(import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 25 25 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $Int (mut i32) (i32.const 0))
(global $Double (mut f64) (f64.const 0))
(global $n (mut i32) (get_global $n$asm2wasm$import))
diff --git a/test/unit.fromasm.clamp b/test/unit.fromasm.clamp
index 4d8776037..9467fc745 100644
--- a/test/unit.fromasm.clamp
+++ b/test/unit.fromasm.clamp
@@ -7,6 +7,10 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$dd (func (param f64) (result f64)))
(type $FUNCSIG$i (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 25 25 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "gb" (global $n$asm2wasm$import i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32)))
(import "env" "abort" (func $abort (param f64) (result f64)))
@@ -15,10 +19,6 @@
(import "env" "return_int" (func $return_int (result i32)))
(import "env" "emscripten_log" (func $emscripten_log))
(import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 25 25 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $Int (mut i32) (i32.const 0))
(global $Double (mut f64) (f64.const 0))
(global $n (mut i32) (get_global $n$asm2wasm$import))
diff --git a/test/unit.fromasm.clamp.no-opts b/test/unit.fromasm.clamp.no-opts
index 6a576e3ca..55ec07e1e 100644
--- a/test/unit.fromasm.clamp.no-opts
+++ b/test/unit.fromasm.clamp.no-opts
@@ -7,6 +7,10 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$dd (func (param f64) (result f64)))
(type $FUNCSIG$i (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 25 25 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "global" "NaN" (global $t$asm2wasm$import f64))
(import "global" "Infinity" (global $u$asm2wasm$import f64))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -19,10 +23,6 @@
(import "env" "return_int" (func $return_int (result i32)))
(import "env" "emscripten_log" (func $emscripten_log))
(import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 25 25 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $t (mut f64) (get_global $t$asm2wasm$import))
(global $u (mut f64) (get_global $u$asm2wasm$import))
(global $Int (mut i32) (i32.const 0))
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise
index 1212a4c34..80d6eb00d 100644
--- a/test/unit.fromasm.imprecise
+++ b/test/unit.fromasm.imprecise
@@ -7,6 +7,9 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$dd (func (param f64) (result f64)))
(type $FUNCSIG$i (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 25 25 anyfunc))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "gb" (global $n$asm2wasm$import i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32)))
(import "env" "abort" (func $abort (param f64) (result f64)))
@@ -15,10 +18,6 @@
(import "env" "return_int" (func $return_int (result i32)))
(import "env" "emscripten_log" (func $emscripten_log))
(import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 25 25 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $Int (mut i32) (i32.const 0))
(global $Double (mut f64) (f64.const 0))
(global $n (mut i32) (get_global $n$asm2wasm$import))
diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts
index 3e52e1c11..22570bea4 100644
--- a/test/unit.fromasm.imprecise.no-opts
+++ b/test/unit.fromasm.imprecise.no-opts
@@ -7,6 +7,10 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$dd (func (param f64) (result f64)))
(type $FUNCSIG$i (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 25 25 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "global" "NaN" (global $t$asm2wasm$import f64))
(import "global" "Infinity" (global $u$asm2wasm$import f64))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -19,10 +23,6 @@
(import "env" "return_int" (func $return_int (result i32)))
(import "env" "emscripten_log" (func $emscripten_log))
(import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 25 25 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $t (mut f64) (get_global $t$asm2wasm$import))
(global $u (mut f64) (get_global $u$asm2wasm$import))
(global $Int (mut i32) (i32.const 0))
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts
index 375c34af6..59061aa91 100644
--- a/test/unit.fromasm.no-opts
+++ b/test/unit.fromasm.no-opts
@@ -8,6 +8,10 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$dd (func (param f64) (result f64)))
(type $FUNCSIG$i (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 25 25 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "global" "NaN" (global $t$asm2wasm$import f64))
(import "global" "Infinity" (global $u$asm2wasm$import f64))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
@@ -21,10 +25,6 @@
(import "env" "emscripten_log" (func $emscripten_log))
(import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
(import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 25 25 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $t (mut f64) (get_global $t$asm2wasm$import))
(global $u (mut f64) (get_global $u$asm2wasm$import))
(global $Int (mut i32) (i32.const 0))
diff --git a/test/unreachable-code.wast.from-wast b/test/unreachable-code.wast.from-wast
index a5488458d..01c041dce 100644
--- a/test/unreachable-code.wast.from-wast
+++ b/test/unreachable-code.wast.from-wast
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $a (; 0 ;) (type $0)
(if
(i32.const 1)
diff --git a/test/unreachable-code.wast.fromBinary b/test/unreachable-code.wast.fromBinary
index d0c0f06d7..ea73045a1 100644
--- a/test/unreachable-code.wast.fromBinary
+++ b/test/unreachable-code.wast.fromBinary
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $a (; 0 ;) (type $0)
(if
(i32.const 1)
diff --git a/test/unreachable-code.wast.fromBinary.noDebugInfo b/test/unreachable-code.wast.fromBinary.noDebugInfo
index 24e4e9222..724152093 100644
--- a/test/unreachable-code.wast.fromBinary.noDebugInfo
+++ b/test/unreachable-code.wast.fromBinary.noDebugInfo
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(func $0 (; 0 ;) (type $0)
(if
(i32.const 1)
diff --git a/test/unreachable-import_wasm-only.fromasm b/test/unreachable-import_wasm-only.fromasm
index 18c4c4021..f15b613d5 100644
--- a/test/unreachable-import_wasm-only.fromasm
+++ b/test/unreachable-import_wasm-only.fromasm
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "unreachable-import_wasm-only.asm.js")
(export "__ZN10WasmAssertC2Ev__async_cb" (func $__ZN10WasmAssertC2Ev__async_cb))
(func $__ZN10WasmAssertC2Ev__async_cb (; 0 ;) (param $0 i32)
diff --git a/test/unreachable-import_wasm-only.fromasm.clamp b/test/unreachable-import_wasm-only.fromasm.clamp
index 18c4c4021..f15b613d5 100644
--- a/test/unreachable-import_wasm-only.fromasm.clamp
+++ b/test/unreachable-import_wasm-only.fromasm.clamp
@@ -1,8 +1,6 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "unreachable-import_wasm-only.asm.js")
(export "__ZN10WasmAssertC2Ev__async_cb" (func $__ZN10WasmAssertC2Ev__async_cb))
(func $__ZN10WasmAssertC2Ev__async_cb (; 0 ;) (param $0 i32)
diff --git a/test/unreachable-import_wasm-only.fromasm.clamp.no-opts b/test/unreachable-import_wasm-only.fromasm.clamp.no-opts
index 3160ad370..763eaebde 100644
--- a/test/unreachable-import_wasm-only.fromasm.clamp.no-opts
+++ b/test/unreachable-import_wasm-only.fromasm.clamp.no-opts
@@ -1,6 +1,10 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$viii (func (param i32 i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
@@ -14,10 +18,6 @@
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
(import "env" "___cxa_allocate_exception" (func $___cxa_allocate_exception (param i32) (result i32)))
(import "env" "___cxa_throw" (func $___cxa_throw (param i32 i32 i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
diff --git a/test/unreachable-import_wasm-only.fromasm.imprecise b/test/unreachable-import_wasm-only.fromasm.imprecise
index daa064b34..c80b32eb0 100644
--- a/test/unreachable-import_wasm-only.fromasm.imprecise
+++ b/test/unreachable-import_wasm-only.fromasm.imprecise
@@ -1,8 +1,5 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(export "__ZN10WasmAssertC2Ev__async_cb" (func $__ZN10WasmAssertC2Ev__async_cb))
(func $__ZN10WasmAssertC2Ev__async_cb (; 0 ;) (param $0 i32)
(i32.store
diff --git a/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts b/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts
index 3160ad370..763eaebde 100644
--- a/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts
+++ b/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts
@@ -1,6 +1,10 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$viii (func (param i32 i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
@@ -14,10 +18,6 @@
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
(import "env" "___cxa_allocate_exception" (func $___cxa_allocate_exception (param i32) (result i32)))
(import "env" "___cxa_throw" (func $___cxa_throw (param i32 i32 i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
diff --git a/test/unreachable-import_wasm-only.fromasm.no-opts b/test/unreachable-import_wasm-only.fromasm.no-opts
index 3160ad370..763eaebde 100644
--- a/test/unreachable-import_wasm-only.fromasm.no-opts
+++ b/test/unreachable-import_wasm-only.fromasm.no-opts
@@ -1,6 +1,10 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$viii (func (param i32 i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
@@ -14,10 +18,6 @@
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
(import "env" "___cxa_allocate_exception" (func $___cxa_allocate_exception (param i32) (result i32)))
(import "env" "___cxa_throw" (func $___cxa_throw (param i32 i32 i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
diff --git a/test/unreachable-pops.wasm.fromBinary b/test/unreachable-pops.wasm.fromBinary
index fa92d3e22..1f571bf39 100644
--- a/test/unreachable-pops.wasm.fromBinary
+++ b/test/unreachable-pops.wasm.fromBinary
@@ -1,6 +1,5 @@
(module
(type $0 (func (result i32)))
- (memory $0 0)
(func $0 (; 0 ;) (type $0) (result i32)
(block $label$1 (result i32)
(unreachable)
diff --git a/test/untaken-br_if.wast.from-wast b/test/untaken-br_if.wast.from-wast
index 2fd435aa2..28482aff4 100644
--- a/test/untaken-br_if.wast.from-wast
+++ b/test/untaken-br_if.wast.from-wast
@@ -1,6 +1,5 @@
(module
(type $0 (func (result f32)))
- (memory $0 0)
(func $binaryify-untaken-br_if (; 0 ;) (type $0) (result f32)
(if (result f32)
(i32.const 1)
diff --git a/test/untaken-br_if.wast.fromBinary b/test/untaken-br_if.wast.fromBinary
index 80fa5c66e..efdbded26 100644
--- a/test/untaken-br_if.wast.fromBinary
+++ b/test/untaken-br_if.wast.fromBinary
@@ -1,6 +1,5 @@
(module
(type $0 (func (result f32)))
- (memory $0 0)
(func $binaryify-untaken-br_if (; 0 ;) (type $0) (result f32)
(if (result f32)
(i32.const 1)
diff --git a/test/untaken-br_if.wast.fromBinary.noDebugInfo b/test/untaken-br_if.wast.fromBinary.noDebugInfo
index 32f6b25d0..15135f562 100644
--- a/test/untaken-br_if.wast.fromBinary.noDebugInfo
+++ b/test/untaken-br_if.wast.fromBinary.noDebugInfo
@@ -1,6 +1,5 @@
(module
(type $0 (func (result f32)))
- (memory $0 0)
(func $0 (; 0 ;) (type $0) (result f32)
(if (result f32)
(i32.const 1)
diff --git a/test/use-import-and-drop.fromasm b/test/use-import-and-drop.fromasm
index 5b42aff4a..52de22895 100644
--- a/test/use-import-and-drop.fromasm
+++ b/test/use-import-and-drop.fromasm
@@ -1,7 +1,5 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "use-import-and-drop.asm.js")
)
diff --git a/test/use-import-and-drop.fromasm.clamp b/test/use-import-and-drop.fromasm.clamp
index 5b42aff4a..52de22895 100644
--- a/test/use-import-and-drop.fromasm.clamp
+++ b/test/use-import-and-drop.fromasm.clamp
@@ -1,7 +1,5 @@
(module
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(data (get_global $memoryBase) "use-import-and-drop.asm.js")
)
diff --git a/test/use-import-and-drop.fromasm.clamp.no-opts b/test/use-import-and-drop.fromasm.clamp.no-opts
index debcadf00..90d0cc9f1 100644
--- a/test/use-import-and-drop.fromasm.clamp.no-opts
+++ b/test/use-import-and-drop.fromasm.clamp.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$vi (func (param i32)))
- (import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(func $test1 (; 1 ;) (result i32)
(local $$b$1 i32)
(local $$x_sroa_0_0_extract_trunc i32)
diff --git a/test/use-import-and-drop.fromasm.imprecise b/test/use-import-and-drop.fromasm.imprecise
index ddb433043..4427f36e0 100644
--- a/test/use-import-and-drop.fromasm.imprecise
+++ b/test/use-import-and-drop.fromasm.imprecise
@@ -1,6 +1,2 @@
(module
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
)
diff --git a/test/use-import-and-drop.fromasm.imprecise.no-opts b/test/use-import-and-drop.fromasm.imprecise.no-opts
index debcadf00..90d0cc9f1 100644
--- a/test/use-import-and-drop.fromasm.imprecise.no-opts
+++ b/test/use-import-and-drop.fromasm.imprecise.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$vi (func (param i32)))
- (import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(func $test1 (; 1 ;) (result i32)
(local $$b$1 i32)
(local $$x_sroa_0_0_extract_trunc i32)
diff --git a/test/use-import-and-drop.fromasm.no-opts b/test/use-import-and-drop.fromasm.no-opts
index debcadf00..90d0cc9f1 100644
--- a/test/use-import-and-drop.fromasm.no-opts
+++ b/test/use-import-and-drop.fromasm.no-opts
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$vi (func (param i32)))
- (import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(func $test1 (; 1 ;) (result i32)
(local $$b$1 i32)
(local $$x_sroa_0_0_extract_trunc i32)
diff --git a/test/wasm-only.fromasm b/test/wasm-only.fromasm
index 2f9a2a37b..34acb5b49 100644
--- a/test/wasm-only.fromasm
+++ b/test/wasm-only.fromasm
@@ -7,6 +7,10 @@
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(type $legaltype$do_i64 (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 3 3 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "illegalImport" (func $illegalImport (param f64 i64 i32)))
(import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
(import "env" "_fabsf" (func $_fabsf (param f32) (result f32)))
@@ -16,10 +20,6 @@
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
(import "env" "do_i64" (func $legalimport$do_i64 (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 3 3 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $tempRet0 (mut i32) (i32.const 0))
(elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
(data (get_global $memoryBase) "wasm-only.asm.js")
diff --git a/test/wasm-only.fromasm.clamp b/test/wasm-only.fromasm.clamp
index 2f9a2a37b..34acb5b49 100644
--- a/test/wasm-only.fromasm.clamp
+++ b/test/wasm-only.fromasm.clamp
@@ -7,6 +7,10 @@
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(type $legaltype$do_i64 (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 3 3 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "illegalImport" (func $illegalImport (param f64 i64 i32)))
(import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
(import "env" "_fabsf" (func $_fabsf (param f32) (result f32)))
@@ -16,10 +20,6 @@
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
(import "env" "do_i64" (func $legalimport$do_i64 (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 3 3 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $tempRet0 (mut i32) (i32.const 0))
(elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
(data (get_global $memoryBase) "wasm-only.asm.js")
diff --git a/test/wasm-only.fromasm.clamp.no-opts b/test/wasm-only.fromasm.clamp.no-opts
index 1b8b00201..6e4a75bf2 100644
--- a/test/wasm-only.fromasm.clamp.no-opts
+++ b/test/wasm-only.fromasm.clamp.no-opts
@@ -7,6 +7,10 @@
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(type $legaltype$do_i64 (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 3 3 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "illegalImport" (func $illegalImport (param f64 i64 i32)))
(import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
@@ -17,10 +21,6 @@
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
(import "env" "do_i64" (func $legalimport$do_i64 (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 3 3 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
(elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
diff --git a/test/wasm-only.fromasm.imprecise b/test/wasm-only.fromasm.imprecise
index df12f655b..c2db2131e 100644
--- a/test/wasm-only.fromasm.imprecise
+++ b/test/wasm-only.fromasm.imprecise
@@ -7,6 +7,9 @@
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(type $legaltype$do_i64 (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 3 3 anyfunc))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "illegalImport" (func $illegalImport (param f64 i64 i32)))
(import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
(import "env" "_fabsf" (func $_fabsf (param f32) (result f32)))
@@ -16,10 +19,6 @@
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
(import "env" "do_i64" (func $legalimport$do_i64 (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 3 3 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $tempRet0 (mut i32) (i32.const 0))
(elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
(export "test64" (func $test64))
diff --git a/test/wasm-only.fromasm.imprecise.no-opts b/test/wasm-only.fromasm.imprecise.no-opts
index d994b553f..a414e6822 100644
--- a/test/wasm-only.fromasm.imprecise.no-opts
+++ b/test/wasm-only.fromasm.imprecise.no-opts
@@ -7,6 +7,10 @@
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(type $legaltype$do_i64 (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 3 3 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "illegalImport" (func $illegalImport (param f64 i64 i32)))
(import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
@@ -17,10 +21,6 @@
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
(import "env" "do_i64" (func $legalimport$do_i64 (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 3 3 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
(elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
diff --git a/test/wasm-only.fromasm.no-opts b/test/wasm-only.fromasm.no-opts
index 1b8b00201..6e4a75bf2 100644
--- a/test/wasm-only.fromasm.no-opts
+++ b/test/wasm-only.fromasm.no-opts
@@ -7,6 +7,10 @@
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(type $legaltype$do_i64 (func (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 3 3 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "illegalImport" (func $illegalImport (param f64 i64 i32)))
(import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
@@ -17,10 +21,6 @@
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
(import "env" "do_i64" (func $legalimport$do_i64 (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 3 3 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
(elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)