summaryrefslogtreecommitdiff
path: root/test/lit
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-04-04 11:33:15 -0700
committerGitHub <noreply@github.com>2023-04-04 11:33:15 -0700
commita802fbe07c270f510c87dfa93577bd4731c075f3 (patch)
tree4c67b39ced46258593f6904bba4a5ac20292886c /test/lit
parent05e1183954e49f8b3a1669cc7973af590afe9fc3 (diff)
downloadbinaryen-a802fbe07c270f510c87dfa93577bd4731c075f3.tar.gz
binaryen-a802fbe07c270f510c87dfa93577bd4731c075f3.tar.bz2
binaryen-a802fbe07c270f510c87dfa93577bd4731c075f3.zip
Use Names instead of indices to identify segments (#5618)
All top-level Module elements are identified and referred to by Name, but for historical reasons element and data segments were referred to by index instead. Fix this inconsistency by using Names to refer to segments from expressions that use them. Also parse and print segment names like we do for other elements. The C API is partially converted to use names instead of indices, but there are still many functions that refer to data segments by index. Finishing the conversion can be done in the future once it becomes necessary.
Diffstat (limited to 'test/lit')
-rw-r--r--test/lit/array-new-seg-note-count.wast7
-rw-r--r--test/lit/arrays.wast34
-rw-r--r--test/lit/ctor-eval/data_drop.wast6
-rw-r--r--test/lit/ctor-eval/table.wat2
-rw-r--r--test/lit/ctor-eval/v128.wast2
-rw-r--r--test/lit/multi-memories-basics.wast4
-rw-r--r--test/lit/parse-named-memory.wast2
-rw-r--r--test/lit/passes/O4_disable-bulk-memory.wast6
-rw-r--r--test/lit/passes/asyncify-wasm64.wast2
-rw-r--r--test/lit/passes/asyncify.wast2
-rw-r--r--test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast2
-rw-r--r--test/lit/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.wast2
-rw-r--r--test/lit/passes/asyncify_pass-arg=asyncify-ignore-imports.wast2
-rw-r--r--test/lit/passes/asyncify_pass-arg=asyncify-ignore-indirect.wast2
-rw-r--r--test/lit/passes/dae_all-features.wast2
-rw-r--r--test/lit/passes/dce_all-features.wast2
-rw-r--r--test/lit/passes/directize_all-features.wast56
-rw-r--r--test/lit/passes/flatten_all-features.wast2
-rw-r--r--test/lit/passes/fpcast-emu.wast4
-rw-r--r--test/lit/passes/generate-dyncalls_all-features.wast4
-rw-r--r--test/lit/passes/generate-i64-dyncalls.wast2
-rw-r--r--test/lit/passes/gufa-refs.wast16
-rw-r--r--test/lit/passes/gufa.wast10
-rw-r--r--test/lit/passes/inlining-optimizing_enable-threads.wast2
-rw-r--r--test/lit/passes/inlining-optimizing_optimize-level=3.wast4
-rw-r--r--test/lit/passes/inlining_enable-tail-call.wast2
-rw-r--r--test/lit/passes/inlining_optimize-level=3.wast2
-rw-r--r--test/lit/passes/jspi-table.wast2
-rw-r--r--test/lit/passes/memory-packing-gc.wast47
-rw-r--r--test/lit/passes/memory-packing_all-features.wast731
-rw-r--r--test/lit/passes/memory-packing_zero-filled-memory.wast2
-rw-r--r--test/lit/passes/multi-memory-lowering.wast12
-rw-r--r--test/lit/passes/remove-unused-module-elements_all-features.wast14
-rw-r--r--test/lit/passes/stack-check-memory64.wast4
-rw-r--r--test/lit/passes/type-ssa.wast24
-rw-r--r--test/lit/table-first-special.wast2
-rw-r--r--test/lit/validation/bulk.wast2
-rw-r--r--test/lit/validation/extended-const.wast2
-rw-r--r--test/lit/wasm-split/basic.wast14
-rw-r--r--test/lit/wasm-split/jspi-secondary-export.wast4
-rw-r--r--test/lit/wasm-split/jspi.wast4
-rw-r--r--test/lit/wat-kitchen-sink.wast21
42 files changed, 541 insertions, 527 deletions
diff --git a/test/lit/array-new-seg-note-count.wast b/test/lit/array-new-seg-note-count.wast
index 43720e731..6f1aaaf2c 100644
--- a/test/lit/array-new-seg-note-count.wast
+++ b/test/lit/array-new-seg-note-count.wast
@@ -6,12 +6,13 @@
(module
;; CHECK: (type $vec (array i32))
(type $vec (array i32))
+ (data "")
;; CHECK: (type $none_=>_ref|$vec| (func (result (ref $vec))))
- ;; CHECK: (data "")
- (data "")
+ ;; CHECK: (data $0 "")
+
;; CHECK: (func $test (type $none_=>_ref|$vec|) (result (ref $vec))
- ;; CHECK-NEXT: (array.new_data $vec 0
+ ;; CHECK-NEXT: (array.new_data $vec $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
diff --git a/test/lit/arrays.wast b/test/lit/arrays.wast
index 8cadc14fb..d4aa0a5bb 100644
--- a/test/lit/arrays.wast
+++ b/test/lit/arrays.wast
@@ -21,6 +21,10 @@
;; ROUNDTRIP: (type $func-array (array (mut funcref)))
(type $func-array (array (mut funcref)))
+ (data "hello")
+ (elem func $len $impossible-len $unreachable-len)
+
+
;; CHECK: (type $ref|array|_=>_i32 (func (param (ref array)) (result i32)))
;; CHECK: (type $nullref_=>_i32 (func (param nullref) (result i32)))
@@ -29,7 +33,15 @@
;; CHECK: (type $none_=>_ref|$func-array| (func (result (ref $func-array))))
- ;; CHECK: (data "hello")
+ ;; CHECK: (data $0 "hello")
+
+ ;; CHECK: (elem $0 func $len $impossible-len $unreachable-len)
+
+ ;; CHECK: (func $len (type $ref|array|_=>_i32) (param $a (ref array)) (result i32)
+ ;; CHECK-NEXT: (array.len
+ ;; CHECK-NEXT: (local.get $a)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; ROUNDTRIP: (type $ref|array|_=>_i32 (func (param (ref array)) (result i32)))
;; ROUNDTRIP: (type $nullref_=>_i32 (func (param nullref) (result i32)))
@@ -38,18 +50,10 @@
;; ROUNDTRIP: (type $none_=>_ref|$func-array| (func (result (ref $func-array))))
- ;; ROUNDTRIP: (data "hello")
- (data "hello")
- ;; CHECK: (elem func $len $impossible-len $unreachable-len)
- ;; ROUNDTRIP: (elem func $len $impossible-len $unreachable-len)
- (elem func $len $impossible-len $unreachable-len)
+ ;; ROUNDTRIP: (data $0 "hello")
+ ;; ROUNDTRIP: (elem $0 func $len $impossible-len $unreachable-len)
- ;; CHECK: (func $len (type $ref|array|_=>_i32) (param $a (ref array)) (result i32)
- ;; CHECK-NEXT: (array.len
- ;; CHECK-NEXT: (local.get $a)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
;; ROUNDTRIP: (func $len (type $ref|array|_=>_i32) (param $a (ref array)) (result i32)
;; ROUNDTRIP-NEXT: (array.len
;; ROUNDTRIP-NEXT: (local.get $a)
@@ -109,13 +113,13 @@
)
;; CHECK: (func $new-data (type $none_=>_ref|$byte-array|) (result (ref $byte-array))
- ;; CHECK-NEXT: (array.new_data $byte-array 0
+ ;; CHECK-NEXT: (array.new_data $byte-array $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 5)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; ROUNDTRIP: (func $new-data (type $none_=>_ref|$byte-array|) (result (ref $byte-array))
- ;; ROUNDTRIP-NEXT: (array.new_data $byte-array 0
+ ;; ROUNDTRIP-NEXT: (array.new_data $byte-array $0
;; ROUNDTRIP-NEXT: (i32.const 0)
;; ROUNDTRIP-NEXT: (i32.const 5)
;; ROUNDTRIP-NEXT: )
@@ -128,13 +132,13 @@
)
;; CHECK: (func $new-elem (type $none_=>_ref|$func-array|) (result (ref $func-array))
- ;; CHECK-NEXT: (array.new_elem $func-array 0
+ ;; CHECK-NEXT: (array.new_elem $func-array $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 3)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; ROUNDTRIP: (func $new-elem (type $none_=>_ref|$func-array|) (result (ref $func-array))
- ;; ROUNDTRIP-NEXT: (array.new_elem $func-array 0
+ ;; ROUNDTRIP-NEXT: (array.new_elem $func-array $0
;; ROUNDTRIP-NEXT: (i32.const 0)
;; ROUNDTRIP-NEXT: (i32.const 3)
;; ROUNDTRIP-NEXT: )
diff --git a/test/lit/ctor-eval/data_drop.wast b/test/lit/ctor-eval/data_drop.wast
index eeec5f165..4a1fcae1a 100644
--- a/test/lit/ctor-eval/data_drop.wast
+++ b/test/lit/ctor-eval/data_drop.wast
@@ -23,9 +23,9 @@
(data.drop 1)
)
)
-;; CHECK: (data (i32.const 0) "__________")
+;; CHECK: (data $0 (i32.const 0) "__________")
-;; CHECK: (data (i32.const 20) "__________")
+;; CHECK: (data $1 (i32.const 20) "__________")
;; CHECK: (export "test" (func $0))
@@ -34,5 +34,5 @@
;; CHECK-NEXT: (i32.const 4)
;; CHECK-NEXT: (i32.const 100)
;; CHECK-NEXT: )
-;; CHECK-NEXT: (data.drop 1)
+;; CHECK-NEXT: (data.drop $1)
;; CHECK-NEXT: )
diff --git a/test/lit/ctor-eval/table.wat b/test/lit/ctor-eval/table.wat
index 055de67b0..76e9a44af 100644
--- a/test/lit/ctor-eval/table.wat
+++ b/test/lit/ctor-eval/table.wat
@@ -10,7 +10,7 @@
(elem (i32.const 0) $nop)
- ;; CHECK: (elem (i32.const 0) $nop)
+ ;; CHECK: (elem $0 (i32.const 0) $nop)
;; CHECK: (elem declare func $trap)
diff --git a/test/lit/ctor-eval/v128.wast b/test/lit/ctor-eval/v128.wast
index 1d6cf6947..b3b8c98b3 100644
--- a/test/lit/ctor-eval/v128.wast
+++ b/test/lit/ctor-eval/v128.wast
@@ -9,7 +9,7 @@
;; CHECK: (memory $0 (shared 16 17))
(memory $0 (shared 16 17))
- ;; CHECK: (data (i32.const 23) "\e0\ff\c0N\8e\00\00\fe\01\00\12\81\85\fd\ff\90")
+ ;; CHECK: (data $0 (i32.const 23) "\e0\ff\c0N\8e\00\00\fe\01\00\12\81\85\fd\ff\90")
;; CHECK: (export "v128" (func $v128_0))
(export "v128" (func $v128))
diff --git a/test/lit/multi-memories-basics.wast b/test/lit/multi-memories-basics.wast
index 42b60915b..daeff3b5d 100644
--- a/test/lit/multi-memories-basics.wast
+++ b/test/lit/multi-memories-basics.wast
@@ -13,8 +13,6 @@
(memory $memory3 1 400)
(data (memory $memory1) (i32.const 0) "a" "" "bcd")
(import "env" "memory" (memory $importedMemory 1 1))
- ;; CHECK: (data (i32.const 0) "abcd")
-
;; CHECK: (func $memory.fill
;; CHECK-NEXT: (memory.fill $memory2
;; CHECK-NEXT: (i32.const 0)
@@ -44,7 +42,7 @@
)
)
;; CHECK: (func $memory.init
- ;; CHECK-NEXT: (memory.init $memory1 0
+ ;; CHECK-NEXT: (memory.init $memory1 $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 45)
diff --git a/test/lit/parse-named-memory.wast b/test/lit/parse-named-memory.wast
index 3573376a6..a335425ab 100644
--- a/test/lit/parse-named-memory.wast
+++ b/test/lit/parse-named-memory.wast
@@ -11,4 +11,4 @@
(memory $mem0 100)
(data (offset (i32.const 0)) "")
)
-;; CHECK: (data (i32.const 0) "")
+;; CHECK: (data $0 (i32.const 0) "")
diff --git a/test/lit/passes/O4_disable-bulk-memory.wast b/test/lit/passes/O4_disable-bulk-memory.wast
index c806bf867..2d7f92299 100644
--- a/test/lit/passes/O4_disable-bulk-memory.wast
+++ b/test/lit/passes/O4_disable-bulk-memory.wast
@@ -64,9 +64,9 @@
;; CHECK: (global $global$5 (mut i32) (i32.const 0))
- ;; CHECK: (data (i32.const 8) "\r\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00")
+ ;; CHECK: (data $0 (i32.const 8) "\r\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00")
- ;; CHECK: (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00")
+ ;; CHECK: (data $1 (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00")
;; CHECK: (table $0 1 funcref)
(table $0 1 funcref)
@@ -78,7 +78,7 @@
(global $global$4 f64 (f64.const 365.24))
(global $global$5 (mut i32) (i32.const 0))
(global $global$6 i32 (i32.const 100))
- ;; CHECK: (elem (i32.const 0) $null)
+ ;; CHECK: (elem $0 (i32.const 0) $null)
;; CHECK: (export "memory" (memory $1))
(export "memory" (memory $1))
diff --git a/test/lit/passes/asyncify-wasm64.wast b/test/lit/passes/asyncify-wasm64.wast
index 7d6c216e5..754af239b 100644
--- a/test/lit/passes/asyncify-wasm64.wast
+++ b/test/lit/passes/asyncify-wasm64.wast
@@ -27,7 +27,7 @@
;; CHECK: (table $0 2 2 funcref)
- ;; CHECK: (elem (i32.const 0) $liveness2 $liveness2)
+ ;; CHECK: (elem $0 (i32.const 0) $liveness2 $liveness2)
;; CHECK: (export "asyncify_start_unwind" (func $asyncify_start_unwind))
diff --git a/test/lit/passes/asyncify.wast b/test/lit/passes/asyncify.wast
index 0da90c173..2507375e7 100644
--- a/test/lit/passes/asyncify.wast
+++ b/test/lit/passes/asyncify.wast
@@ -26,7 +26,7 @@
;; CHECK: (table $0 2 2 funcref)
- ;; CHECK: (elem (i32.const 0) $liveness2 $liveness2)
+ ;; CHECK: (elem $0 (i32.const 0) $liveness2 $liveness2)
;; CHECK: (export "asyncify_start_unwind" (func $asyncify_start_unwind))
diff --git a/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast b/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast
index 28d3f88ba..9abf10062 100644
--- a/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast
+++ b/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast
@@ -23,7 +23,7 @@
;; CHECK: (table $0 1 funcref)
- ;; CHECK: (elem (i32.const 0))
+ ;; CHECK: (elem $0 (i32.const 0))
;; CHECK: (export "asyncify_start_unwind" (func $asyncify_start_unwind))
diff --git a/test/lit/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.wast b/test/lit/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.wast
index a43f13013..3871e88ca 100644
--- a/test/lit/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.wast
+++ b/test/lit/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.wast
@@ -31,7 +31,7 @@
;; CHECK: (table $0 2 2 funcref)
- ;; CHECK: (elem (i32.const 0) $calls-import2-drop $calls-import2-drop)
+ ;; CHECK: (elem $0 (i32.const 0) $calls-import2-drop $calls-import2-drop)
;; CHECK: (export "asyncify_start_unwind" (func $asyncify_start_unwind))
diff --git a/test/lit/passes/asyncify_pass-arg=asyncify-ignore-imports.wast b/test/lit/passes/asyncify_pass-arg=asyncify-ignore-imports.wast
index 7cd0137f3..a0861d7a6 100644
--- a/test/lit/passes/asyncify_pass-arg=asyncify-ignore-imports.wast
+++ b/test/lit/passes/asyncify_pass-arg=asyncify-ignore-imports.wast
@@ -26,7 +26,7 @@
;; CHECK: (table $0 2 2 funcref)
- ;; CHECK: (elem (i32.const 0) $calls-import2-drop $calls-import2-drop)
+ ;; CHECK: (elem $0 (i32.const 0) $calls-import2-drop $calls-import2-drop)
;; CHECK: (export "asyncify_start_unwind" (func $asyncify_start_unwind))
diff --git a/test/lit/passes/asyncify_pass-arg=asyncify-ignore-indirect.wast b/test/lit/passes/asyncify_pass-arg=asyncify-ignore-indirect.wast
index 83de99da1..5f8a9345c 100644
--- a/test/lit/passes/asyncify_pass-arg=asyncify-ignore-indirect.wast
+++ b/test/lit/passes/asyncify_pass-arg=asyncify-ignore-indirect.wast
@@ -26,7 +26,7 @@
;; CHECK: (table $0 2 2 funcref)
- ;; CHECK: (elem (i32.const 0) $calls-import2-drop $calls-import2-drop)
+ ;; CHECK: (elem $0 (i32.const 0) $calls-import2-drop $calls-import2-drop)
;; CHECK: (export "asyncify_start_unwind" (func $asyncify_start_unwind))
diff --git a/test/lit/passes/dae_all-features.wast b/test/lit/passes/dae_all-features.wast
index a1a357c98..8bfd3c9d0 100644
--- a/test/lit/passes/dae_all-features.wast
+++ b/test/lit/passes/dae_all-features.wast
@@ -22,7 +22,7 @@
;; CHECK: (table $0 2 2 funcref)
- ;; CHECK: (elem (i32.const 0) $a9 $c8)
+ ;; CHECK: (elem $0 (i32.const 0) $a9 $c8)
;; CHECK: (export "a8" (func $a8))
(export "a8" (func $a8))
diff --git a/test/lit/passes/dce_all-features.wast b/test/lit/passes/dce_all-features.wast
index 68f809926..adddfd3cc 100644
--- a/test/lit/passes/dce_all-features.wast
+++ b/test/lit/passes/dce_all-features.wast
@@ -28,7 +28,7 @@
;; CHECK: (table $0 1 1 funcref)
- ;; CHECK: (elem (i32.const 0) $call-me)
+ ;; CHECK: (elem $0 (i32.const 0) $call-me)
;; CHECK: (func $call-me (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (nop)
diff --git a/test/lit/passes/directize_all-features.wast b/test/lit/passes/directize_all-features.wast
index 3905ae557..ba168043d 100644
--- a/test/lit/passes/directize_all-features.wast
+++ b/test/lit/passes/directize_all-features.wast
@@ -14,12 +14,12 @@
(table $0 5 5 funcref)
(elem (i32.const 1) $foo)
- ;; CHECK: (elem (i32.const 1) $foo)
+ ;; CHECK: (elem $0 (i32.const 1) $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 1) $foo)
+ ;; IMMUT: (elem $0 (i32.const 1) $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -125,12 +125,12 @@
;; IMMUT: (table $1 5 5 funcref)
(table $1 5 5 funcref)
(elem (table $1) (i32.const 4) func $foo)
- ;; CHECK: (elem (table $1) (i32.const 4) func $foo)
+ ;; CHECK: (elem $0 (table $1) (i32.const 4) func $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (table $1) (i32.const 4) func $foo)
+ ;; IMMUT: (elem $0 (table $1) (i32.const 4) func $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -167,12 +167,12 @@
;; IMMUT: (table $0 5 5 funcref)
(table $0 5 5 funcref)
(elem (i32.const 0) $foo)
- ;; CHECK: (elem (i32.const 0) $foo)
+ ;; CHECK: (elem $0 (i32.const 0) $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 0) $foo)
+ ;; IMMUT: (elem $0 (i32.const 0) $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -260,12 +260,12 @@
;; IMMUT: (import "env" "table" (table $table 5 5 funcref))
(import "env" "table" (table $table 5 5 funcref))
(elem (i32.const 1) $foo)
- ;; CHECK: (elem (i32.const 1) $foo)
+ ;; CHECK: (elem $0 (i32.const 1) $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 1) $foo)
+ ;; IMMUT: (elem $0 (i32.const 1) $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -328,10 +328,10 @@
;; CHECK: (table $0 5 5 funcref)
;; IMMUT: (table $0 5 5 funcref)
(table $0 5 5 funcref)
- ;; CHECK: (elem (i32.const 1) $foo)
+ ;; CHECK: (elem $0 (i32.const 1) $foo)
;; CHECK: (export "tab" (table $0))
- ;; IMMUT: (elem (i32.const 1) $foo)
+ ;; IMMUT: (elem $0 (i32.const 1) $foo)
;; IMMUT: (export "tab" (table $0))
(export "tab" (table $0))
@@ -381,12 +381,12 @@
(table $0 5 5 funcref)
(global $g (import "env" "g") i32)
(elem (global.get $g) $foo)
- ;; CHECK: (elem (global.get $g) $foo)
+ ;; CHECK: (elem $0 (global.get $g) $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (global.get $g) $foo)
+ ;; IMMUT: (elem $0 (global.get $g) $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -433,12 +433,12 @@
(table $1 5 5 funcref)
(global $g (import "env" "g") i32)
(elem (table $1) (global.get $g) func $foo)
- ;; CHECK: (elem (table $1) (global.get $g) func $foo)
+ ;; CHECK: (elem $0 (table $1) (global.get $g) func $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (table $1) (global.get $g) func $foo)
+ ;; IMMUT: (elem $0 (table $1) (global.get $g) func $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -482,12 +482,12 @@
;; IMMUT: (table $0 5 5 funcref)
(table $0 5 5 funcref)
(elem (i32.const 1) $foo)
- ;; CHECK: (elem (i32.const 1) $foo)
+ ;; CHECK: (elem $0 (i32.const 1) $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 1) $foo)
+ ;; IMMUT: (elem $0 (i32.const 1) $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -527,12 +527,12 @@
;; IMMUT: (table $0 5 5 funcref)
(table $0 5 5 funcref)
(elem (i32.const 1) $foo)
- ;; CHECK: (elem (i32.const 1) $foo)
+ ;; CHECK: (elem $0 (i32.const 1) $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 1) $foo)
+ ;; IMMUT: (elem $0 (i32.const 1) $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -580,12 +580,12 @@
;; IMMUT: (table $0 5 5 funcref)
(table $0 5 5 funcref)
(elem (i32.const 1) $foo)
- ;; CHECK: (elem (i32.const 1) $foo)
+ ;; CHECK: (elem $0 (i32.const 1) $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 1) $foo)
+ ;; IMMUT: (elem $0 (i32.const 1) $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -637,12 +637,12 @@
;; IMMUT: (table $0 5 5 funcref)
(table $0 5 5 funcref)
(elem (i32.const 1) $foo)
- ;; CHECK: (elem (i32.const 1) $foo)
+ ;; CHECK: (elem $0 (i32.const 1) $foo)
;; CHECK: (func $foo (type $i32_=>_none) (param $0 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 1) $foo)
+ ;; IMMUT: (elem $0 (i32.const 1) $foo)
;; IMMUT: (func $foo (type $i32_=>_none) (param $0 i32)
;; IMMUT-NEXT: (unreachable)
@@ -742,12 +742,12 @@
;; IMMUT: (table $0 5 5 funcref)
(table $0 5 5 funcref)
(elem (i32.const 1) $foo)
- ;; CHECK: (elem (i32.const 1) $foo)
+ ;; CHECK: (elem $0 (i32.const 1) $foo)
;; CHECK: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 1) $foo)
+ ;; IMMUT: (elem $0 (i32.const 1) $foo)
;; IMMUT: (func $foo (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -795,12 +795,12 @@
;; IMMUT: (table $0 5 5 funcref)
(table $0 5 5 funcref)
(elem (i32.const 1) $foo1 $foo2)
- ;; CHECK: (elem (i32.const 1) $foo1 $foo2)
+ ;; CHECK: (elem $0 (i32.const 1) $foo1 $foo2)
;; CHECK: (func $foo1 (type $ii) (param $0 i32) (param $1 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 1) $foo1 $foo2)
+ ;; IMMUT: (elem $0 (i32.const 1) $foo1 $foo2)
;; IMMUT: (func $foo1 (type $ii) (param $0 i32) (param $1 i32)
;; IMMUT-NEXT: (unreachable)
@@ -1146,14 +1146,14 @@
(type $F (func (param (ref func))))
(elem (i32.const 10) $foo-ref $foo-ref)
- ;; CHECK: (elem (i32.const 10) $foo-ref $foo-ref)
+ ;; CHECK: (elem $0 (i32.const 10) $foo-ref $foo-ref)
;; CHECK: (elem declare func $select-non-nullable)
;; CHECK: (func $foo-ref (type $F) (param $0 (ref func))
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; IMMUT: (elem (i32.const 10) $foo-ref $foo-ref)
+ ;; IMMUT: (elem $0 (i32.const 10) $foo-ref $foo-ref)
;; IMMUT: (elem declare func $select-non-nullable)
diff --git a/test/lit/passes/flatten_all-features.wast b/test/lit/passes/flatten_all-features.wast
index 9667f23df..5d3dd3a1a 100644
--- a/test/lit/passes/flatten_all-features.wast
+++ b/test/lit/passes/flatten_all-features.wast
@@ -28,7 +28,7 @@
(memory $0 10)
;; CHECK: (table $0 1 1 funcref)
- ;; CHECK: (elem (i32.const 0) $call-me)
+ ;; CHECK: (elem $0 (i32.const 0) $call-me)
;; CHECK: (func $a1 (type $1)
;; CHECK-NEXT: (local $0 i32)
diff --git a/test/lit/passes/fpcast-emu.wast b/test/lit/passes/fpcast-emu.wast
index b40881e4f..b2c931448 100644
--- a/test/lit/passes/fpcast-emu.wast
+++ b/test/lit/passes/fpcast-emu.wast
@@ -24,7 +24,7 @@
(elem (i32.const 0) $a $b $c $d $e $e $imported-func)
;; CHECK: (table $0 10 10 funcref)
- ;; CHECK: (elem (i32.const 0) $byn$fpcast-emu$a $byn$fpcast-emu$b $byn$fpcast-emu$c $byn$fpcast-emu$d $byn$fpcast-emu$e $byn$fpcast-emu$e $byn$fpcast-emu$imported-func)
+ ;; CHECK: (elem $0 (i32.const 0) $byn$fpcast-emu$a $byn$fpcast-emu$b $byn$fpcast-emu$c $byn$fpcast-emu$d $byn$fpcast-emu$e $byn$fpcast-emu$e $byn$fpcast-emu$imported-func)
;; CHECK: (func $a (param $x i32) (param $y i64) (param $z f32) (param $w f64)
;; CHECK-NEXT: (drop
@@ -363,7 +363,7 @@
;; CHECK: (table $0 42 42 funcref)
- ;; CHECK: (elem (i32.const 0) $byn$fpcast-emu$a $byn$fpcast-emu$b)
+ ;; CHECK: (elem $0 (i32.const 0) $byn$fpcast-emu$a $byn$fpcast-emu$b)
;; CHECK: (export "dynCall_vf" (func $dynCall_vf))
(export "dynCall_vf" (func $dynCall_vf))
diff --git a/test/lit/passes/generate-dyncalls_all-features.wast b/test/lit/passes/generate-dyncalls_all-features.wast
index 63ca6a632..a7549ad48 100644
--- a/test/lit/passes/generate-dyncalls_all-features.wast
+++ b/test/lit/passes/generate-dyncalls_all-features.wast
@@ -20,7 +20,7 @@
(import "env" "invoke_vii" (func $invoke_vii (param i32 i32 i32)))
;; CHECK: (table $0 2 2 funcref)
- ;; CHECK: (elem (i32.const 0) $f1 $f2)
+ ;; CHECK: (elem $0 (i32.const 0) $f1 $f2)
;; CHECK: (export "dynCall_i" (func $dynCall_i))
@@ -77,7 +77,7 @@
;; CHECK: (import "env" "invoke_vii" (func $invoke_vii (param i32 i32 i32)))
(import "env" "table" (table 1 1 funcref))
(elem (i32.const 0) $f)
- ;; CHECK: (elem (i32.const 0) $f)
+ ;; CHECK: (elem $0 (i32.const 0) $f)
;; CHECK: (export "dynCall_i" (func $dynCall_i))
diff --git a/test/lit/passes/generate-i64-dyncalls.wast b/test/lit/passes/generate-i64-dyncalls.wast
index 8f5e602d5..cc4591bb3 100644
--- a/test/lit/passes/generate-i64-dyncalls.wast
+++ b/test/lit/passes/generate-i64-dyncalls.wast
@@ -12,7 +12,7 @@
;; CHECK: (table $0 2 2 funcref)
- ;; CHECK: (elem (i32.const 0) $f1 $f2)
+ ;; CHECK: (elem $0 (i32.const 0) $f1 $f2)
;; CHECK: (export "dynCall_ji" (func $dynCall_ji))
diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast
index 57aaa2f64..8bcf5c6a5 100644
--- a/test/lit/passes/gufa-refs.wast
+++ b/test/lit/passes/gufa-refs.wast
@@ -699,7 +699,7 @@
;; CHECK: (table $0 10 funcref)
- ;; CHECK: (elem (i32.const 0) $func-2params-a $func-2params-b $func-3params)
+ ;; CHECK: (elem $0 (i32.const 0) $func-2params-a $func-2params-b $func-3params)
;; CHECK: (func $func-2params-a (type $two-params) (param $x (ref $struct)) (param $y (ref $struct))
;; CHECK-NEXT: (drop
@@ -5402,24 +5402,26 @@
(type $array-i8 (array i8))
;; CHECK: (type $array-funcref (array funcref))
(type $array-funcref (array funcref))
- ;; CHECK: (type $ref|$array-i8|_ref|$array-funcref|_=>_none (func (param (ref $array-i8) (ref $array-funcref))))
-
- ;; CHECK: (data "hello")
(data "hello")
- ;; CHECK: (elem func $test)
(elem func $test)
+ ;; CHECK: (type $ref|$array-i8|_ref|$array-funcref|_=>_none (func (param (ref $array-i8) (ref $array-funcref))))
+
+ ;; CHECK: (data $0 "hello")
+
+ ;; CHECK: (elem $0 func $test)
+
;; CHECK: (export "test" (func $test))
;; CHECK: (func $test (type $ref|$array-i8|_ref|$array-funcref|_=>_none) (param $array-i8 (ref $array-i8)) (param $array-funcref (ref $array-funcref))
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (array.new_data $array-i8 0
+ ;; CHECK-NEXT: (array.new_data $array-i8 $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 5)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (array.new_elem $array-funcref 0
+ ;; CHECK-NEXT: (array.new_elem $array-funcref $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
diff --git a/test/lit/passes/gufa.wast b/test/lit/passes/gufa.wast
index bf0f39833..a4d983377 100644
--- a/test/lit/passes/gufa.wast
+++ b/test/lit/passes/gufa.wast
@@ -587,7 +587,7 @@
;; CHECK: (table $0 10 funcref)
- ;; CHECK: (elem (i32.const 0) $reffed)
+ ;; CHECK: (elem $0 (i32.const 0) $reffed)
;; CHECK: (export "table" (table $0))
(export "table" (table 0))
@@ -640,7 +640,7 @@
;; CHECK: (table $0 10 funcref)
- ;; CHECK: (elem (i32.const 0) $reffed)
+ ;; CHECK: (elem $0 (i32.const 0) $reffed)
;; CHECK: (func $reffed (type $i) (param $x i32)
;; CHECK-NEXT: (drop
@@ -687,7 +687,7 @@
;; CHECK: (table $0 10 funcref)
- ;; CHECK: (elem (i32.const 0) $reffed)
+ ;; CHECK: (elem $0 (i32.const 0) $reffed)
;; CHECK: (func $reffed (type $i) (param $x i32)
;; CHECK-NEXT: (drop
@@ -737,7 +737,7 @@
;; CHECK: (table $0 10 funcref)
- ;; CHECK: (elem (i32.const 0) $reffed)
+ ;; CHECK: (elem $0 (i32.const 0) $reffed)
;; CHECK: (func $reffed (type $i) (param $x i32)
;; CHECK-NEXT: (drop
@@ -789,7 +789,7 @@
;; CHECK: (table $0 10 funcref)
- ;; CHECK: (elem (i32.const 0) $reffed)
+ ;; CHECK: (elem $0 (i32.const 0) $reffed)
;; CHECK: (func $reffed (type $i) (param $x i32)
;; CHECK-NEXT: (drop
diff --git a/test/lit/passes/inlining-optimizing_enable-threads.wast b/test/lit/passes/inlining-optimizing_enable-threads.wast
index c3ed107af..ceaa1bfb5 100644
--- a/test/lit/passes/inlining-optimizing_enable-threads.wast
+++ b/test/lit/passes/inlining-optimizing_enable-threads.wast
@@ -10,7 +10,7 @@
;; CHECK: (table $0 1 1 funcref)
- ;; CHECK: (elem (i32.const 0) $tabled)
+ ;; CHECK: (elem $0 (i32.const 0) $tabled)
;; CHECK: (export "user" (func $user))
diff --git a/test/lit/passes/inlining-optimizing_optimize-level=3.wast b/test/lit/passes/inlining-optimizing_optimize-level=3.wast
index d51b48e9c..29ee11b46 100644
--- a/test/lit/passes/inlining-optimizing_optimize-level=3.wast
+++ b/test/lit/passes/inlining-optimizing_optimize-level=3.wast
@@ -97,9 +97,9 @@
(global $tempRet0 (mut i32) (i32.const 0))
(elem (global.get $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2)
(data (i32.const 1024) "emcc_hello_world.asm.js")
- ;; CHECK: (data (i32.const 1024) "emcc_hello_world.asm.js")
+ ;; CHECK: (data $0 (i32.const 1024) "emcc_hello_world.asm.js")
- ;; CHECK: (elem (global.get $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2)
+ ;; CHECK: (elem $0 (global.get $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2)
;; CHECK: (export "_i64Subtract" (func $_i64Subtract))
(export "_i64Subtract" (func $_i64Subtract))
diff --git a/test/lit/passes/inlining_enable-tail-call.wast b/test/lit/passes/inlining_enable-tail-call.wast
index 34b230371..75a421142 100644
--- a/test/lit/passes/inlining_enable-tail-call.wast
+++ b/test/lit/passes/inlining_enable-tail-call.wast
@@ -10,7 +10,7 @@
;; CHECK: (table $0 1 1 funcref)
- ;; CHECK: (elem (i32.const 0) $tabled)
+ ;; CHECK: (elem $0 (i32.const 0) $tabled)
;; CHECK: (export "user" (func $user))
diff --git a/test/lit/passes/inlining_optimize-level=3.wast b/test/lit/passes/inlining_optimize-level=3.wast
index 9e20e27dd..2fcdeef5c 100644
--- a/test/lit/passes/inlining_optimize-level=3.wast
+++ b/test/lit/passes/inlining_optimize-level=3.wast
@@ -12,7 +12,7 @@
;; CHECK: (table $0 1 1 funcref)
- ;; CHECK: (elem (i32.const 0) $no-loops-but-one-use-but-tabled)
+ ;; CHECK: (elem $0 (i32.const 0) $no-loops-but-one-use-but-tabled)
;; CHECK: (export "yes" (func $yes))
(export "yes" (func $yes))
diff --git a/test/lit/passes/jspi-table.wast b/test/lit/passes/jspi-table.wast
index 1963d5cb0..4d62c9876 100644
--- a/test/lit/passes/jspi-table.wast
+++ b/test/lit/passes/jspi-table.wast
@@ -12,7 +12,7 @@
;; CHECK: (table $0 1 1 funcref)
(table $0 1 1 funcref)
(elem (i32.const 1) func $update_state)
- ;; CHECK: (elem (i32.const 1) $export$update_state)
+ ;; CHECK: (elem $0 (i32.const 1) $export$update_state)
;; CHECK: (export "update_state" (func $export$update_state))
(export "update_state" (func $update_state))
diff --git a/test/lit/passes/memory-packing-gc.wast b/test/lit/passes/memory-packing-gc.wast
index 474c89c97..547dec807 100644
--- a/test/lit/passes/memory-packing-gc.wast
+++ b/test/lit/passes/memory-packing-gc.wast
@@ -8,13 +8,14 @@
;; CHECK: (type $array (array i8))
(type $array (array i8))
+ (data "hello")
+
;; CHECK: (type $none_=>_ref|$array| (func (result (ref $array))))
- ;; CHECK: (data "hello")
- (data "hello")
+ ;; CHECK: (data $0 "hello")
;; CHECK: (func $array-new-data (type $none_=>_ref|$array|) (result (ref $array))
- ;; CHECK-NEXT: (array.new_data $array 0
+ ;; CHECK-NEXT: (array.new_data $array $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 5)
;; CHECK-NEXT: )
@@ -32,13 +33,14 @@
;; CHECK: (type $array (array i8))
(type $array (array i8))
+ (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00hello\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+
;; CHECK: (type $none_=>_ref|$array| (func (result (ref $array))))
- ;; CHECK: (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00hello\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00hello\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ ;; CHECK: (data $0 "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00hello\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
;; CHECK: (func $no-drop-ends (type $none_=>_ref|$array|) (result (ref $array))
- ;; CHECK-NEXT: (array.new_data $array 0
+ ;; CHECK-NEXT: (array.new_data $array $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 5)
;; CHECK-NEXT: )
@@ -61,11 +63,12 @@
;; CHECK: (memory $mem 1 1)
(memory $mem 1 1)
- ;; CHECK: (data "optimize\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
(data "optimize\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
+ ;; CHECK: (data $0 "optimize\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
+
;; CHECK: (func $no-split (type $none_=>_ref|$array|) (result (ref $array))
- ;; CHECK-NEXT: (array.new_data $array 0
+ ;; CHECK-NEXT: (array.new_data $array $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 8)
;; CHECK-NEXT: )
@@ -90,10 +93,10 @@
(data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00optimize\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
- ;; CHECK: (data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00optimize\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ ;; CHECK: (data $0 (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00optimize\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
;; CHECK: (func $no-split-active (type $none_=>_ref|$array|) (result (ref $array))
- ;; CHECK-NEXT: (array.new_data $array 0
+ ;; CHECK-NEXT: (array.new_data $array $0
;; CHECK-NEXT: (i32.const 16)
;; CHECK-NEXT: (i32.const 8)
;; CHECK-NEXT: )
@@ -114,21 +117,21 @@
(data (i32.const 0) "optimize\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
+ (data "but not\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
+
;; CHECK: (type $none_=>_ref|$array| (func (result (ref $array))))
;; CHECK: (memory $mem 1 1)
+ (memory $mem 1 1)
- ;; CHECK: (data (i32.const 0) "optimize")
-
- ;; CHECK: (data (i32.const 24) "me")
+ ;; CHECK: (data $0 (i32.const 0) "optimize")
- ;; CHECK: (data "but not\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
- (data "but not\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
+ ;; CHECK: (data $0.1 (i32.const 24) "me")
- (memory $mem 1 1)
+ ;; CHECK: (data $1 "but not\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
;; CHECK: (func $renumber-segment (type $none_=>_ref|$array|) (result (ref $array))
- ;; CHECK-NEXT: (array.new_data $array 2
+ ;; CHECK-NEXT: (array.new_data $array $1
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 7)
;; CHECK-NEXT: )
@@ -148,17 +151,17 @@
(data "dead\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00segment")
+ (data "but not\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
+
;; CHECK: (type $none_=>_ref|$array| (func (result (ref $array))))
;; CHECK: (memory $mem 1 1)
-
- ;; CHECK: (data "but not\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
- (data "but not\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
-
(memory $mem 1 1)
+ ;; CHECK: (data $1 "but not\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00me")
+
;; CHECK: (func $renumber-segment (type $none_=>_ref|$array|) (result (ref $array))
- ;; CHECK-NEXT: (array.new_data $array 0
+ ;; CHECK-NEXT: (array.new_data $array $1
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 7)
;; CHECK-NEXT: )
diff --git a/test/lit/passes/memory-packing_all-features.wast b/test/lit/passes/memory-packing_all-features.wast
index 890fe20e6..66548d65c 100644
--- a/test/lit/passes/memory-packing_all-features.wast
+++ b/test/lit/passes/memory-packing_all-features.wast
@@ -31,7 +31,7 @@
(data (global.get $memoryBase) "waka this cannot be optimized\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00we don't know where it will go")
)
-;; CHECK: (data (global.get $memoryBase) "waka this cannot be optimized\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00we don\'t know where it will go")
+;; CHECK: (data $0 (global.get $memoryBase) "waka this cannot be optimized\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00we don\'t know where it will go")
(module
(memory 1 1)
@@ -47,19 +47,19 @@
;; CHECK: (memory $0 1 1)
- ;; CHECK: (data (i32.const 1024) "waka this CAN be optimized")
+ ;; CHECK: (data $0 (i32.const 1024) "waka this CAN be optimized")
- ;; CHECK: (data (i32.const 1107) "we DO know where it will go")
+ ;; CHECK: (data $0.1 (i32.const 1107) "we DO know where it will go")
- ;; CHECK: (data (i32.const 2057) "zeros before")
+ ;; CHECK: (data $1 (i32.const 2057) "zeros before")
- ;; CHECK: (data (i32.const 3000) "zeros after")
+ ;; CHECK: (data $2 (i32.const 3000) "zeros after")
- ;; CHECK: (data (i32.const 4000) "zeros\00in\00the\00middle")
+ ;; CHECK: (data $3 (i32.const 4000) "zeros\00in\00the\00middle")
- ;; CHECK: (data (i32.const 4035) "nice skip here")
+ ;; CHECK: (data $3.1 (i32.const 4035) "nice skip here")
- ;; CHECK: (data (i32.const 4066) "another\00but no")
+ ;; CHECK: (data $3.2 (i32.const 4066) "another\00but no")
;; CHECK: (func $nonzero-size-init-of-active-will-trap (type $none_=>_none)
;; CHECK-NEXT: (block
@@ -146,40 +146,41 @@
(data "not referenced, delete me") ;; 0
- ;; CHECK: (data "zeroes at start")
-
- ;; CHECK: (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes at start")
(data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes at start") ;; 1
- ;; CHECK: (data "\00\00\00few zeroes at start")
+ ;; CHECK: (data $1 "zeroes at start")
+
+ ;; CHECK: (data $2 "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes at start")
- ;; CHECK: (data "zeroes at end")
+ ;; CHECK: (data $3 "\00\00\00few zeroes at start")
- ;; CHECK: (data "zeroes at end\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ ;; CHECK: (data $4 "zeroes at end")
- ;; CHECK: (data "few zeroes at end\00\00\00")
+ ;; CHECK: (data $5 "zeroes at end\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $6 "few zeroes at end\00\00\00")
- ;; CHECK: (data "in middle")
+ ;; CHECK: (data $7 "zeroes")
- ;; CHECK: (data "zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00in middle")
+ ;; CHECK: (data $7.1 "in middle")
- ;; CHECK: (data "few zeroes\00\00\00in middle")
+ ;; CHECK: (data $8 "zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00in middle")
- ;; CHECK: (data "multiple")
+ ;; CHECK: (data $9 "few zeroes\00\00\00in middle")
- ;; CHECK: (data "spans")
+ ;; CHECK: (data $10 "multiple")
- ;; CHECK: (data "of zeroes")
+ ;; CHECK: (data $10.1 "spans")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $10.2 "of zeroes")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $11 "even")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $11.1 "more")
- ;; CHECK: (data "no zeroes")
+ ;; CHECK: (data $11.2 "zeroes")
+
+ ;; CHECK: (data $13 "no zeroes")
;; CHECK: (func $zeroes-at-start (type $none_=>_none)
;; CHECK-NEXT: (block
@@ -192,7 +193,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 0
+ ;; CHECK-NEXT: (memory.init $1
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 15)
@@ -202,7 +203,7 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 0)
+ ;; CHECK-NEXT: (data.drop $1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $zeroes-at-start
@@ -218,27 +219,27 @@
(data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes at start") ;; 2
;; CHECK: (func $zeroes-at-start-not-split (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 1
+ ;; CHECK-NEXT: (memory.init $2
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 45)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 1
+ ;; CHECK-NEXT: (memory.init $2
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 45)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 1
+ ;; CHECK-NEXT: (memory.init $2
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 45)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 1
+ ;; CHECK-NEXT: (memory.init $2
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 45)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 1)
+ ;; CHECK-NEXT: (data.drop $2)
;; CHECK-NEXT: )
(func $zeroes-at-start-not-split
(memory.init 2
@@ -267,12 +268,12 @@
(data "\00\00\00few zeroes at start") ;; 3
;; CHECK: (func $few-zeroes-at-start (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 2
+ ;; CHECK-NEXT: (memory.init $3
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 22)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 2)
+ ;; CHECK-NEXT: (data.drop $3)
;; CHECK-NEXT: )
(func $few-zeroes-at-start
(memory.init 3
@@ -287,7 +288,7 @@
;; CHECK: (func $zeroes-at-end (type $none_=>_none)
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (memory.init 3
+ ;; CHECK-NEXT: (memory.init $4
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 13)
@@ -298,7 +299,7 @@
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 3)
+ ;; CHECK-NEXT: (data.drop $4)
;; CHECK-NEXT: )
(func $zeroes-at-end
(memory.init 4
@@ -312,27 +313,27 @@
(data "zeroes at end\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 5
;; CHECK: (func $zeroes-at-end-not-split (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 4
+ ;; CHECK-NEXT: (memory.init $5
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 43)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 4
+ ;; CHECK-NEXT: (memory.init $5
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 43)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 4
+ ;; CHECK-NEXT: (memory.init $5
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 43)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 4
+ ;; CHECK-NEXT: (memory.init $5
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 43)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 4)
+ ;; CHECK-NEXT: (data.drop $5)
;; CHECK-NEXT: )
(func $zeroes-at-end-not-split
(memory.init 5
@@ -361,12 +362,12 @@
(data "few zeroes at end\00\00\00") ;; 6
;; CHECK: (func $few-zeroes-at-end (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 5
+ ;; CHECK-NEXT: (memory.init $6
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 20)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 5)
+ ;; CHECK-NEXT: (data.drop $6)
;; CHECK-NEXT: )
(func $few-zeroes-at-end
(memory.init 6
@@ -381,7 +382,7 @@
;; CHECK: (func $zeroes-in-middle (type $none_=>_none)
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (memory.init 6
+ ;; CHECK-NEXT: (memory.init $7
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 6)
@@ -391,15 +392,15 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 7
+ ;; CHECK-NEXT: (memory.init $7.1
;; CHECK-NEXT: (i32.const 36)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 9)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (data.drop 6)
- ;; CHECK-NEXT: (data.drop 7)
+ ;; CHECK-NEXT: (data.drop $7)
+ ;; CHECK-NEXT: (data.drop $7.1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $zeroes-in-middle
@@ -414,17 +415,17 @@
(data "zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00in middle") ;; 8
;; CHECK: (func $zeroes-in-middle-not-split (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 8
+ ;; CHECK-NEXT: (memory.init $8
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 35)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 8
+ ;; CHECK-NEXT: (memory.init $8
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 45)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 8)
+ ;; CHECK-NEXT: (data.drop $8)
;; CHECK-NEXT: )
(func $zeroes-in-middle-not-split
(memory.init 8
@@ -443,12 +444,12 @@
(data "few zeroes\00\00\00in middle") ;; 9
;; CHECK: (func $few-zeroes-in-middle (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 9
+ ;; CHECK-NEXT: (memory.init $9
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 22)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 9)
+ ;; CHECK-NEXT: (data.drop $9)
;; CHECK-NEXT: )
(func $few-zeroes-in-middle
(memory.init 9
@@ -463,7 +464,7 @@
;; CHECK: (func $multiple-spans-of-zeroes (type $none_=>_none)
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (memory.init 10
+ ;; CHECK-NEXT: (memory.init $10
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 8)
@@ -473,7 +474,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 11
+ ;; CHECK-NEXT: (memory.init $10.1
;; CHECK-NEXT: (i32.const 38)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 5)
@@ -483,16 +484,16 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 12
+ ;; CHECK-NEXT: (memory.init $10.2
;; CHECK-NEXT: (i32.const 73)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 9)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (data.drop 10)
- ;; CHECK-NEXT: (data.drop 11)
- ;; CHECK-NEXT: (data.drop 12)
+ ;; CHECK-NEXT: (data.drop $10)
+ ;; CHECK-NEXT: (data.drop $10.1)
+ ;; CHECK-NEXT: (data.drop $10.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $multiple-spans-of-zeroes
@@ -517,7 +518,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 13
+ ;; CHECK-NEXT: (memory.init $11
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -527,7 +528,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 14
+ ;; CHECK-NEXT: (memory.init $11.1
;; CHECK-NEXT: (i32.const 64)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -537,7 +538,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 15
+ ;; CHECK-NEXT: (memory.init $11.2
;; CHECK-NEXT: (i32.const 98)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 6)
@@ -552,9 +553,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_0
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 13)
- ;; CHECK-NEXT: (data.drop 14)
- ;; CHECK-NEXT: (data.drop 15)
+ ;; CHECK-NEXT: (data.drop $11)
+ ;; CHECK-NEXT: (data.drop $11.1)
+ ;; CHECK-NEXT: (data.drop $11.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $even-more-zeroes
@@ -596,12 +597,12 @@
(data "no zeroes") ;; 13
;; CHECK: (func $no-zeroes (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 16
+ ;; CHECK-NEXT: (memory.init $13
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 9)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 16)
+ ;; CHECK-NEXT: (data.drop $13)
;; CHECK-NEXT: )
(func $no-zeroes
(memory.init 13
@@ -688,70 +689,71 @@
(memory $0 2048 2048)
(import "env" "param" (global $param i32))
- ;; CHECK: (data "even")
+ (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 0
- ;; CHECK: (data "more")
+ ;; CHECK: (data $0 "even")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $0.1 "more")
- ;; CHECK: (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 0
+ ;; CHECK: (data $0.2 "zeroes")
+
+ ;; CHECK: (data $1 "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
- ;; CHECK: (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ ;; CHECK: (data $2 "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $3 "even")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $3.1 "more")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $3.2 "zeroes")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $4 "even")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $4.1 "more")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $4.2 "zeroes")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $5 "even")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $5.1 "more")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $5.2 "zeroes")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $6 "even")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $6.1 "more")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $6.2 "zeroes")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $7 "even")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $7.1 "more")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $7.2 "zeroes")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $8 "even")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $8.1 "more")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $8.2 "zeroes")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $9 "even")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $9.1 "more")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $9.2 "zeroes")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $10 "even")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $10.1 "more")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $10.2 "zeroes")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $14 "even")
- ;; CHECK: (data "more")
+ ;; CHECK: (data $14.1 "more")
- ;; CHECK: (data "zeroes")
+ ;; CHECK: (data $14.2 "zeroes")
;; CHECK: (func $nonconst-dest (type $none_=>_none)
;; CHECK-NEXT: (local $0 i32)
@@ -768,7 +770,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 0
+ ;; CHECK-NEXT: (memory.init $0
;; CHECK-NEXT: (i32.add
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (i32.const 30)
@@ -784,7 +786,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 1
+ ;; CHECK-NEXT: (memory.init $0.1
;; CHECK-NEXT: (i32.add
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (i32.const 64)
@@ -800,7 +802,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 2
+ ;; CHECK-NEXT: (memory.init $0.2
;; CHECK-NEXT: (i32.add
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (i32.const 98)
@@ -821,9 +823,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 0)
- ;; CHECK-NEXT: (data.drop 1)
- ;; CHECK-NEXT: (data.drop 2)
+ ;; CHECK-NEXT: (data.drop $0)
+ ;; CHECK-NEXT: (data.drop $0.1)
+ ;; CHECK-NEXT: (data.drop $0.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $nonconst-dest
@@ -838,12 +840,12 @@
(data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 1
;; CHECK: (func $nonconst-offset (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 3
+ ;; CHECK-NEXT: (memory.init $1
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (global.get $param)
;; CHECK-NEXT: (i32.const 134)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 3)
+ ;; CHECK-NEXT: (data.drop $1)
;; CHECK-NEXT: )
(func $nonconst-offset
(memory.init 1
@@ -857,12 +859,12 @@
(data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 2
;; CHECK: (func $nonconst-size (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 4
+ ;; CHECK-NEXT: (memory.init $2
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (global.get $param)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 4)
+ ;; CHECK-NEXT: (data.drop $2)
;; CHECK-NEXT: )
(func $nonconst-size
(memory.init 2
@@ -886,7 +888,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 20)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 5
+ ;; CHECK-NEXT: (memory.init $3
;; CHECK-NEXT: (i32.const 20)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -896,7 +898,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 6
+ ;; CHECK-NEXT: (memory.init $3.1
;; CHECK-NEXT: (i32.const 54)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -906,7 +908,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 7
+ ;; CHECK-NEXT: (memory.init $3.2
;; CHECK-NEXT: (i32.const 88)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 6)
@@ -921,9 +923,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_0
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 5)
- ;; CHECK-NEXT: (data.drop 6)
- ;; CHECK-NEXT: (data.drop 7)
+ ;; CHECK-NEXT: (data.drop $3)
+ ;; CHECK-NEXT: (data.drop $3.1)
+ ;; CHECK-NEXT: (data.drop $3.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $partial-skip-start
@@ -939,7 +941,7 @@
;; CHECK: (func $full-skip-start (type $none_=>_none)
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (memory.init 8
+ ;; CHECK-NEXT: (memory.init $4
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: (i32.const 2)
@@ -949,7 +951,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 9
+ ;; CHECK-NEXT: (memory.init $4.1
;; CHECK-NEXT: (i32.const 32)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -959,7 +961,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 10
+ ;; CHECK-NEXT: (memory.init $4.2
;; CHECK-NEXT: (i32.const 66)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 6)
@@ -971,9 +973,9 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (data.drop 8)
- ;; CHECK-NEXT: (data.drop 9)
- ;; CHECK-NEXT: (data.drop 10)
+ ;; CHECK-NEXT: (data.drop $4)
+ ;; CHECK-NEXT: (data.drop $4.1)
+ ;; CHECK-NEXT: (data.drop $4.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $full-skip-start
@@ -998,7 +1000,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 11
+ ;; CHECK-NEXT: (memory.init $5
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -1008,7 +1010,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 12
+ ;; CHECK-NEXT: (memory.init $5.1
;; CHECK-NEXT: (i32.const 64)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -1018,7 +1020,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 13
+ ;; CHECK-NEXT: (memory.init $5.2
;; CHECK-NEXT: (i32.const 98)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 6)
@@ -1033,9 +1035,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_1
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 11)
- ;; CHECK-NEXT: (data.drop 12)
- ;; CHECK-NEXT: (data.drop 13)
+ ;; CHECK-NEXT: (data.drop $5)
+ ;; CHECK-NEXT: (data.drop $5.1)
+ ;; CHECK-NEXT: (data.drop $5.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $partial-skip-end
@@ -1060,7 +1062,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 14
+ ;; CHECK-NEXT: (memory.init $6
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -1070,7 +1072,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 15
+ ;; CHECK-NEXT: (memory.init $6.1
;; CHECK-NEXT: (i32.const 64)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -1080,7 +1082,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 16
+ ;; CHECK-NEXT: (memory.init $6.2
;; CHECK-NEXT: (i32.const 98)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 4)
@@ -1090,9 +1092,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 14)
- ;; CHECK-NEXT: (data.drop 15)
- ;; CHECK-NEXT: (data.drop 16)
+ ;; CHECK-NEXT: (data.drop $6)
+ ;; CHECK-NEXT: (data.drop $6.1)
+ ;; CHECK-NEXT: (data.drop $6.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $full-skip-end
@@ -1122,9 +1124,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_3
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 17)
- ;; CHECK-NEXT: (data.drop 18)
- ;; CHECK-NEXT: (data.drop 19)
+ ;; CHECK-NEXT: (data.drop $7)
+ ;; CHECK-NEXT: (data.drop $7.1)
+ ;; CHECK-NEXT: (data.drop $7.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $slice-zeroes
@@ -1139,15 +1141,15 @@
(data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 8
;; CHECK: (func $slice-nonzeroes (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 20
+ ;; CHECK-NEXT: (memory.init $8
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (data.drop 20)
- ;; CHECK-NEXT: (data.drop 21)
- ;; CHECK-NEXT: (data.drop 22)
+ ;; CHECK-NEXT: (data.drop $8)
+ ;; CHECK-NEXT: (data.drop $8.1)
+ ;; CHECK-NEXT: (data.drop $8.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $slice-nonzeroes
@@ -1179,9 +1181,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_4
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 23)
- ;; CHECK-NEXT: (data.drop 24)
- ;; CHECK-NEXT: (data.drop 25)
+ ;; CHECK-NEXT: (data.drop $9)
+ ;; CHECK-NEXT: (data.drop $9.1)
+ ;; CHECK-NEXT: (data.drop $9.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $zero-size
@@ -1316,9 +1318,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_6
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 29)
- ;; CHECK-NEXT: (data.drop 30)
- ;; CHECK-NEXT: (data.drop 31)
+ ;; CHECK-NEXT: (data.drop $14)
+ ;; CHECK-NEXT: (data.drop $14.1)
+ ;; CHECK-NEXT: (data.drop $14.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $zero-size-at-bounds-offset
@@ -1346,25 +1348,25 @@
(memory $0 2048 2048)
(data "hi\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00hi") ;; 0
- ;; CHECK: (data "hi")
+ ;; CHECK: (data $0 "hi")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $0.1 "even")
- ;; CHECK: (data "hi")
+ ;; CHECK: (data $0.2 "hi")
- ;; CHECK: (data "hi")
+ ;; CHECK: (data $1 "hi")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $1.1 "even")
- ;; CHECK: (data "hi")
+ ;; CHECK: (data $1.2 "hi")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $2 "even")
- ;; CHECK: (data "hi")
+ ;; CHECK: (data $2.1 "hi")
- ;; CHECK: (data "even")
+ ;; CHECK: (data $3 "even")
- ;; CHECK: (data "hi")
+ ;; CHECK: (data $3.1 "hi")
;; CHECK: (func $zero-length-init-zeroes (type $none_=>_none)
;; CHECK-NEXT: (if
@@ -1384,9 +1386,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 0)
- ;; CHECK-NEXT: (data.drop 1)
- ;; CHECK-NEXT: (data.drop 2)
+ ;; CHECK-NEXT: (data.drop $0)
+ ;; CHECK-NEXT: (data.drop $0.1)
+ ;; CHECK-NEXT: (data.drop $0.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $zero-length-init-zeroes
@@ -1418,9 +1420,9 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_0
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 3)
- ;; CHECK-NEXT: (data.drop 4)
- ;; CHECK-NEXT: (data.drop 5)
+ ;; CHECK-NEXT: (data.drop $1)
+ ;; CHECK-NEXT: (data.drop $1.1)
+ ;; CHECK-NEXT: (data.drop $1.2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $zero-length-init-nonzeroes
@@ -1452,8 +1454,8 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_1
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 6)
- ;; CHECK-NEXT: (data.drop 7)
+ ;; CHECK-NEXT: (data.drop $2)
+ ;; CHECK-NEXT: (data.drop $2.1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $zero-length-init-zeroes-2
@@ -1485,8 +1487,8 @@
;; CHECK-NEXT: (global.set $__mem_segment_drop_state_2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (data.drop 8)
- ;; CHECK-NEXT: (data.drop 9)
+ ;; CHECK-NEXT: (data.drop $3)
+ ;; CHECK-NEXT: (data.drop $3.1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $zero-length-init-nonzeroes-2
@@ -1506,139 +1508,139 @@
(memory $0 2048 2048)
(data "a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a") ;; 64 ranges of zeroes
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.1 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.2 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.3 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.4 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.5 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.6 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.7 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.8 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.9 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.10 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.11 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.12 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.13 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.14 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.15 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.16 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.17 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.18 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.19 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.20 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.21 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.22 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.23 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.24 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.25 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.26 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.27 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.28 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.29 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.30 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.31 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.32 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.33 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.34 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.35 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.36 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.37 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.38 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.39 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.40 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.41 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.42 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.43 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.44 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.45 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.46 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.47 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.48 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.49 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.50 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.51 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.52 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.53 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.54 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.55 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.56 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.57 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.58 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.59 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.60 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.61 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.62 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.63 "a")
- ;; CHECK: (data "a")
+ ;; CHECK: (data $0.64 "a")
;; CHECK: (func $init-lots (type $none_=>_none)
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (memory.init 0
+ ;; CHECK-NEXT: (memory.init $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1648,7 +1650,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 1
+ ;; CHECK-NEXT: (memory.init $0.1
;; CHECK-NEXT: (i32.const 31)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1658,7 +1660,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 2
+ ;; CHECK-NEXT: (memory.init $0.2
;; CHECK-NEXT: (i32.const 62)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1668,7 +1670,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 3
+ ;; CHECK-NEXT: (memory.init $0.3
;; CHECK-NEXT: (i32.const 93)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1678,7 +1680,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 4
+ ;; CHECK-NEXT: (memory.init $0.4
;; CHECK-NEXT: (i32.const 124)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1688,7 +1690,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 5
+ ;; CHECK-NEXT: (memory.init $0.5
;; CHECK-NEXT: (i32.const 155)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1698,7 +1700,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 6
+ ;; CHECK-NEXT: (memory.init $0.6
;; CHECK-NEXT: (i32.const 186)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1708,7 +1710,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 7
+ ;; CHECK-NEXT: (memory.init $0.7
;; CHECK-NEXT: (i32.const 217)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1718,7 +1720,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 8
+ ;; CHECK-NEXT: (memory.init $0.8
;; CHECK-NEXT: (i32.const 248)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1728,7 +1730,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 9
+ ;; CHECK-NEXT: (memory.init $0.9
;; CHECK-NEXT: (i32.const 279)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1738,7 +1740,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 10
+ ;; CHECK-NEXT: (memory.init $0.10
;; CHECK-NEXT: (i32.const 310)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1748,7 +1750,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 11
+ ;; CHECK-NEXT: (memory.init $0.11
;; CHECK-NEXT: (i32.const 341)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1758,7 +1760,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 12
+ ;; CHECK-NEXT: (memory.init $0.12
;; CHECK-NEXT: (i32.const 372)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1768,7 +1770,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 13
+ ;; CHECK-NEXT: (memory.init $0.13
;; CHECK-NEXT: (i32.const 403)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1778,7 +1780,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 14
+ ;; CHECK-NEXT: (memory.init $0.14
;; CHECK-NEXT: (i32.const 434)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1788,7 +1790,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 15
+ ;; CHECK-NEXT: (memory.init $0.15
;; CHECK-NEXT: (i32.const 465)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1798,7 +1800,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 16
+ ;; CHECK-NEXT: (memory.init $0.16
;; CHECK-NEXT: (i32.const 496)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1808,7 +1810,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 17
+ ;; CHECK-NEXT: (memory.init $0.17
;; CHECK-NEXT: (i32.const 527)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1818,7 +1820,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 18
+ ;; CHECK-NEXT: (memory.init $0.18
;; CHECK-NEXT: (i32.const 558)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1828,7 +1830,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 19
+ ;; CHECK-NEXT: (memory.init $0.19
;; CHECK-NEXT: (i32.const 589)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1838,7 +1840,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 20
+ ;; CHECK-NEXT: (memory.init $0.20
;; CHECK-NEXT: (i32.const 620)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1848,7 +1850,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 21
+ ;; CHECK-NEXT: (memory.init $0.21
;; CHECK-NEXT: (i32.const 651)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1858,7 +1860,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 22
+ ;; CHECK-NEXT: (memory.init $0.22
;; CHECK-NEXT: (i32.const 682)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1868,7 +1870,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 23
+ ;; CHECK-NEXT: (memory.init $0.23
;; CHECK-NEXT: (i32.const 713)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1878,7 +1880,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 24
+ ;; CHECK-NEXT: (memory.init $0.24
;; CHECK-NEXT: (i32.const 744)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1888,7 +1890,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 25
+ ;; CHECK-NEXT: (memory.init $0.25
;; CHECK-NEXT: (i32.const 775)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1898,7 +1900,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 26
+ ;; CHECK-NEXT: (memory.init $0.26
;; CHECK-NEXT: (i32.const 806)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1908,7 +1910,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 27
+ ;; CHECK-NEXT: (memory.init $0.27
;; CHECK-NEXT: (i32.const 837)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1918,7 +1920,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 28
+ ;; CHECK-NEXT: (memory.init $0.28
;; CHECK-NEXT: (i32.const 868)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1928,7 +1930,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 29
+ ;; CHECK-NEXT: (memory.init $0.29
;; CHECK-NEXT: (i32.const 899)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1938,7 +1940,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 30
+ ;; CHECK-NEXT: (memory.init $0.30
;; CHECK-NEXT: (i32.const 930)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1948,7 +1950,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 31
+ ;; CHECK-NEXT: (memory.init $0.31
;; CHECK-NEXT: (i32.const 961)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1958,7 +1960,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 32
+ ;; CHECK-NEXT: (memory.init $0.32
;; CHECK-NEXT: (i32.const 992)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1968,7 +1970,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 33
+ ;; CHECK-NEXT: (memory.init $0.33
;; CHECK-NEXT: (i32.const 1023)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1978,7 +1980,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 34
+ ;; CHECK-NEXT: (memory.init $0.34
;; CHECK-NEXT: (i32.const 1054)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1988,7 +1990,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 35
+ ;; CHECK-NEXT: (memory.init $0.35
;; CHECK-NEXT: (i32.const 1085)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -1998,7 +2000,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 36
+ ;; CHECK-NEXT: (memory.init $0.36
;; CHECK-NEXT: (i32.const 1116)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -2008,7 +2010,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 37
+ ;; CHECK-NEXT: (memory.init $0.37
;; CHECK-NEXT: (i32.const 1147)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -2018,7 +2020,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 38
+ ;; CHECK-NEXT: (memory.init $0.38
;; CHECK-NEXT: (i32.const 1178)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -2028,7 +2030,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 39
+ ;; CHECK-NEXT: (memory.init $0.39
;; CHECK-NEXT: (i32.const 1209)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -2038,7 +2040,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 40
+ ;; CHECK-NEXT: (memory.init $0.40
;; CHECK-NEXT: (i32.const 1240)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -2048,7 +2050,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 41
+ ;; CHECK-NEXT: (memory.init $0.41
;; CHECK-NEXT: (i32.const 1271)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -2058,7 +2060,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 42
+ ;; CHECK-NEXT: (memory.init $0.42
;; CHECK-NEXT: (i32.const 1302)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -2068,7 +2070,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 43
+ ;; CHECK-NEXT: (memory.init $0.43
;; CHECK-NEXT: (i32.const 1333)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
@@ -2080,71 +2082,71 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (data.drop 0)
- ;; CHECK-NEXT: (data.drop 1)
- ;; CHECK-NEXT: (data.drop 2)
- ;; CHECK-NEXT: (data.drop 3)
- ;; CHECK-NEXT: (data.drop 4)
- ;; CHECK-NEXT: (data.drop 5)
- ;; CHECK-NEXT: (data.drop 6)
- ;; CHECK-NEXT: (data.drop 7)
- ;; CHECK-NEXT: (data.drop 8)
- ;; CHECK-NEXT: (data.drop 9)
- ;; CHECK-NEXT: (data.drop 10)
- ;; CHECK-NEXT: (data.drop 11)
- ;; CHECK-NEXT: (data.drop 12)
- ;; CHECK-NEXT: (data.drop 13)
- ;; CHECK-NEXT: (data.drop 14)
- ;; CHECK-NEXT: (data.drop 15)
- ;; CHECK-NEXT: (data.drop 16)
- ;; CHECK-NEXT: (data.drop 17)
- ;; CHECK-NEXT: (data.drop 18)
- ;; CHECK-NEXT: (data.drop 19)
- ;; CHECK-NEXT: (data.drop 20)
- ;; CHECK-NEXT: (data.drop 21)
- ;; CHECK-NEXT: (data.drop 22)
- ;; CHECK-NEXT: (data.drop 23)
- ;; CHECK-NEXT: (data.drop 24)
- ;; CHECK-NEXT: (data.drop 25)
- ;; CHECK-NEXT: (data.drop 26)
- ;; CHECK-NEXT: (data.drop 27)
- ;; CHECK-NEXT: (data.drop 28)
- ;; CHECK-NEXT: (data.drop 29)
- ;; CHECK-NEXT: (data.drop 30)
- ;; CHECK-NEXT: (data.drop 31)
- ;; CHECK-NEXT: (data.drop 32)
- ;; CHECK-NEXT: (data.drop 33)
- ;; CHECK-NEXT: (data.drop 34)
- ;; CHECK-NEXT: (data.drop 35)
- ;; CHECK-NEXT: (data.drop 36)
- ;; CHECK-NEXT: (data.drop 37)
- ;; CHECK-NEXT: (data.drop 38)
- ;; CHECK-NEXT: (data.drop 39)
- ;; CHECK-NEXT: (data.drop 40)
- ;; CHECK-NEXT: (data.drop 41)
- ;; CHECK-NEXT: (data.drop 42)
- ;; CHECK-NEXT: (data.drop 43)
- ;; CHECK-NEXT: (data.drop 44)
- ;; CHECK-NEXT: (data.drop 45)
- ;; CHECK-NEXT: (data.drop 46)
- ;; CHECK-NEXT: (data.drop 47)
- ;; CHECK-NEXT: (data.drop 48)
- ;; CHECK-NEXT: (data.drop 49)
- ;; CHECK-NEXT: (data.drop 50)
- ;; CHECK-NEXT: (data.drop 51)
- ;; CHECK-NEXT: (data.drop 52)
- ;; CHECK-NEXT: (data.drop 53)
- ;; CHECK-NEXT: (data.drop 54)
- ;; CHECK-NEXT: (data.drop 55)
- ;; CHECK-NEXT: (data.drop 56)
- ;; CHECK-NEXT: (data.drop 57)
- ;; CHECK-NEXT: (data.drop 58)
- ;; CHECK-NEXT: (data.drop 59)
- ;; CHECK-NEXT: (data.drop 60)
- ;; CHECK-NEXT: (data.drop 61)
- ;; CHECK-NEXT: (data.drop 62)
- ;; CHECK-NEXT: (data.drop 63)
- ;; CHECK-NEXT: (data.drop 64)
+ ;; CHECK-NEXT: (data.drop $0)
+ ;; CHECK-NEXT: (data.drop $0.1)
+ ;; CHECK-NEXT: (data.drop $0.2)
+ ;; CHECK-NEXT: (data.drop $0.3)
+ ;; CHECK-NEXT: (data.drop $0.4)
+ ;; CHECK-NEXT: (data.drop $0.5)
+ ;; CHECK-NEXT: (data.drop $0.6)
+ ;; CHECK-NEXT: (data.drop $0.7)
+ ;; CHECK-NEXT: (data.drop $0.8)
+ ;; CHECK-NEXT: (data.drop $0.9)
+ ;; CHECK-NEXT: (data.drop $0.10)
+ ;; CHECK-NEXT: (data.drop $0.11)
+ ;; CHECK-NEXT: (data.drop $0.12)
+ ;; CHECK-NEXT: (data.drop $0.13)
+ ;; CHECK-NEXT: (data.drop $0.14)
+ ;; CHECK-NEXT: (data.drop $0.15)
+ ;; CHECK-NEXT: (data.drop $0.16)
+ ;; CHECK-NEXT: (data.drop $0.17)
+ ;; CHECK-NEXT: (data.drop $0.18)
+ ;; CHECK-NEXT: (data.drop $0.19)
+ ;; CHECK-NEXT: (data.drop $0.20)
+ ;; CHECK-NEXT: (data.drop $0.21)
+ ;; CHECK-NEXT: (data.drop $0.22)
+ ;; CHECK-NEXT: (data.drop $0.23)
+ ;; CHECK-NEXT: (data.drop $0.24)
+ ;; CHECK-NEXT: (data.drop $0.25)
+ ;; CHECK-NEXT: (data.drop $0.26)
+ ;; CHECK-NEXT: (data.drop $0.27)
+ ;; CHECK-NEXT: (data.drop $0.28)
+ ;; CHECK-NEXT: (data.drop $0.29)
+ ;; CHECK-NEXT: (data.drop $0.30)
+ ;; CHECK-NEXT: (data.drop $0.31)
+ ;; CHECK-NEXT: (data.drop $0.32)
+ ;; CHECK-NEXT: (data.drop $0.33)
+ ;; CHECK-NEXT: (data.drop $0.34)
+ ;; CHECK-NEXT: (data.drop $0.35)
+ ;; CHECK-NEXT: (data.drop $0.36)
+ ;; CHECK-NEXT: (data.drop $0.37)
+ ;; CHECK-NEXT: (data.drop $0.38)
+ ;; CHECK-NEXT: (data.drop $0.39)
+ ;; CHECK-NEXT: (data.drop $0.40)
+ ;; CHECK-NEXT: (data.drop $0.41)
+ ;; CHECK-NEXT: (data.drop $0.42)
+ ;; CHECK-NEXT: (data.drop $0.43)
+ ;; CHECK-NEXT: (data.drop $0.44)
+ ;; CHECK-NEXT: (data.drop $0.45)
+ ;; CHECK-NEXT: (data.drop $0.46)
+ ;; CHECK-NEXT: (data.drop $0.47)
+ ;; CHECK-NEXT: (data.drop $0.48)
+ ;; CHECK-NEXT: (data.drop $0.49)
+ ;; CHECK-NEXT: (data.drop $0.50)
+ ;; CHECK-NEXT: (data.drop $0.51)
+ ;; CHECK-NEXT: (data.drop $0.52)
+ ;; CHECK-NEXT: (data.drop $0.53)
+ ;; CHECK-NEXT: (data.drop $0.54)
+ ;; CHECK-NEXT: (data.drop $0.55)
+ ;; CHECK-NEXT: (data.drop $0.56)
+ ;; CHECK-NEXT: (data.drop $0.57)
+ ;; CHECK-NEXT: (data.drop $0.58)
+ ;; CHECK-NEXT: (data.drop $0.59)
+ ;; CHECK-NEXT: (data.drop $0.60)
+ ;; CHECK-NEXT: (data.drop $0.61)
+ ;; CHECK-NEXT: (data.drop $0.62)
+ ;; CHECK-NEXT: (data.drop $0.63)
+ ;; CHECK-NEXT: (data.drop $0.64)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $init-lots
@@ -2162,23 +2164,23 @@
(data (i32.const 1024) "x")
(data (i32.const 1024) "\00") ;; this tramples the "x", and so must be kept.
)
-;; CHECK: (data (i32.const 1024) "x")
+;; CHECK: (data $0 (i32.const 1024) "x")
-;; CHECK: (data (i32.const 1024) "\00")
+;; CHECK: (data $1 (i32.const 1024) "\00")
(module
;; CHECK: (memory $0 1 1)
(memory $0 1 1)
(data (i32.const 1024) "x")
(data (i32.const 1025) "\00")
)
-;; CHECK: (data (i32.const 1024) "x")
+;; CHECK: (data $0 (i32.const 1024) "x")
(module
;; CHECK: (memory $0 1 1)
(memory $0 1 1)
(data (i32.const 1024) "x")
(data (i32.const 1023) "\00")
)
-;; CHECK: (data (i32.const 1024) "x")
+;; CHECK: (data $0 (i32.const 1024) "x")
(module
;; CHECK: (memory $0 1 1)
(memory $0 1 1)
@@ -2186,11 +2188,11 @@
(data (i32.const 1024) "\00") ;; when we see one bad thing, we give up
(data (i32.const 4096) "\00")
)
-;; CHECK: (data (i32.const 1024) "x")
+;; CHECK: (data $0 (i32.const 1024) "x")
-;; CHECK: (data (i32.const 1024) "\00")
+;; CHECK: (data $1 (i32.const 1024) "\00")
-;; CHECK: (data (i32.const 4096) "\00")
+;; CHECK: (data $2 (i32.const 4096) "\00")
(module
;; CHECK: (import "env" "memoryBase" (global $memoryBase i32))
@@ -2200,9 +2202,9 @@
(data (i32.const 1024) "x")
(data (global.get $memoryBase) "\00") ;; this could trample, or not
)
-;; CHECK: (data (i32.const 1024) "x")
+;; CHECK: (data $0 (i32.const 1024) "x")
-;; CHECK: (data (global.get $memoryBase) "\00")
+;; CHECK: (data $1 (global.get $memoryBase) "\00")
(module
;; CHECK: (import "env" "memoryBase" (global $memoryBase i32))
@@ -2212,9 +2214,9 @@
(data (i32.const 1024) "\00") ;; this could trample, or not
(data (global.get $memoryBase) "x")
)
-;; CHECK: (data (i32.const 1024) "\00")
+;; CHECK: (data $0 (i32.const 1024) "\00")
-;; CHECK: (data (global.get $memoryBase) "x")
+;; CHECK: (data $1 (global.get $memoryBase) "x")
(module
;; CHECK: (type $none_=>_none (func))
@@ -2223,9 +2225,9 @@
;; CHECK: (memory $0 1 1)
(memory $0 1 1)
(data "skipped\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00included")
- ;; CHECK: (data "skipped")
+ ;; CHECK: (data $0 "skipped")
- ;; CHECK: (data "included")
+ ;; CHECK: (data $0.1 "included")
;; CHECK: (export "func_54" (func $0))
(export "func_54" (func $0))
@@ -2239,7 +2241,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 1
+ ;; CHECK-NEXT: (memory.init $0.1
;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 8)
@@ -2260,9 +2262,9 @@
(data (i32.const 1024) "x")
(data (i32.const 2048) "\00")
)
-;; CHECK: (data (i32.const 1024) "x")
+;; CHECK: (data $0 (i32.const 1024) "x")
-;; CHECK: (data (i32.const 2048) "\00")
+;; CHECK: (data $1 (i32.const 2048) "\00")
(module
;; we can when not imported
;; CHECK: (memory $0 1 1)
@@ -2271,7 +2273,7 @@
(data (i32.const 2048) "\00")
)
-;; CHECK: (data (i32.const 1024) "x")
+;; CHECK: (data $0 (i32.const 1024) "x")
(module
;; Regression test for a bug where referrers were accidentally associated with
;; the wrong segments in the presence of unreferenced segments.
@@ -2280,10 +2282,11 @@
;; CHECK: (memory $0 (shared 1 1))
(memory $0 (shared 1 1))
(data (i32.const 0) "")
- ;; CHECK: (data "foo")
(data "foo")
+ ;; CHECK: (data $1 "foo")
+
;; CHECK: (func $0 (type $none_=>_none)
- ;; CHECK-NEXT: (memory.init 0
+ ;; CHECK-NEXT: (memory.init $1
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 1)
@@ -2306,9 +2309,9 @@
;; CHECK: (memory $0 i64 1 1)
(memory $0 i64 1 1)
(data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00wasm64\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00is cool")
- ;; CHECK: (data "wasm64")
+ ;; CHECK: (data $0 "wasm64")
- ;; CHECK: (data "is cool")
+ ;; CHECK: (data $0.1 "is cool")
;; CHECK: (func $0 (type $none_=>_none)
;; CHECK-NEXT: (if
@@ -2320,7 +2323,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i64.const 57)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 0
+ ;; CHECK-NEXT: (memory.init $0
;; CHECK-NEXT: (i64.const 57)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 6)
@@ -2330,7 +2333,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i64.const 57)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init 1
+ ;; CHECK-NEXT: (memory.init $0.1
;; CHECK-NEXT: (i64.const 120)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 7)
diff --git a/test/lit/passes/memory-packing_zero-filled-memory.wast b/test/lit/passes/memory-packing_zero-filled-memory.wast
index e9d2658c3..58ac799f5 100644
--- a/test/lit/passes/memory-packing_zero-filled-memory.wast
+++ b/test/lit/passes/memory-packing_zero-filled-memory.wast
@@ -10,4 +10,4 @@
(data (i32.const 1024) "x")
(data (i32.const 1023) "\00")
)
-;; CHECK: (data (i32.const 1024) "x")
+;; CHECK: (data $0 (i32.const 1024) "x")
diff --git a/test/lit/passes/multi-memory-lowering.wast b/test/lit/passes/multi-memory-lowering.wast
index 522662e64..3cc0f28a8 100644
--- a/test/lit/passes/multi-memory-lowering.wast
+++ b/test/lit/passes/multi-memory-lowering.wast
@@ -26,9 +26,9 @@
;; CHECK: (memory $combined_memory 6)
- ;; CHECK: (data (i32.const 0) "a")
+ ;; CHECK: (data $0 (i32.const 0) "a")
- ;; CHECK: (data (i32.const 196609) "123")
+ ;; CHECK: (data $1 (i32.const 196609) "123")
;; CHECK: (func $loads
;; CHECK-NEXT: (drop
@@ -71,9 +71,9 @@
;; BOUNDS: (memory $combined_memory 6)
- ;; BOUNDS: (data (i32.const 0) "a")
+ ;; BOUNDS: (data $0 (i32.const 0) "a")
- ;; BOUNDS: (data (i32.const 196609) "123")
+ ;; BOUNDS: (data $1 (i32.const 196609) "123")
;; BOUNDS: (func $loads
;; BOUNDS-NEXT: (local $0 i32)
@@ -737,7 +737,7 @@
)
;; CHECK: (func $memory.init
- ;; CHECK-NEXT: (memory.init 0
+ ;; CHECK-NEXT: (memory.init $0
;; CHECK-NEXT: (i32.add
;; CHECK-NEXT: (global.get $memory2_byte_offset)
;; CHECK-NEXT: (i32.const 0)
@@ -750,7 +750,7 @@
;; BOUNDS-NEXT: (local $0 i32)
;; BOUNDS-NEXT: (local $1 i32)
;; BOUNDS-NEXT: (local $2 i32)
- ;; BOUNDS-NEXT: (memory.init 0
+ ;; BOUNDS-NEXT: (memory.init $0
;; BOUNDS-NEXT: (block (result i32)
;; BOUNDS-NEXT: (local.set $2
;; BOUNDS-NEXT: (i32.add
diff --git a/test/lit/passes/remove-unused-module-elements_all-features.wast b/test/lit/passes/remove-unused-module-elements_all-features.wast
index 2e784e52b..00a9d8f14 100644
--- a/test/lit/passes/remove-unused-module-elements_all-features.wast
+++ b/test/lit/passes/remove-unused-module-elements_all-features.wast
@@ -15,7 +15,7 @@
;; CHECK: (table $0 1 1 funcref)
- ;; CHECK: (elem (i32.const 0) $called_indirect)
+ ;; CHECK: (elem $0 (i32.const 0) $called_indirect)
;; CHECK: (export "memory" (memory $0))
@@ -183,7 +183,7 @@
(import "env" "table2" (table $1 1 1 funcref))
(elem (table $1) (offset (i32.const 0)) func)
(elem (table $1) (offset (i32.const 0)) func $f)
- ;; CHECK: (elem (i32.const 0) $f)
+ ;; CHECK: (elem $1 (i32.const 0) $f)
;; CHECK: (func $f (type $none_=>_none)
;; CHECK-NEXT: (nop)
@@ -219,9 +219,9 @@
(import "env" "table" (table 1 funcref))
(data (i32.const 1) "hello, world!")
(elem (i32.const 0) $waka)
- ;; CHECK: (data (i32.const 1) "hello, world!")
+ ;; CHECK: (data $0 (i32.const 1) "hello, world!")
- ;; CHECK: (elem (i32.const 0) $waka)
+ ;; CHECK: (elem $0 (i32.const 0) $waka)
;; CHECK: (func $waka (type $none_=>_none)
;; CHECK-NEXT: (nop)
@@ -423,9 +423,9 @@
(import "env" "tableBase" (global $tableBase i32)) ;; used in init
(data (global.get $memoryBase) "hello, world!")
(elem (global.get $tableBase) $waka)
- ;; CHECK: (data (global.get $memoryBase) "hello, world!")
+ ;; CHECK: (data $0 (global.get $memoryBase) "hello, world!")
- ;; CHECK: (elem (global.get $tableBase) $waka)
+ ;; CHECK: (elem $0 (global.get $tableBase) $waka)
;; CHECK: (func $waka (type $none_=>_none)
;; CHECK-NEXT: (nop)
@@ -560,7 +560,7 @@
;; CHECK: (import "env" "table" (table $timport$0 6 6 funcref))
(import "env" "table" (table 6 6 funcref))
(elem (i32.const 0) $0)
- ;; CHECK: (elem (i32.const 0) $0)
+ ;; CHECK: (elem $0 (i32.const 0) $0)
;; CHECK: (func $0 (type $0) (param $var$0 f64) (result f64)
;; CHECK-NEXT: (if (result f64)
diff --git a/test/lit/passes/stack-check-memory64.wast b/test/lit/passes/stack-check-memory64.wast
index d844b6d45..ad2f75cb8 100644
--- a/test/lit/passes/stack-check-memory64.wast
+++ b/test/lit/passes/stack-check-memory64.wast
@@ -22,7 +22,7 @@
;; CHECK: (memory $0 i64 0 65536)
-;; CHECK: (data (i64.const 0) "")
+;; CHECK: (data $0 (i64.const 0) "")
;; CHECK: (export "use_stack" (func $0))
@@ -79,7 +79,7 @@
)
;; CHECK: (memory $0 i64 0 65536)
-;; CHECK: (data (i64.const 0) "")
+;; CHECK: (data $0 (i64.const 0) "")
;; CHECK: (export "__set_stack_limits" (func $__set_stack_limits))
diff --git a/test/lit/passes/type-ssa.wast b/test/lit/passes/type-ssa.wast
index 323ebb704..943915b95 100644
--- a/test/lit/passes/type-ssa.wast
+++ b/test/lit/passes/type-ssa.wast
@@ -242,6 +242,8 @@
(type $array-func (array (mut funcref)))
+ (elem func $array.new)
+
;; CHECK: (rec
;; CHECK-NEXT: (type $array$1 (array_subtype (mut anyref) $array))
@@ -257,15 +259,7 @@
;; CHECK: (type $none_=>_none (func))
- ;; CHECK: (elem func $array.new)
- ;; NOMNL: (type $array-func$4 (array_subtype (mut funcref) $array-func))
-
- ;; NOMNL: (type $array$5 (array_subtype (mut anyref) $array))
-
- ;; NOMNL: (type $array$6 (array_subtype (mut anyref) $array))
-
- ;; NOMNL: (elem func $array.new)
- (elem func $array.new)
+ ;; CHECK: (elem $0 func $array.new)
;; CHECK: (func $array.new (type $ref|i31|_anyref_=>_none) (param $refined (ref i31)) (param $null-any anyref)
;; CHECK-NEXT: (drop
@@ -292,6 +286,14 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; NOMNL: (type $array-func$4 (array_subtype (mut funcref) $array-func))
+
+ ;; NOMNL: (type $array$5 (array_subtype (mut anyref) $array))
+
+ ;; NOMNL: (type $array$6 (array_subtype (mut anyref) $array))
+
+ ;; NOMNL: (elem $0 func $array.new)
+
;; NOMNL: (func $array.new (type $ref|i31|_anyref_=>_none) (param $refined (ref i31)) (param $null-any anyref)
;; NOMNL-NEXT: (drop
;; NOMNL-NEXT: (array.new_default $array$1
@@ -349,7 +351,7 @@
;; CHECK: (func $array.new_seg (type $none_=>_none)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (array.new_elem $array-func$4 0
+ ;; CHECK-NEXT: (array.new_elem $array-func$4 $0
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 3)
;; CHECK-NEXT: )
@@ -357,7 +359,7 @@
;; CHECK-NEXT: )
;; NOMNL: (func $array.new_seg (type $none_=>_none)
;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (array.new_elem $array-func$4 0
+ ;; NOMNL-NEXT: (array.new_elem $array-func$4 $0
;; NOMNL-NEXT: (i32.const 0)
;; NOMNL-NEXT: (i32.const 3)
;; NOMNL-NEXT: )
diff --git a/test/lit/table-first-special.wast b/test/lit/table-first-special.wast
index 52f8f8494..4b54b72c4 100644
--- a/test/lit/table-first-special.wast
+++ b/test/lit/table-first-special.wast
@@ -35,7 +35,7 @@
;; CHECK-NODEBUG: (table $0 10 10 (ref null $i32_i32_=>_none))
-;; CHECK-NODEBUG: (elem (table $0) (i32.const 0) (ref null $i32_i32_=>_none))
+;; CHECK-NODEBUG: (elem $0 (table $0) (i32.const 0) (ref null $i32_i32_=>_none))
;; CHECK-NODEBUG: (func $0 (type $i32_i32_=>_none) (param $0 i32) (param $1 i32)
;; CHECK-NODEBUG-NEXT: (nop)
diff --git a/test/lit/validation/bulk.wast b/test/lit/validation/bulk.wast
index d53dae264..36d2841dd 100644
--- a/test/lit/validation/bulk.wast
+++ b/test/lit/validation/bulk.wast
@@ -2,7 +2,7 @@
;; RUN: not wasm-opt -all %s 2>&1 | filecheck %s
-;; CHECK: data.drop segment index out of bounds
+;; CHECK: unknown data segment
(module
(memory $0 16)
diff --git a/test/lit/validation/extended-const.wast b/test/lit/validation/extended-const.wast
index 715209341..9317f47b7 100644
--- a/test/lit/validation/extended-const.wast
+++ b/test/lit/validation/extended-const.wast
@@ -11,7 +11,7 @@
;; EXTENDED: (global.get $gimport$0)
;; EXTENDED: (i32.const 42)
;; EXTENDED: ))
-;; EXTENDED: (data (i32.sub
+;; EXTENDED: (data $0 (i32.sub
;; EXTENDED: (global.get $gimport$0)
;; EXTENDED: (i32.const 10)
;; EXTENDED: ) "hello world")
diff --git a/test/lit/wasm-split/basic.wast b/test/lit/wasm-split/basic.wast
index f06958bc3..7dcb7933b 100644
--- a/test/lit/wasm-split/basic.wast
+++ b/test/lit/wasm-split/basic.wast
@@ -66,14 +66,14 @@
;; KEEP-NONE-PRIMARY-NEXT: (type $i32_=>_i32 (func (param i32) (result i32)))
;; KEEP-NONE-PRIMARY-NEXT: (import "placeholder" "0" (func $placeholder_0 (param i32) (result i32)))
;; KEEP-NONE-PRIMARY-NEXT: (table $table 1 1 funcref)
-;; KEEP-NONE-PRIMARY-NEXT: (elem (i32.const 0) $placeholder_0)
+;; KEEP-NONE-PRIMARY-NEXT: (elem $0 (i32.const 0) $placeholder_0)
;; KEEP-NONE-PRIMARY-NEXT: (export "%table" (table $table))
;; KEEP-NONE-PRIMARY-NEXT: )
;; KEEP-NONE-SECONDARY: (module
;; KEEP-NONE-SECONDARY-NEXT: (type $i32_=>_i32 (func (param i32) (result i32)))
;; KEEP-NONE-SECONDARY-NEXT: (import "primary" "%table" (table $table 1 1 funcref))
-;; KEEP-NONE-SECONDARY-NEXT: (elem (i32.const 0) $foo)
+;; KEEP-NONE-SECONDARY-NEXT: (elem $0 (i32.const 0) $foo)
;; KEEP-NONE-SECONDARY-NEXT: (func $bar (param $0 i32) (result i32)
;; KEEP-NONE-SECONDARY-NEXT: (call $foo
;; KEEP-NONE-SECONDARY-NEXT: (i32.const 1)
@@ -93,7 +93,7 @@
;; KEEP-FOO-PRIMARY-NEXT: (type $i32_=>_i32 (func (param i32) (result i32)))
;; KEEP-FOO-PRIMARY-NEXT: (import "placeholder" "1" (func $placeholder_1 (param i32) (result i32)))
;; KEEP-FOO-PRIMARY-NEXT: (table $table 2 2 funcref)
-;; KEEP-FOO-PRIMARY-NEXT: (elem (i32.const 0) $foo $placeholder_1)
+;; KEEP-FOO-PRIMARY-NEXT: (elem $0 (i32.const 0) $foo $placeholder_1)
;; KEEP-FOO-PRIMARY-NEXT: (export "%foo" (func $foo))
;; KEEP-FOO-PRIMARY-NEXT: (export "%table" (table $table))
;; KEEP-FOO-PRIMARY-NEXT: (func $foo (param $0 i32) (result i32)
@@ -108,7 +108,7 @@
;; KEEP-FOO-SECONDARY-NEXT: (type $i32_=>_i32 (func (param i32) (result i32)))
;; KEEP-FOO-SECONDARY-NEXT: (import "primary" "%table" (table $table 2 2 funcref))
;; KEEP-FOO-SECONDARY-NEXT: (import "primary" "%foo" (func $foo (param i32) (result i32)))
-;; KEEP-FOO-SECONDARY-NEXT: (elem (i32.const 1) $bar)
+;; KEEP-FOO-SECONDARY-NEXT: (elem $0 (i32.const 1) $bar)
;; KEEP-FOO-SECONDARY-NEXT: (func $bar (param $0 i32) (result i32)
;; KEEP-FOO-SECONDARY-NEXT: (call $foo
;; KEEP-FOO-SECONDARY-NEXT: (i32.const 1)
@@ -123,7 +123,7 @@
;; KEEP-BAR-PRIMARY-NEXT: (type $i32_=>_i32 (func (param i32) (result i32)))
;; KEEP-BAR-PRIMARY-NEXT: (import "placeholder" "0" (func $placeholder_0 (param i32) (result i32)))
;; KEEP-BAR-PRIMARY-NEXT: (table $table 1 1 funcref)
-;; KEEP-BAR-PRIMARY-NEXT: (elem (i32.const 0) $placeholder_0)
+;; KEEP-BAR-PRIMARY-NEXT: (elem $0 (i32.const 0) $placeholder_0)
;; KEEP-BAR-PRIMARY-NEXT: (export "%bar" (func $bar))
;; KEEP-BAR-PRIMARY-NEXT: (export "%table" (table $table))
;; KEEP-BAR-PRIMARY-NEXT: (func $bar (param $0 i32) (result i32)
@@ -138,7 +138,7 @@
;; KEEP-BAR-SECONDARY-NEXT: (type $i32_=>_i32 (func (param i32) (result i32)))
;; KEEP-BAR-SECONDARY-NEXT: (import "primary" "%table" (table $table 1 1 funcref))
;; KEEP-BAR-SECONDARY-NEXT: (import "primary" "%bar" (func $bar (param i32) (result i32)))
-;; KEEP-BAR-SECONDARY-NEXT: (elem (i32.const 0) $foo)
+;; KEEP-BAR-SECONDARY-NEXT: (elem $0 (i32.const 0) $foo)
;; KEEP-BAR-SECONDARY-NEXT: (func $foo (param $0 i32) (result i32)
;; KEEP-BAR-SECONDARY-NEXT: (call $bar
;; KEEP-BAR-SECONDARY-NEXT: (i32.const 0)
@@ -153,7 +153,7 @@
;; KEEP-BOTH-PRIMARY: (module
;; KEEP-BOTH-PRIMARY-NEXT: (type $i32_=>_i32 (func (param i32) (result i32)))
;; KEEP-BOTH-PRIMARY-NEXT: (table $table 1 1 funcref)
-;; KEEP-BOTH-PRIMARY-NEXT: (elem (i32.const 0) $foo)
+;; KEEP-BOTH-PRIMARY-NEXT: (elem $0 (i32.const 0) $foo)
;; KEEP-BOTH-PRIMARY-NEXT: (export "%table" (table $table))
;; KEEP-BOTH-PRIMARY-NEXT: (func $foo (param $0 i32) (result i32)
;; KEEP-BOTH-PRIMARY-NEXT: (call $bar
diff --git a/test/lit/wasm-split/jspi-secondary-export.wast b/test/lit/wasm-split/jspi-secondary-export.wast
index 6d6e54e15..bcfeb1ecb 100644
--- a/test/lit/wasm-split/jspi-secondary-export.wast
+++ b/test/lit/wasm-split/jspi-secondary-export.wast
@@ -26,7 +26,7 @@
;; PRIMARY: (table $0 1 funcref)
- ;; PRIMARY: (elem (i32.const 0) $placeholder_0)
+ ;; PRIMARY: (elem $0 (i32.const 0) $placeholder_0)
;; PRIMARY: (export "foo" (func $export$foo))
(export "foo" (func $foo))
@@ -38,7 +38,7 @@
;; SECONDARY: (import "primary" "load_secondary_module_status" (global $gimport$1 (mut i32)))
- ;; SECONDARY: (elem (i32.const 0) $foo)
+ ;; SECONDARY: (elem $0 (i32.const 0) $foo)
;; SECONDARY: (func $foo (param $0 i32) (result i32)
;; SECONDARY-NEXT: (i32.const 0)
diff --git a/test/lit/wasm-split/jspi.wast b/test/lit/wasm-split/jspi.wast
index c202b9cb1..e323660a8 100644
--- a/test/lit/wasm-split/jspi.wast
+++ b/test/lit/wasm-split/jspi.wast
@@ -26,7 +26,7 @@
;; PRIMARY: (table $0 1 funcref)
- ;; PRIMARY: (elem (i32.const 0) $placeholder_0)
+ ;; PRIMARY: (elem $0 (i32.const 0) $placeholder_0)
;; PRIMARY: (export "foo" (func $export$foo))
(export "foo" (func $foo))
@@ -63,7 +63,7 @@
;; SECONDARY: (import "primary" "%foo" (func $foo (param i32) (result i32)))
- ;; SECONDARY: (elem (i32.const 0) $bar)
+ ;; SECONDARY: (elem $0 (i32.const 0) $bar)
;; SECONDARY: (func $bar (param $0 i32) (result i32)
;; SECONDARY-NEXT: (call $foo
diff --git a/test/lit/wat-kitchen-sink.wast b/test/lit/wat-kitchen-sink.wast
index 00801b0c5..934a77095 100644
--- a/test/lit/wat-kitchen-sink.wast
+++ b/test/lit/wat-kitchen-sink.wast
@@ -188,10 +188,11 @@
(memory $mem-init (data "hello inline data"))
;; data segments
- ;; CHECK: (data (memory $mem-init) (i32.const 0) "hello inline data")
-
- ;; CHECK: (data "hello world")
(data "hello world")
+ ;; CHECK: (data $implicit-data (memory $mem-init) (i32.const 0) "hello inline data")
+
+ ;; CHECK: (data $0 "hello world")
+
;; CHECK: (data $passive "hello again")
(data $passive "hello" " " "again")
;; CHECK: (data $active (i32.const 0) "active hello")
@@ -207,7 +208,7 @@
;; functions
(func)
- ;; CHECK: (data (memory $mem-i64) (i64.const 0) "64-bit")
+ ;; CHECK: (data $1 (memory $mem-i64) (i64.const 0) "64-bit")
;; CHECK: (export "g1" (global $g1))
@@ -1232,17 +1233,17 @@
)
;; CHECK: (func $memory-init (type $i32_i32_i32_=>_none) (param $0 i32) (param $1 i32) (param $2 i32)
- ;; CHECK-NEXT: (memory.init $mem-i32 2
+ ;; CHECK-NEXT: (memory.init $mem-i32 $passive
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: (local.get $2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init $mem-i64 1
+ ;; CHECK-NEXT: (memory.init $mem-i64 $0
;; CHECK-NEXT: (i64.const 0)
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: (local.get $2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (memory.init $mem 0
+ ;; CHECK-NEXT: (memory.init $mem $implicit-data
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: (local.get $2)
@@ -1264,8 +1265,8 @@
)
;; CHECK: (func $data-drop (type $void)
- ;; CHECK-NEXT: (data.drop 0)
- ;; CHECK-NEXT: (data.drop 2)
+ ;; CHECK-NEXT: (data.drop $implicit-data)
+ ;; CHECK-NEXT: (data.drop $passive)
;; CHECK-NEXT: )
(func $data-drop
data.drop 0
@@ -1537,7 +1538,7 @@
)
;; CHECK: (func $array-new-data (type $i32_i32_=>_ref|$a1|) (param $0 i32) (param $1 i32) (result (ref $a1))
- ;; CHECK-NEXT: (array.new_data $a1 0
+ ;; CHECK-NEXT: (array.new_data $a1 $implicit-data
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: )