summaryrefslogtreecommitdiff
path: root/test/lit/merge
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-04-25 14:55:12 -0700
committerGitHub <noreply@github.com>2024-04-25 14:55:12 -0700
commit956d2d89d530012885c1f88c87bf8b872c187b70 (patch)
treea24095ab6965bbfdfd04afbc02c33a3409d51fd0 /test/lit/merge
parentf44dcd4482f5bbb0fb5b567de4a9425ed949c939 (diff)
downloadbinaryen-956d2d89d530012885c1f88c87bf8b872c187b70.tar.gz
binaryen-956d2d89d530012885c1f88c87bf8b872c187b70.tar.bz2
binaryen-956d2d89d530012885c1f88c87bf8b872c187b70.zip
[Parser] Enable the new text parser by default (#6371)
The new text parser is faster and more standards compliant than the old text parser. Enable it by default in wasm-opt and update the tests to reflect the slightly different results it produces. Besides following the spec, the new parser differs from the old parser in that it: - Does not synthesize `loop` and `try` labels unnecessarily - Synthesizes different block names in some cases - Parses exports in a different order - Parses `nop`s instead of empty blocks for empty control flow arms - Does not support parsing Poppy IR - Produces different error messages - Cannot parse `pop` except as the first instruction inside a `catch`
Diffstat (limited to 'test/lit/merge')
-rw-r--r--test/lit/merge/fusing.wat10
-rw-r--r--test/lit/merge/names.wat24
-rw-r--r--test/lit/merge/names.wat.second8
-rw-r--r--test/lit/merge/renamings.wat8
4 files changed, 25 insertions, 25 deletions
diff --git a/test/lit/merge/fusing.wat b/test/lit/merge/fusing.wat
index a1ac3a2c7..e074d30ba 100644
--- a/test/lit/merge/fusing.wat
+++ b/test/lit/merge/fusing.wat
@@ -40,20 +40,20 @@
;; CHECK: (export "keepalive" (func $keepalive))
- ;; CHECK: (export "mem" (memory $first.mem))
-
;; CHECK: (export "exn" (tag $exn))
- ;; CHECK: (export "mem_5" (memory $second.mem))
+ ;; CHECK: (export "mem" (memory $first.mem))
- ;; CHECK: (export "foo_6" (func $second.foo))
+ ;; CHECK: (export "foo_5" (func $second.foo))
- ;; CHECK: (export "bar_7" (func $bar_6))
+ ;; CHECK: (export "bar_6" (func $bar_6))
;; CHECK: (export "keepalive2" (func $keepalive2))
;; CHECK: (export "keepalive3" (func $keepalive3))
+ ;; CHECK: (export "mem_9" (memory $second.mem))
+
;; CHECK: (func $first.foo (type $0)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.const 1)
diff --git a/test/lit/merge/names.wat b/test/lit/merge/names.wat
index 24b1dab0d..4562af58b 100644
--- a/test/lit/merge/names.wat
+++ b/test/lit/merge/names.wat
@@ -44,10 +44,6 @@
;; CHECK: (tag $tag$3)
- ;; CHECK: (export "m0" (memory $mem0))
-
- ;; CHECK: (export "m1" (memory $1))
-
;; CHECK: (export "f0" (func $func0))
;; CHECK: (export "f1" (func $1))
@@ -60,16 +56,16 @@
;; CHECK: (export "g1" (global $global$2))
+ ;; CHECK: (export "m0" (memory $mem0))
+
+ ;; CHECK: (export "m1" (memory $1))
+
;; CHECK: (export "tag0" (tag $tag0))
;; CHECK: (export "tag1" (tag $tag$1))
;; CHECK: (export "func" (func $2))
- ;; CHECK: (export "m2" (memory $mem2))
-
- ;; CHECK: (export "m3" (memory $3))
-
;; CHECK: (export "f2" (func $func2))
;; CHECK: (export "f3" (func $4))
@@ -78,6 +74,10 @@
;; CHECK: (export "t3" (table $3))
+ ;; CHECK: (export "m2" (memory $mem2))
+
+ ;; CHECK: (export "m3" (memory $3))
+
;; CHECK: (export "g2" (global $glob2))
;; CHECK: (export "g3" (global $global$0))
@@ -97,8 +97,8 @@
(table $table0 (export "t0") 1 funcref)
(table (export "t1") 1 funcref)
- (global $glob0 (export g0) i32 (i32.const 0))
- (global (export g1) i32 (i32.const 0))
+ (global $glob0 (export "g0") i32 (i32.const 0))
+ (global (export "g1") i32 (i32.const 0))
(memory $mem0 (export "m0") 0)
(memory (export "m1") 0)
@@ -109,8 +109,8 @@
(data $data0 "")
(data "")
- (tag $tag0 (export tag0))
- (tag (export tag1))
+ (tag $tag0 (export "tag0"))
+ (tag (export "tag1"))
(type $t (struct (field $a i32) (field $b i32)))
diff --git a/test/lit/merge/names.wat.second b/test/lit/merge/names.wat.second
index 4aed55d53..9f4fef1d7 100644
--- a/test/lit/merge/names.wat.second
+++ b/test/lit/merge/names.wat.second
@@ -9,8 +9,8 @@
(memory $mem2 (export "m2") 0)
(memory (export "m3") 0)
- (global $glob2 (export g2) i32 (i32.const 0))
- (global (export g3) i32 (i32.const 0))
+ (global $glob2 (export "g2") i32 (i32.const 0))
+ (global (export "g3") i32 (i32.const 0))
(elem $elem2 func)
(elem func)
@@ -18,8 +18,8 @@
(data $data2 "")
(data "")
- (tag $tag2 (export tag2))
- (tag (export tag3))
+ (tag $tag2 (export "tag2"))
+ (tag (export "tag3"))
(type $u (struct (field $c i64) (field $d i32)))
diff --git a/test/lit/merge/renamings.wat b/test/lit/merge/renamings.wat
index 98aac63be..4d1c32c5a 100644
--- a/test/lit/merge/renamings.wat
+++ b/test/lit/merge/renamings.wat
@@ -140,7 +140,7 @@
)
;; CHECK: (func $uses (type $3) (param $array (ref $array))
- ;; CHECK-NEXT: (try $try
+ ;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
@@ -150,7 +150,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (try $try0
+ ;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
@@ -290,7 +290,7 @@
;; CHECK-NEXT: )
;; CHECK: (func $uses.second (type $3) (param $array (ref $array))
-;; CHECK-NEXT: (try $try
+;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
@@ -300,7 +300,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (try $try0
+;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )