diff options
151 files changed, 235 insertions, 234 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index c3ca4021e..572732275 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -645,6 +645,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> { } void printMemoryHeader(Memory* curr) { printOpening(o, "memory") << ' '; + printName(curr->name) << ' '; o << curr->initial; if (curr->max && curr->max != Memory::kMaxSize) o << ' ' << curr->max; o << ")"; diff --git a/test/dot_s/alias.wast b/test/dot_s/alias.wast index b9c98b661..cc54fa08c 100644 --- a/test/dot_s/alias.wast +++ b/test/dot_s/alias.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 16) "\d2\04\00\00\00\00\00\00)\t\00\00") (type $FUNCSIG$v (func)) (export "memory" (memory $0)) diff --git a/test/dot_s/alternate-lcomm.wast b/test/dot_s/alternate-lcomm.wast index 43286691f..68d039a41 100644 --- a/test/dot_s/alternate-lcomm.wast +++ b/test/dot_s/alternate-lcomm.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) ) ;; METADATA: { "asmConsts": {},"staticBump": 16, "initializers": [] } diff --git a/test/dot_s/asm_const.wast b/test/dot_s/asm_const.wast index b5d2aa949..999680a58 100644 --- a/test/dot_s/asm_const.wast +++ b/test/dot_s/asm_const.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 16) "{ Module.print(\"hello, world!\"); }\00") (type $FUNCSIG$vi (func (param i32))) (import "env" "emscripten_asm_const_vi" (func $emscripten_asm_const_vi (param i32))) diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast index cb945abba..abeeee690 100644 --- a/test/dot_s/basics.wast +++ b/test/dot_s/basics.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 16) "hello, world!\n\00") (data (i32.const 32) "vcq") (data (i32.const 48) "\16\00\00\00") diff --git a/test/dot_s/bcp-1.wast b/test/dot_s/bcp-1.wast index b6223707f..1aafc1289 100644 --- a/test/dot_s/bcp-1.wast +++ b/test/dot_s/bcp-1.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 16) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00") (data (i32.const 40) "\07\00\00\00\08\00\00\00\t\00\00\00") (data (i32.const 52) "\n\00\00\00\0b\00\00\00") diff --git a/test/dot_s/data-offset-folding.wast b/test/dot_s/data-offset-folding.wast index d68e812bd..b2c128afb 100644 --- a/test/dot_s/data-offset-folding.wast +++ b/test/dot_s/data-offset-folding.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 12) "\00\00\00\00") (data (i32.const 416) "`\00\00\00") (export "memory" (memory $0)) diff --git a/test/dot_s/debug.wast b/test/dot_s/debug.wast index ecd8c79a2..01c305c13 100644 --- a/test/dot_s/debug.wast +++ b/test/dot_s/debug.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (export "fib" (func $fib)) (func $fib (param $0 i32) (result i32) diff --git a/test/dot_s/dso_handle.wast b/test/dot_s/dso_handle.wast index 2e69ce3b2..cf62344a1 100644 --- a/test/dot_s/dso_handle.wast +++ b/test/dot_s/dso_handle.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (export "main" (func $main)) (func $main (result i32) diff --git a/test/dot_s/dyncall.wast b/test/dot_s/dyncall.wast index e879838f8..a4c7880a3 100644 --- a/test/dot_s/dyncall.wast +++ b/test/dot_s/dyncall.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$if (func (param f32) (result i32))) diff --git a/test/dot_s/exit.wast b/test/dot_s/exit.wast index a45fb5453..0dc9560bb 100644 --- a/test/dot_s/exit.wast +++ b/test/dot_s/exit.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (type $FUNCSIG$vi (func (param i32))) (import "env" "exit" (func $exit (param i32))) (export "memory" (memory $0)) diff --git a/test/dot_s/export_malloc_free.wast b/test/dot_s/export_malloc_free.wast index 39929d58a..cf7927ab5 100644 --- a/test/dot_s/export_malloc_free.wast +++ b/test/dot_s/export_malloc_free.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (export "main" (func $main)) (export "malloc" (func $malloc)) diff --git a/test/dot_s/fix_em_ehsjlj_names.wast b/test/dot_s/fix_em_ehsjlj_names.wast index 2ce1603d9..5d21caea9 100644 --- a/test/dot_s/fix_em_ehsjlj_names.wast +++ b/test/dot_s/fix_em_ehsjlj_names.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fifd (func (param i32 f32 f64) (result f32))) diff --git a/test/dot_s/function-data-sections.wast b/test/dot_s/function-data-sections.wast index 83548c2cc..2e6e6ba08 100644 --- a/test/dot_s/function-data-sections.wast +++ b/test/dot_s/function-data-sections.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 12) "\00\00\00\00") (data (i32.const 16) "\01\00\00\00") (data (i32.const 20) "33\13@") diff --git a/test/dot_s/hostFinalize.wast b/test/dot_s/hostFinalize.wast index 396575a3b..68e62c8f3 100644 --- a/test/dot_s/hostFinalize.wast +++ b/test/dot_s/hostFinalize.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (func $_main (drop diff --git a/test/dot_s/indidx.wast b/test/dot_s/indidx.wast index b691c1c1b..8c3cc60a5 100644 --- a/test/dot_s/indidx.wast +++ b/test/dot_s/indidx.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 16) "\04\00\00\00\02\00\00\00\01\00\00\00\03\00\00\00") (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) diff --git a/test/dot_s/indirect-import.wast b/test/dot_s/indirect-import.wast index b93059da3..6eb032629 100644 --- a/test/dot_s/indirect-import.wast +++ b/test/dot_s/indirect-import.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (type $FUNCSIG$fd (func (param f64) (result f32))) (type $FUNCSIG$vj (func (param i64))) (type $FUNCSIG$v (func)) diff --git a/test/dot_s/initializers.wast b/test/dot_s/initializers.wast index 1afc16054..cbce58cc5 100644 --- a/test/dot_s/initializers.wast +++ b/test/dot_s/initializers.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (export "main" (func $main)) (export "f1" (func $f1)) diff --git a/test/dot_s/lcomm-in-text-segment.wast b/test/dot_s/lcomm-in-text-segment.wast index 98edb78db..0a7ccb8e0 100644 --- a/test/dot_s/lcomm-in-text-segment.wast +++ b/test/dot_s/lcomm-in-text-segment.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 20) "\10\00\00\00") (export "memory" (memory $0)) ) diff --git a/test/dot_s/local_align.wast b/test/dot_s/local_align.wast index 5304dd5e4..5629b15c1 100644 --- a/test/dot_s/local_align.wast +++ b/test/dot_s/local_align.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (export "main" (func $main)) (func $foo (param $0 i32) diff --git a/test/dot_s/macClangMetaData.wast b/test/dot_s/macClangMetaData.wast index 3fbcf2d38..05f9f1f7d 100644 --- a/test/dot_s/macClangMetaData.wast +++ b/test/dot_s/macClangMetaData.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 16) "Hello, World!\00") (type $FUNCSIG$ii (func (param i32) (result i32))) (import "env" "puts" (func $puts (param i32) (result i32))) diff --git a/test/dot_s/memops.wast b/test/dot_s/memops.wast index a254e7779..54b1654fc 100644 --- a/test/dot_s/memops.wast +++ b/test/dot_s/memops.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 16) "{ Module.print(\"hello, world! \" + HEAP32[8>>2]); }\00") (type $FUNCSIG$vi (func (param i32))) (import "env" "emscripten_asm_const_vi" (func $emscripten_asm_const_vi (param i32))) diff --git a/test/dot_s/minimal.wast b/test/dot_s/minimal.wast index 77f1241a4..61fcbd4e2 100644 --- a/test/dot_s/minimal.wast +++ b/test/dot_s/minimal.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (export "main" (func $main)) (func $main (result i32) diff --git a/test/dot_s/permute.wast b/test/dot_s/permute.wast index 29f3932e7..3f0e9e33d 100644 --- a/test/dot_s/permute.wast +++ b/test/dot_s/permute.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 16) "hE?\8ds\0e7\db[g\8f\955it\c4k\0b\e2\ef\bcld\e0\fd\8c\9e\86&~\d8\94\89+\c8\a4\c2\f2\fb\12\1cej\d99\b7\b3W\c6w\af\ae\caM>\92ub\96\84\b6\b0N\ec;q\11\f7\bf\e31\e6\a7\90\fc\03\e4\aa\d7\cc- \15\83DH\80r\fa\01X\eb:_\00A\cd\e9o`n\ac(\ad\ba0\dcyS#\f4$\"\82\7f}\8e\f6\93L\'\bb\bdZ\ed4\18\f3\c0\cf\ff\a3\f8\07\05\9c\d3\0f\a0\06m%\\\f9^B<\e7\b1\17\98]\0c\dd\c5\f5p\e5\fezJ\ab,F\a5@\08R\85!\b8\1a\ce\d5\04\nI\a6\d1\9f\8a\c9\a9|\97\9aG\be8Y\8b\c1\1b\d4\ea\b9\19\14\9b\9163\d0\1d\d2\df=C\1f\0dc\e1\c7QUv\02\b5aK\b4\tV\c3x\e8\a1\1e\81\de/{\da\d6Pf\10T\f0)\88\16\ee\a8\9d\f1\cbO*\b2\99\132\87.\a2") (export "memory" (memory $0)) ) diff --git a/test/dot_s/relocation.wast b/test/dot_s/relocation.wast index 9d870432a..4a05b631f 100644 --- a/test/dot_s/relocation.wast +++ b/test/dot_s/relocation.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 12) "\10\00\00\00") (data (i32.const 16) "\0c\00\00\00") (export "memory" (memory $0)) diff --git a/test/dot_s/return.wast b/test/dot_s/return.wast index fe3e867bf..265f8eca9 100644 --- a/test/dot_s/return.wast +++ b/test/dot_s/return.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (export "return_i32" (func $return_i32)) (export "return_void" (func $return_void)) diff --git a/test/dot_s/start_main0.wast b/test/dot_s/start_main0.wast index fd496686b..d0b52380d 100644 --- a/test/dot_s/start_main0.wast +++ b/test/dot_s/start_main0.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (start $_start) (export "memory" (memory $0)) (export "main" (func $main)) diff --git a/test/dot_s/start_main2.wast b/test/dot_s/start_main2.wast index 28b3beb8e..f079d79a7 100644 --- a/test/dot_s/start_main2.wast +++ b/test/dot_s/start_main2.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (start $_start) (export "memory" (memory $0)) (export "main" (func $main)) diff --git a/test/dot_s/symbolic-offset.wast b/test/dot_s/symbolic-offset.wast index cd2205cee..36a1b8577 100644 --- a/test/dot_s/symbolic-offset.wast +++ b/test/dot_s/symbolic-offset.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 12) "\01\00\00\00\00\00\00\00\00\00\00\00") (export "memory" (memory $0)) (export "f" (func $f)) diff --git a/test/dot_s/text_before_type.wast b/test/dot_s/text_before_type.wast index 8537b83da..f8eea232f 100644 --- a/test/dot_s/text_before_type.wast +++ b/test/dot_s/text_before_type.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (export "main" (func $main)) (func $main (result i32) diff --git a/test/dot_s/visibilities.wast b/test/dot_s/visibilities.wast index 5bc934baa..d7bcc8f88 100644 --- a/test/dot_s/visibilities.wast +++ b/test/dot_s/visibilities.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (export "memory" (memory $0)) (export "foo" (func $foo)) (export "bar" (func $bar)) diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 52e27d130..a1f00c68d 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -29,7 +29,7 @@ (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) - (import "env" "memory" (memory 256 256)) + (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)) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 2f37483de..eb33b21c5 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -27,7 +27,7 @@ (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 256 256)) + (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)) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index 13406a17d..9593e5633 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -27,7 +27,7 @@ (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 256 256)) + (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)) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 258448375..970dfea5f 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -28,7 +28,7 @@ (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) - (import "env" "memory" (memory 256 256)) + (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)) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index e6d2ce43e..545c92523 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -38,7 +38,7 @@ (import "asm2wasm" "i32s-rem" (func $i32s-rem (param i32 i32) (result i32))) (import "asm2wasm" "i32u-rem" (func $i32u-rem (param i32 i32) (result i32))) (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) - (import "env" "memory" (memory 256 256)) + (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)) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 03b54a532..9453ebe41 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -31,7 +31,7 @@ (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 256 256)) + (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)) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 1714e34a3..e4973789a 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -31,7 +31,7 @@ (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 256 256)) + (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)) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 203f31224..ab9aa66a1 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -37,7 +37,7 @@ (import "asm2wasm" "i32s-rem" (func $i32s-rem (param i32 i32) (result i32))) (import "asm2wasm" "i32u-rem" (func $i32u-rem (param i32 i32) (result i32))) (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) - (import "env" "memory" (memory 256 256)) + (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)) diff --git a/test/empty.fromasm b/test/empty.fromasm index 83d404801..71b53653f 100644 --- a/test/empty.fromasm +++ b/test/empty.fromasm @@ -1,6 +1,6 @@ (module (data (get_global $memoryBase) "empty.asm.js") - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/empty.fromasm.imprecise b/test/empty.fromasm.imprecise index 7e9ff6f81..ea0f983fc 100644 --- a/test/empty.fromasm.imprecise +++ b/test/empty.fromasm.imprecise @@ -1,5 +1,5 @@ (module - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/empty.fromasm.imprecise.no-opts b/test/empty.fromasm.imprecise.no-opts index 7e9ff6f81..ea0f983fc 100644 --- a/test/empty.fromasm.imprecise.no-opts +++ b/test/empty.fromasm.imprecise.no-opts @@ -1,5 +1,5 @@ (module - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/empty.fromasm.no-opts b/test/empty.fromasm.no-opts index 7e9ff6f81..ea0f983fc 100644 --- a/test/empty.fromasm.no-opts +++ b/test/empty.fromasm.no-opts @@ -1,5 +1,5 @@ (module - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 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 4360107d3..46647f9f6 100644 --- a/test/example/c-api-hello-world.txt +++ b/test/example/c-api-hello-world.txt @@ -1,5 +1,5 @@ (module - (memory 0) + (memory $0 0) (type $iii (func (param i32 i32) (result i32))) (func $adder (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.add diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 8b4de4402..9364edeae 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -7,7 +7,7 @@ BinaryenFloat64: 4 (f32.const -33.61199951171875) ) (module - (memory 1 256) + (memory $0 1 256) (data (i32.const 10) "hello, world") (start $starter) (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) @@ -538,7 +538,7 @@ BinaryenFloat64: 4 ) raw: (module - (memory 0) + (memory $0 0) (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) @@ -1025,7 +1025,7 @@ raw: ) optimized: (module - (memory 0) + (memory $0 0) (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) @@ -1182,7 +1182,7 @@ optimized: ) module loaded from binary form: (module - (memory 0) + (memory $0 0) (type $0 (func (param i32 i32) (result i32))) (func $adder (type $0) (param $var$0 i32) (param $var$1 i32) (result i32) (i32.add @@ -1192,7 +1192,7 @@ module loaded from binary form: ) ) (module - (memory 0) + (memory $0 0) (start $starter) (type $vi (func (param i32))) (type $v (func)) @@ -1205,7 +1205,7 @@ module loaded from binary form: ) (i32.const 1234) (module - (memory 0) + (memory $0 0) (type $v (func)) (func $func (type $v) (local $0 i32) @@ -1550,7 +1550,7 @@ int main() { BinaryenModuleValidate(the_module); BinaryenModulePrint(the_module); (module - (memory 1 256) + (memory $0 1 256) (data (i32.const 10) "hello, world") (start $starter) (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) @@ -2541,7 +2541,7 @@ int main() { raw: BinaryenModulePrint(the_module); (module - (memory 0) + (memory $0 0) (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) @@ -3032,7 +3032,7 @@ raw: optimized: BinaryenModulePrint(the_module); (module - (memory 0) + (memory $0 0) (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index 4d166cc2e..b77e5c6c4 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -2,7 +2,7 @@ (f32.const -33.61199951171875) ) (module - (memory 1 256) + (memory $0 1 256) (data (i32.const 10) "hello, world") (start $starter) (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) @@ -532,7 +532,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) @@ -1018,7 +1018,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt index a5a098b32..599b500d4 100644 --- a/test/example/relooper-fuzz.txt +++ b/test/example/relooper-fuzz.txt @@ -1,5 +1,5 @@ (module - (memory 1 1) + (memory $0 1 1) (start $main) (type $i (func (result i32))) (type $v (func)) @@ -292,7 +292,7 @@ ) ) (module - (memory 1 1) + (memory $0 1 1) (start $main) (type $i (func (result i32))) (type $v (func)) diff --git a/test/example/relooper-fuzz1.txt b/test/example/relooper-fuzz1.txt index 9424160e3..16ec88e57 100644 --- a/test/example/relooper-fuzz1.txt +++ b/test/example/relooper-fuzz1.txt @@ -1,5 +1,5 @@ (module - (memory 1 1) + (memory $0 1 1) (start $main) (type $i (func (result i32))) (type $v (func)) @@ -268,7 +268,7 @@ ) ) (module - (memory 1 1) + (memory $0 1 1) (start $main) (type $i (func (result i32))) (type $v (func)) diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm index 02625d09e..cd2ebc6ec 100644 --- a/test/hello_world.fromasm +++ b/test/hello_world.fromasm @@ -1,6 +1,6 @@ (module (data (get_global $memoryBase) "hello_world.asm.js") - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/hello_world.fromasm.imprecise b/test/hello_world.fromasm.imprecise index 21ac8112c..fd9a167c6 100644 --- a/test/hello_world.fromasm.imprecise +++ b/test/hello_world.fromasm.imprecise @@ -1,5 +1,5 @@ (module - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/hello_world.fromasm.imprecise.no-opts b/test/hello_world.fromasm.imprecise.no-opts index 8ef16e1e0..64ddcb01d 100644 --- a/test/hello_world.fromasm.imprecise.no-opts +++ b/test/hello_world.fromasm.imprecise.no-opts @@ -1,5 +1,5 @@ (module - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/hello_world.fromasm.no-opts b/test/hello_world.fromasm.no-opts index 8ef16e1e0..64ddcb01d 100644 --- a/test/hello_world.fromasm.no-opts +++ b/test/hello_world.fromasm.no-opts @@ -1,5 +1,5 @@ (module - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/hello_world.wast b/test/hello_world.wast index 16f0ddc3a..e66692f97 100644 --- a/test/hello_world.wast +++ b/test/hello_world.wast @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param i32 i32) (result i32))) (export "add" (func $add)) (func $add (type $0) (param $x i32) (param $y i32) (result i32) diff --git a/test/hello_world.wast.fromBinary b/test/hello_world.wast.fromBinary index 0f9f42902..2241fb07b 100644 --- a/test/hello_world.wast.fromBinary +++ b/test/hello_world.wast.fromBinary @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param i32 i32) (result i32))) (export "add" (func $add)) (func $add (type $0) (param $var$0 i32) (param $var$1 i32) (result i32) diff --git a/test/hello_world.wast.fromBinary.noDebugInfo b/test/hello_world.wast.fromBinary.noDebugInfo index 3fc88d9fd..b71cddfcb 100644 --- a/test/hello_world.wast.fromBinary.noDebugInfo +++ b/test/hello_world.wast.fromBinary.noDebugInfo @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param i32 i32) (result i32))) (export "add" (func $0)) (func $0 (type $0) (param $var$0 i32) (param $var$1 i32) (result i32) diff --git a/test/kitchen_sink.wast b/test/kitchen_sink.wast index c6cd0a8b3..b3927ef4c 100644 --- a/test/kitchen_sink.wast +++ b/test/kitchen_sink.wast @@ -1,5 +1,5 @@ (module - (memory 4096 4096) + (memory $0 4096 4096) (data (i32.const 1026) "\14\00") (type $0 (func (result i32))) (func $kitchensink (type $0) (result i32) diff --git a/test/kitchen_sink.wast.fromBinary b/test/kitchen_sink.wast.fromBinary index 5aba809f6..84c12f732 100644 --- a/test/kitchen_sink.wast.fromBinary +++ b/test/kitchen_sink.wast.fromBinary @@ -1,5 +1,5 @@ (module - (memory 4096 4096) + (memory $0 4096 4096) (data (i32.const 1026) "\14\00") (type $0 (func (result i32))) (func $kitchensink (type $0) (result i32) diff --git a/test/kitchen_sink.wast.fromBinary.noDebugInfo b/test/kitchen_sink.wast.fromBinary.noDebugInfo index 074753d95..1b54470c6 100644 --- a/test/kitchen_sink.wast.fromBinary.noDebugInfo +++ b/test/kitchen_sink.wast.fromBinary.noDebugInfo @@ -1,5 +1,5 @@ (module - (memory 4096 4096) + (memory $0 4096 4096) (data (i32.const 1026) "\14\00") (type $0 (func (result i32))) (func $0 (type $0) (result i32) diff --git a/test/llvm_autogenerated/byval.wast b/test/llvm_autogenerated/byval.wast index d3673093b..6f667f923 100644 --- a/test/llvm_autogenerated/byval.wast +++ b/test/llvm_autogenerated/byval.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) diff --git a/test/llvm_autogenerated/call.wast b/test/llvm_autogenerated/call.wast index b597dacfd..503577167 100644 --- a/test/llvm_autogenerated/call.wast +++ b/test/llvm_autogenerated/call.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (data (i32.const 12) "\01\00\00\00") (type $FUNCSIG$v (func)) diff --git a/test/llvm_autogenerated/cfg-stackify.wast b/test/llvm_autogenerated/cfg-stackify.wast index e0decab7c..2f1994816 100644 --- a/test/llvm_autogenerated/cfg-stackify.wast +++ b/test/llvm_autogenerated/cfg-stackify.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) diff --git a/test/llvm_autogenerated/comparisons_f32.wast b/test/llvm_autogenerated/comparisons_f32.wast index 279b724c6..68e51d7a9 100644 --- a/test/llvm_autogenerated/comparisons_f32.wast +++ b/test/llvm_autogenerated/comparisons_f32.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "ord_f32" (func $ord_f32)) diff --git a/test/llvm_autogenerated/comparisons_f64.wast b/test/llvm_autogenerated/comparisons_f64.wast index 3d100c168..14d898dc3 100644 --- a/test/llvm_autogenerated/comparisons_f64.wast +++ b/test/llvm_autogenerated/comparisons_f64.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "ord_f64" (func $ord_f64)) diff --git a/test/llvm_autogenerated/comparisons_i32.wast b/test/llvm_autogenerated/comparisons_i32.wast index c6b027436..51d311e52 100644 --- a/test/llvm_autogenerated/comparisons_i32.wast +++ b/test/llvm_autogenerated/comparisons_i32.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "eq_i32" (func $eq_i32)) diff --git a/test/llvm_autogenerated/comparisons_i64.wast b/test/llvm_autogenerated/comparisons_i64.wast index 9e23d4d04..5b91b40a1 100644 --- a/test/llvm_autogenerated/comparisons_i64.wast +++ b/test/llvm_autogenerated/comparisons_i64.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "eq_i64" (func $eq_i64)) diff --git a/test/llvm_autogenerated/conv.wast b/test/llvm_autogenerated/conv.wast index 13e2b3273..008cdb950 100644 --- a/test/llvm_autogenerated/conv.wast +++ b/test/llvm_autogenerated/conv.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "i32_wrap_i64" (func $i32_wrap_i64)) diff --git a/test/llvm_autogenerated/copysign-casts.wast b/test/llvm_autogenerated/copysign-casts.wast index 2c8064227..f9d1c66b5 100644 --- a/test/llvm_autogenerated/copysign-casts.wast +++ b/test/llvm_autogenerated/copysign-casts.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "fold_promote" (func $fold_promote)) diff --git a/test/llvm_autogenerated/cpus.wast b/test/llvm_autogenerated/cpus.wast index 0810e5528..b45d39e6f 100644 --- a/test/llvm_autogenerated/cpus.wast +++ b/test/llvm_autogenerated/cpus.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "f" (func $f)) diff --git a/test/llvm_autogenerated/dead-vreg.wast b/test/llvm_autogenerated/dead-vreg.wast index 73cba6b93..998bc354f 100644 --- a/test/llvm_autogenerated/dead-vreg.wast +++ b/test/llvm_autogenerated/dead-vreg.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "foo" (func $foo)) diff --git a/test/llvm_autogenerated/divrem-constant.wast b/test/llvm_autogenerated/divrem-constant.wast index e1c33bf9d..872bc8737 100644 --- a/test/llvm_autogenerated/divrem-constant.wast +++ b/test/llvm_autogenerated/divrem-constant.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "test_udiv_2" (func $test_udiv_2)) diff --git a/test/llvm_autogenerated/f32.wast b/test/llvm_autogenerated/f32.wast index f4b5243b0..f74f08893 100644 --- a/test/llvm_autogenerated/f32.wast +++ b/test/llvm_autogenerated/f32.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$ffff (func (param f32 f32 f32) (result f32))) (import "env" "fmaf" (func $fmaf (param f32 f32 f32) (result f32))) diff --git a/test/llvm_autogenerated/f64.wast b/test/llvm_autogenerated/f64.wast index 19ba5ae04..3c0b8ee68 100644 --- a/test/llvm_autogenerated/f64.wast +++ b/test/llvm_autogenerated/f64.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$dddd (func (param f64 f64 f64) (result f64))) (import "env" "fma" (func $fma (param f64 f64 f64) (result f64))) diff --git a/test/llvm_autogenerated/fast-isel.wast b/test/llvm_autogenerated/fast-isel.wast index 3fe9c40b6..c699faaf5 100644 --- a/test/llvm_autogenerated/fast-isel.wast +++ b/test/llvm_autogenerated/fast-isel.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "immediate_f32" (func $immediate_f32)) diff --git a/test/llvm_autogenerated/frem.wast b/test/llvm_autogenerated/frem.wast index ec213e457..aa91f480d 100644 --- a/test/llvm_autogenerated/frem.wast +++ b/test/llvm_autogenerated/frem.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) diff --git a/test/llvm_autogenerated/func.wast b/test/llvm_autogenerated/func.wast index 4535b632a..d8efdfe5e 100644 --- a/test/llvm_autogenerated/func.wast +++ b/test/llvm_autogenerated/func.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "f0" (func $f0)) diff --git a/test/llvm_autogenerated/global.wast b/test/llvm_autogenerated/global.wast index 3c34312e3..056d4ec31 100644 --- a/test/llvm_autogenerated/global.wast +++ b/test/llvm_autogenerated/global.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\b0\08\00\00") (data (i32.const 12) "9\05\00\00") (data (i32.const 28) "\01\00\00\00") diff --git a/test/llvm_autogenerated/globl.wast b/test/llvm_autogenerated/globl.wast index 60636c5fd..212b6dff4 100644 --- a/test/llvm_autogenerated/globl.wast +++ b/test/llvm_autogenerated/globl.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "foo" (func $foo)) diff --git a/test/llvm_autogenerated/i128.wast b/test/llvm_autogenerated/i128.wast index f3bf045ef..971b9d063 100644 --- a/test/llvm_autogenerated/i128.wast +++ b/test/llvm_autogenerated/i128.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$vijji (func (param i32 i64 i64 i32))) (type $FUNCSIG$vijjjj (func (param i32 i64 i64 i64 i64))) diff --git a/test/llvm_autogenerated/i32-load-store-alignment.wast b/test/llvm_autogenerated/i32-load-store-alignment.wast index eb22b9e8a..4029caeb3 100644 --- a/test/llvm_autogenerated/i32-load-store-alignment.wast +++ b/test/llvm_autogenerated/i32-load-store-alignment.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "ldi32_a1" (func $ldi32_a1)) diff --git a/test/llvm_autogenerated/i32.wast b/test/llvm_autogenerated/i32.wast index 9357999ee..13134478d 100644 --- a/test/llvm_autogenerated/i32.wast +++ b/test/llvm_autogenerated/i32.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "add32" (func $add32)) diff --git a/test/llvm_autogenerated/i64-load-store-alignment.wast b/test/llvm_autogenerated/i64-load-store-alignment.wast index b820c436e..b2a748166 100644 --- a/test/llvm_autogenerated/i64-load-store-alignment.wast +++ b/test/llvm_autogenerated/i64-load-store-alignment.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "ldi64_a1" (func $ldi64_a1)) diff --git a/test/llvm_autogenerated/i64.wast b/test/llvm_autogenerated/i64.wast index 1d457299c..19a8aba10 100644 --- a/test/llvm_autogenerated/i64.wast +++ b/test/llvm_autogenerated/i64.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "add64" (func $add64)) diff --git a/test/llvm_autogenerated/ident.wast b/test/llvm_autogenerated/ident.wast index 6ef9977d2..0b18f0e4d 100644 --- a/test/llvm_autogenerated/ident.wast +++ b/test/llvm_autogenerated/ident.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) ) diff --git a/test/llvm_autogenerated/immediates.wast b/test/llvm_autogenerated/immediates.wast index 2dcf51dcd..17cdc42fa 100644 --- a/test/llvm_autogenerated/immediates.wast +++ b/test/llvm_autogenerated/immediates.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "zero_i32" (func $zero_i32)) diff --git a/test/llvm_autogenerated/irreducible-cfg.wast b/test/llvm_autogenerated/irreducible-cfg.wast index 5eb100784..b4508d0d7 100644 --- a/test/llvm_autogenerated/irreducible-cfg.wast +++ b/test/llvm_autogenerated/irreducible-cfg.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "test0" (func $test0)) diff --git a/test/llvm_autogenerated/legalize.wast b/test/llvm_autogenerated/legalize.wast index af9a5b617..91c65a578 100644 --- a/test/llvm_autogenerated/legalize.wast +++ b/test/llvm_autogenerated/legalize.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$vijji (func (param i32 i64 i64 i32))) (import "env" "__ashlti3" (func $__ashlti3 (param i32 i64 i64 i32))) diff --git a/test/llvm_autogenerated/load-ext.wast b/test/llvm_autogenerated/load-ext.wast index cc6207cbe..a319cc2fc 100644 --- a/test/llvm_autogenerated/load-ext.wast +++ b/test/llvm_autogenerated/load-ext.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "sext_i8_i32" (func $sext_i8_i32)) diff --git a/test/llvm_autogenerated/load-store-i1.wast b/test/llvm_autogenerated/load-store-i1.wast index 3ec46de00..d658e0796 100644 --- a/test/llvm_autogenerated/load-store-i1.wast +++ b/test/llvm_autogenerated/load-store-i1.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "load_u_i1_i32" (func $load_u_i1_i32)) diff --git a/test/llvm_autogenerated/load.wast b/test/llvm_autogenerated/load.wast index 67c73c342..091830f67 100644 --- a/test/llvm_autogenerated/load.wast +++ b/test/llvm_autogenerated/load.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "ldi32" (func $ldi32)) diff --git a/test/llvm_autogenerated/mem-intrinsics.wast b/test/llvm_autogenerated/mem-intrinsics.wast index f15d84071..087cf05f5 100644 --- a/test/llvm_autogenerated/mem-intrinsics.wast +++ b/test/llvm_autogenerated/mem-intrinsics.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) diff --git a/test/llvm_autogenerated/memory-addr32.wast b/test/llvm_autogenerated/memory-addr32.wast index 98edc6adf..3c1821867 100644 --- a/test/llvm_autogenerated/memory-addr32.wast +++ b/test/llvm_autogenerated/memory-addr32.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "current_memory" (func $current_memory)) diff --git a/test/llvm_autogenerated/non-executable-stack.wast b/test/llvm_autogenerated/non-executable-stack.wast index 6ef9977d2..0b18f0e4d 100644 --- a/test/llvm_autogenerated/non-executable-stack.wast +++ b/test/llvm_autogenerated/non-executable-stack.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) ) diff --git a/test/llvm_autogenerated/offset.wast b/test/llvm_autogenerated/offset.wast index c1e3c8e6b..85b75b032 100644 --- a/test/llvm_autogenerated/offset.wast +++ b/test/llvm_autogenerated/offset.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (data (i32.const 12) "\00\00\00\00") (export "memory" (memory $0)) diff --git a/test/llvm_autogenerated/phi.wast b/test/llvm_autogenerated/phi.wast index 6ecc3f395..c0ab3e554 100644 --- a/test/llvm_autogenerated/phi.wast +++ b/test/llvm_autogenerated/phi.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "test0" (func $test0)) diff --git a/test/llvm_autogenerated/reg-stackify.wast b/test/llvm_autogenerated/reg-stackify.wast index 390074d81..37c18857d 100644 --- a/test/llvm_autogenerated/reg-stackify.wast +++ b/test/llvm_autogenerated/reg-stackify.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (data (i32.const 12) "\00\00\00\00") (type $FUNCSIG$i (func (result i32))) diff --git a/test/llvm_autogenerated/return-int32.wast b/test/llvm_autogenerated/return-int32.wast index 5e701af83..cf889e1fe 100644 --- a/test/llvm_autogenerated/return-int32.wast +++ b/test/llvm_autogenerated/return-int32.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "return_i32" (func $return_i32)) diff --git a/test/llvm_autogenerated/return-void.wast b/test/llvm_autogenerated/return-void.wast index 53845c44a..366e755f9 100644 --- a/test/llvm_autogenerated/return-void.wast +++ b/test/llvm_autogenerated/return-void.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "return_void" (func $return_void)) diff --git a/test/llvm_autogenerated/select.wast b/test/llvm_autogenerated/select.wast index 468de2072..b8d938e2a 100644 --- a/test/llvm_autogenerated/select.wast +++ b/test/llvm_autogenerated/select.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "select_i32_bool" (func $select_i32_bool)) diff --git a/test/llvm_autogenerated/signext-zeroext.wast b/test/llvm_autogenerated/signext-zeroext.wast index 0c4d64a37..643c6c8a6 100644 --- a/test/llvm_autogenerated/signext-zeroext.wast +++ b/test/llvm_autogenerated/signext-zeroext.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "z2s_func" (func $z2s_func)) diff --git a/test/llvm_autogenerated/store-trunc.wast b/test/llvm_autogenerated/store-trunc.wast index 4a6022a5d..8b87d6a53 100644 --- a/test/llvm_autogenerated/store-trunc.wast +++ b/test/llvm_autogenerated/store-trunc.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "trunc_i8_i32" (func $trunc_i8_i32)) diff --git a/test/llvm_autogenerated/store.wast b/test/llvm_autogenerated/store.wast index 1c57889e2..e41f7e07c 100644 --- a/test/llvm_autogenerated/store.wast +++ b/test/llvm_autogenerated/store.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (export "memory" (memory $0)) (export "sti32" (func $sti32)) diff --git a/test/llvm_autogenerated/switch.wast b/test/llvm_autogenerated/switch.wast index a106a69b6..6a871fdd1 100644 --- a/test/llvm_autogenerated/switch.wast +++ b/test/llvm_autogenerated/switch.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$v (func)) (import "env" "foo0" (func $foo0)) diff --git a/test/llvm_autogenerated/unreachable.wast b/test/llvm_autogenerated/unreachable.wast index 5d45293cf..7ebf6bf0c 100644 --- a/test/llvm_autogenerated/unreachable.wast +++ b/test/llvm_autogenerated/unreachable.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$v (func)) (import "env" "abort" (func $abort)) diff --git a/test/llvm_autogenerated/unused-argument.wast b/test/llvm_autogenerated/unused-argument.wast index 878d92c57..ff112b5c6 100644 --- a/test/llvm_autogenerated/unused-argument.wast +++ b/test/llvm_autogenerated/unused-argument.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$i (func (result i32))) (import "env" "return_something" (func $return_something (result i32))) diff --git a/test/llvm_autogenerated/userstack.wast b/test/llvm_autogenerated/userstack.wast index 8883eb112..4b07bf73b 100644 --- a/test/llvm_autogenerated/userstack.wast +++ b/test/llvm_autogenerated/userstack.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$vi (func (param i32))) (import "env" "ext_func" (func $ext_func (param i32))) diff --git a/test/llvm_autogenerated/varargs.wast b/test/llvm_autogenerated/varargs.wast index 62d2d9aa4..a5b768705 100644 --- a/test/llvm_autogenerated/varargs.wast +++ b/test/llvm_autogenerated/varargs.wast @@ -1,5 +1,5 @@ (module - (memory 1) + (memory $0 1) (data (i32.const 4) "\10\04\00\00") (type $FUNCSIG$v (func)) (type $FUNCSIG$vi (func (param i32))) diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index e8dbd3f28..923b42a96 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -25,7 +25,7 @@ (import "env" "___unlock" (func $xa (param i32))) (import "env" "___syscall146" (func $ya (param i32 i32) (result i32))) (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 8 8 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 6d0ada287..b42004d31 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -23,7 +23,7 @@ (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 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 8 8 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index c3a8c7d63..674f09385 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -23,7 +23,7 @@ (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 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 8 8 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index 3c7d6a1b4..110a38651 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -24,7 +24,7 @@ (import "env" "___unlock" (func $xa (param i32))) (import "env" "___syscall146" (func $ya (param i32 i32) (result i32))) (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 8 8 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/min.fromasm b/test/min.fromasm index 0c5a14670..d53950b92 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -1,7 +1,7 @@ (module (data (get_global $memoryBase) "min.asm.js") (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32)) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise index 485e2593c..3ac6ba12f 100644 --- a/test/min.fromasm.imprecise +++ b/test/min.fromasm.imprecise @@ -1,6 +1,6 @@ (module (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32)) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 89326688f..133f734ad 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -1,6 +1,6 @@ (module (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32)) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index 89326688f..133f734ad 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -1,6 +1,6 @@ (module (import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32)) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/min.wast b/test/min.wast index 53587b679..0a101594f 100644 --- a/test/min.wast +++ b/test/min.wast @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param f32) (result f32))) (type $1 (func (param i32 i32) (result f32))) (type $2 (func (param i32) (result i32))) diff --git a/test/min.wast.fromBinary b/test/min.wast.fromBinary index 56b97fc0d..2dd495580 100644 --- a/test/min.wast.fromBinary +++ b/test/min.wast.fromBinary @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param f32) (result f32))) (type $1 (func (param i32 i32) (result f32))) (type $2 (func (param i32) (result i32))) diff --git a/test/min.wast.fromBinary.noDebugInfo b/test/min.wast.fromBinary.noDebugInfo index fef2ee4af..731d6095d 100644 --- a/test/min.wast.fromBinary.noDebugInfo +++ b/test/min.wast.fromBinary.noDebugInfo @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param f32) (result f32))) (type $1 (func (param i32 i32) (result f32))) (type $2 (func (param i32) (result i32))) diff --git a/test/passes/O.txt b/test/passes/O.txt index a70afc81a..855e736ff 100644 --- a/test/passes/O.txt +++ b/test/passes/O.txt @@ -1,5 +1,5 @@ (module - (memory 0) + (memory $0 0) (type $0 (func (result i32))) (func $ret (type $0) (result i32) (block $out i32 diff --git a/test/passes/coalesce-locals-learning.txt b/test/passes/coalesce-locals-learning.txt index 06b96b497..ae9843094 100644 --- a/test/passes/coalesce-locals-learning.txt +++ b/test/passes/coalesce-locals-learning.txt @@ -1,5 +1,5 @@ (module - (memory 10) + (memory $0 10) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $2 (func)) diff --git a/test/passes/coalesce-locals.txt b/test/passes/coalesce-locals.txt index a6af3d5d1..4306adef8 100644 --- a/test/passes/coalesce-locals.txt +++ b/test/passes/coalesce-locals.txt @@ -1,5 +1,5 @@ (module - (memory 10) + (memory $0 10) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $2 (func)) diff --git a/test/passes/dce.txt b/test/passes/dce.txt index a5843e73d..443417744 100644 --- a/test/passes/dce.txt +++ b/test/passes/dce.txt @@ -1,5 +1,5 @@ (module - (memory 10) + (memory $0 10) (type $ii (func (param i32 i32))) (type $1 (func)) (table 1 1 anyfunc) diff --git a/test/passes/duplicate-function-elimination.txt b/test/passes/duplicate-function-elimination.txt index e9cabe2ad..8c6bc5fe1 100644 --- a/test/passes/duplicate-function-elimination.txt +++ b/test/passes/duplicate-function-elimination.txt @@ -1,12 +1,12 @@ (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (nop) ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -18,7 +18,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (drop @@ -27,7 +27,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -41,7 +41,7 @@ ) ) (module - (memory 0) + (memory $0 0) (start $keep2) (type $0 (func)) (export "keep2" (func $keep2)) @@ -57,7 +57,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2-after-two-passes (type $0) (nop) @@ -67,7 +67,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep-4 (type $0) (nop) @@ -83,7 +83,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $T (func (result i32))) (type $S (func (result i32))) (type $2 (func)) @@ -106,7 +106,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $S (func (result i32))) (type $1 (func (param i32))) (func $keep2-similar-but-func-sig-differs (type $1) (param $i i32) @@ -119,7 +119,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (nop) @@ -130,7 +130,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (block $block0 @@ -138,7 +138,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (block $block0 @@ -151,7 +151,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (block $block0 @@ -160,7 +160,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (block $block0 @@ -175,7 +175,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (block $block0 @@ -189,7 +189,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase-since-block-names-do-not-matter (type $0) (block $foo @@ -197,7 +197,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase-since-block-names-do-not-matter (type $0) (block $foo @@ -209,7 +209,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (block $foo @@ -233,7 +233,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (block $foo @@ -251,7 +251,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (block $foo @@ -262,7 +262,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (block $foo @@ -280,7 +280,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (loop $bar @@ -289,7 +289,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -313,7 +313,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (block $foo @@ -326,7 +326,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (block $foo @@ -348,14 +348,14 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (call $erase) ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2-but-in-theory-we-could-erase (type $0) (call $keep2-but-in-theory-we-could-erase) @@ -365,7 +365,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $FUNCSIG$v (func)) (import "env" "i" (func $i)) (import "env" "j" (func $j)) @@ -374,7 +374,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $FUNCSIG$v (func)) (import "env" "i" (func $i)) (import "env" "j" (func $j)) @@ -386,7 +386,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $T (func)) (table 2 2 anyfunc) (elem (i32.const 0) $erase $erase) @@ -397,7 +397,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $T (func)) (table 2 2 anyfunc) (elem (i32.const 0) $keep2 $other) @@ -413,7 +413,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $T (func)) (type $S (func)) (table 2 2 anyfunc) @@ -430,7 +430,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase-even-locals-with-different-names (type $0) (local $i i32) @@ -440,7 +440,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (local $i i32) @@ -456,7 +456,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase-even-locals-with-different-names (type $0) (local $i i32) @@ -466,7 +466,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (local $i i32) @@ -482,7 +482,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (local $i i32) @@ -498,7 +498,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $erase (type $0) (drop @@ -514,7 +514,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (drop @@ -532,7 +532,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (drop @@ -550,7 +550,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (drop @@ -568,7 +568,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (drop @@ -586,7 +586,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (drop @@ -604,7 +604,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $erase (type $0) (i32.store @@ -618,7 +618,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (i32.store offset=3 @@ -634,7 +634,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (i32.store16 offset=3 @@ -650,7 +650,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (i32.store16 @@ -666,7 +666,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (i32.store16 offset=3 @@ -682,7 +682,7 @@ ) ) (module - (memory 10) + (memory $0 10) (type $0 (func)) (func $keep2 (type $0) (i32.store16 offset=3 @@ -698,7 +698,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -712,7 +712,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -726,7 +726,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -740,7 +740,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -754,7 +754,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -768,7 +768,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -782,7 +782,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (drop @@ -793,7 +793,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -811,7 +811,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -829,7 +829,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (drop @@ -841,7 +841,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -861,7 +861,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -881,7 +881,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep2 (type $0) (drop @@ -901,7 +901,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (drop @@ -914,7 +914,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep (type $0) (drop @@ -936,7 +936,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep (type $0) (drop @@ -958,7 +958,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep (type $0) (drop @@ -980,14 +980,14 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (return) ) ) (module - (memory 0) + (memory $0 0) (type $0 (func (result i32))) (func $erase (type $0) (result i32) (return @@ -996,7 +996,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func (result i32))) (func $keep (type $0) (result i32) (return @@ -1010,7 +1010,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (drop @@ -1019,7 +1019,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $erase (type $0) (drop @@ -1030,7 +1030,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep (type $0) (drop @@ -1048,7 +1048,7 @@ ) ) (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $keep (type $0) (drop diff --git a/test/passes/metrics.txt b/test/passes/metrics.txt index 1310d9363..24a2dd381 100644 --- a/test/passes/metrics.txt +++ b/test/passes/metrics.txt @@ -8,7 +8,7 @@ Counts drop : 6 if : 4 (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param i32))) (func $ifs (type $0) (param $x i32) (local $y f32) diff --git a/test/passes/nm.txt b/test/passes/nm.txt index 27b12bfda..ebd12edd4 100644 --- a/test/passes/nm.txt +++ b/test/passes/nm.txt @@ -2,7 +2,7 @@ $b : 5 $c : 13 (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $a (type $0) (nop) diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt index ca5f02849..611b16e41 100644 --- a/test/passes/optimize-instructions.txt +++ b/test/passes/optimize-instructions.txt @@ -1,5 +1,5 @@ (module - (memory 0) + (memory $0 0) (type $0 (func (param i32 i64))) (func $f (type $0) (param $i1 i32) (param $i2 i64) (if diff --git a/test/passes/post-emscripten.txt b/test/passes/post-emscripten.txt index fd2ada3c1..f51111524 100644 --- a/test/passes/post-emscripten.txt +++ b/test/passes/post-emscripten.txt @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param i32))) (func $b0 (type $0) (param $x i32) (drop diff --git a/test/passes/precompute.txt b/test/passes/precompute.txt index 48a6c0f4d..4d3d839bd 100644 --- a/test/passes/precompute.txt +++ b/test/passes/precompute.txt @@ -1,5 +1,5 @@ (module - (memory 0) + (memory $0 0) (type $0 (func (param i32))) (type $1 (func (result i32))) (type $2 (func)) diff --git a/test/passes/remove-imports.txt b/test/passes/remove-imports.txt index b8d45e8eb..9ae45a593 100644 --- a/test/passes/remove-imports.txt +++ b/test/passes/remove-imports.txt @@ -1,5 +1,5 @@ (module - (memory 1024 1024) + (memory $0 1024 1024) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$d (func (result f64))) diff --git a/test/passes/remove-memory.txt b/test/passes/remove-memory.txt index bb4f2c7db..79123eaf7 100644 --- a/test/passes/remove-memory.txt +++ b/test/passes/remove-memory.txt @@ -1,3 +1,3 @@ (module - (memory 1024 1024) + (memory $0 1024 1024) ) diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt index a5156a4bf..1637abe95 100644 --- a/test/passes/remove-unused-brs.txt +++ b/test/passes/remove-unused-brs.txt @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param i32))) (type $1 (func)) (type $2 (func (result i32))) diff --git a/test/passes/remove-unused-functions.txt b/test/passes/remove-unused-functions.txt index 1bd30e866..5e5aa1349 100644 --- a/test/passes/remove-unused-functions.txt +++ b/test/passes/remove-unused-functions.txt @@ -1,5 +1,5 @@ (module - (memory 0) + (memory $0 0) (start $start) (type $0 (func)) (export "exported" (func $exported)) diff --git a/test/passes/remove-unused-names.txt b/test/passes/remove-unused-names.txt index fa42e8d28..4f2e3d1ad 100644 --- a/test/passes/remove-unused-names.txt +++ b/test/passes/remove-unused-names.txt @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param i32) (result i32))) (type $1 (func)) (func $b0 (type $0) (param $i1 i32) (result i32) diff --git a/test/passes/remove-unused-names_merge-blocks.txt b/test/passes/remove-unused-names_merge-blocks.txt index ae60d4155..55abcfe7f 100644 --- a/test/passes/remove-unused-names_merge-blocks.txt +++ b/test/passes/remove-unused-names_merge-blocks.txt @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $i (func (param i32))) (type $ii (func (param i32 i32))) (type $iii (func (param i32 i32 i32))) diff --git a/test/passes/reorder-functions.txt b/test/passes/reorder-functions.txt index d7b59a591..ae12e0797 100644 --- a/test/passes/reorder-functions.txt +++ b/test/passes/reorder-functions.txt @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func)) (func $c (type $0) (call $c) diff --git a/test/passes/reorder-locals.txt b/test/passes/reorder-locals.txt index c2b481cab..cd8ca37e5 100644 --- a/test/passes/reorder-locals.txt +++ b/test/passes/reorder-locals.txt @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func (param i32 i32))) (type $1 (func)) (func $b0-yes (type $0) (param $a i32) (param $b i32) diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index 58191acf5..d137592a7 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt index 74f03b3e9..2639dee5d 100644 --- a/test/passes/vacuum.txt +++ b/test/passes/vacuum.txt @@ -1,5 +1,5 @@ (module - (memory 256 256) + (memory $0 256 256) (type $0 (func)) (type $1 (func (param i32))) (type $2 (func (result f32))) diff --git a/test/reg_switch.wast b/test/reg_switch.wast index ef2142d2a..4a17d6590 100644 --- a/test/reg_switch.wast +++ b/test/reg_switch.wast @@ -1,5 +1,5 @@ (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $0 (type $0) (if diff --git a/test/reg_switch.wast.fromBinary b/test/reg_switch.wast.fromBinary index 7ea792099..ba51e89f4 100644 --- a/test/reg_switch.wast.fromBinary +++ b/test/reg_switch.wast.fromBinary @@ -1,5 +1,5 @@ (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $0 (type $0) (if diff --git a/test/reg_switch.wast.fromBinary.noDebugInfo b/test/reg_switch.wast.fromBinary.noDebugInfo index 7ea792099..ba51e89f4 100644 --- a/test/reg_switch.wast.fromBinary.noDebugInfo +++ b/test/reg_switch.wast.fromBinary.noDebugInfo @@ -1,5 +1,5 @@ (module - (memory 0) + (memory $0 0) (type $0 (func)) (func $0 (type $0) (if diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index 2f5c31458..3f9344720 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -2,7 +2,7 @@ (data (get_global $memoryBase) "two_sides.asm.js") (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 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise index c7b262bcd..f0b5af618 100644 --- a/test/two_sides.fromasm.imprecise +++ b/test/two_sides.fromasm.imprecise @@ -1,5 +1,5 @@ (module - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/two_sides.fromasm.imprecise.no-opts b/test/two_sides.fromasm.imprecise.no-opts index e695bc124..6c489599c 100644 --- a/test/two_sides.fromasm.imprecise.no-opts +++ b/test/two_sides.fromasm.imprecise.no-opts @@ -1,5 +1,5 @@ (module - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts index cb693267a..46d36938a 100644 --- a/test/two_sides.fromasm.no-opts +++ b/test/two_sides.fromasm.no-opts @@ -1,7 +1,7 @@ (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 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/unit.fromasm b/test/unit.fromasm index 15d41d43c..d20fce0e6 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -21,7 +21,7 @@ (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 "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 10 10 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index c5481b944..efe6d8192 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -16,7 +16,7 @@ (import "env" "h" (func $h (param i32))) (import "env" "return_int" (func $return_int (result i32))) (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 10 10 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index ba1102aa2..bd9f28762 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -16,7 +16,7 @@ (import "env" "h" (func $h (param i32))) (import "env" "return_int" (func $return_int (result i32))) (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 10 10 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 341593beb..e3ba4f7c0 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -20,7 +20,7 @@ (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 "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) - (import "env" "memory" (memory 256 256)) + (import "env" "memory" (memory $0 256 256)) (import "env" "table" (table 10 10 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/unit.wast b/test/unit.wast index 90fab25f3..56d77310a 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -1,5 +1,5 @@ (module - (memory 4096 4096) + (memory $0 4096 4096) (data (i32.const 1026) "\14\00") (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$v (func)) diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary index 4ff9f0d73..5e8ab323b 100644 --- a/test/unit.wast.fromBinary +++ b/test/unit.wast.fromBinary @@ -1,5 +1,5 @@ (module - (memory 4096 4096) + (memory $0 4096 4096) (data (i32.const 1026) "\14\00") (type $0 (func (param f32))) (type $1 (func)) diff --git a/test/unit.wast.fromBinary.noDebugInfo b/test/unit.wast.fromBinary.noDebugInfo index 04448e90b..d12ac3578 100644 --- a/test/unit.wast.fromBinary.noDebugInfo +++ b/test/unit.wast.fromBinary.noDebugInfo @@ -1,5 +1,5 @@ (module - (memory 4096 4096) + (memory $0 4096 4096) (data (i32.const 1026) "\14\00") (type $0 (func (param f32))) (type $1 (func)) |