diff options
author | Frank Emrich <git@emrich.io> | 2023-10-05 18:25:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 10:25:59 -0700 |
commit | 67804305e680ffcf6b3bbcb4b56a1c31c284c3d0 (patch) | |
tree | 463b61e61ecc7c0e914d6822cea4a079af9fd1db /test/lit/passes | |
parent | 5597ad587857f5f20b23fbd45a94abd98deaf25c (diff) | |
download | binaryen-67804305e680ffcf6b3bbcb4b56a1c31c284c3d0.tar.gz binaryen-67804305e680ffcf6b3bbcb4b56a1c31c284c3d0.tar.bz2 binaryen-67804305e680ffcf6b3bbcb4b56a1c31c284c3d0.zip |
[typed-cont] Allow result types on tags (#5997)
This PR is part of a series that adds basic support for the typed continuations proposal.
This PR relaxes the restriction that tags must not have results , only params. Tags with
results must not be used for exception handling and are only allowed if the typed
continuations feature is enabled.
As a minor point, this PR also changes the printing of tags without params: To make the
presentation consistent, (param) is omitted when printing a tag.
Diffstat (limited to 'test/lit/passes')
-rw-r--r-- | test/lit/passes/coalesce-locals-eh.wast | 2 | ||||
-rw-r--r-- | test/lit/passes/dce-eh.wast | 2 | ||||
-rw-r--r-- | test/lit/passes/global-effects.wast | 6 | ||||
-rw-r--r-- | test/lit/passes/gufa-refs.wast | 2 | ||||
-rw-r--r-- | test/lit/passes/rse-eh.wast | 2 | ||||
-rw-r--r-- | test/lit/passes/type-refining.wast | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/test/lit/passes/coalesce-locals-eh.wast b/test/lit/passes/coalesce-locals-eh.wast index 16b4db40a..379f3dc31 100644 --- a/test/lit/passes/coalesce-locals-eh.wast +++ b/test/lit/passes/coalesce-locals-eh.wast @@ -2,7 +2,7 @@ ;; RUN: wasm-opt %s --coalesce-locals -all -S -o - | filecheck %s (module - ;; CHECK: (tag $e (param)) + ;; CHECK: (tag $e) ;; CHECK: (func $bar (type $1) (result i32) ;; CHECK-NEXT: (i32.const 1984) diff --git a/test/lit/passes/dce-eh.wast b/test/lit/passes/dce-eh.wast index 5915eb7bd..f05f5122e 100644 --- a/test/lit/passes/dce-eh.wast +++ b/test/lit/passes/dce-eh.wast @@ -4,7 +4,7 @@ ;; If either try body or catch body is reachable, the whole try construct is ;; reachable (module - ;; CHECK: (tag $e (param)) + ;; CHECK: (tag $e) ;; CHECK: (func $foo (type $0) ;; CHECK-NEXT: (nop) diff --git a/test/lit/passes/global-effects.wast b/test/lit/passes/global-effects.wast index 503b1efef..e5ea1b429 100644 --- a/test/lit/passes/global-effects.wast +++ b/test/lit/passes/global-effects.wast @@ -14,21 +14,21 @@ ;; WITHOUT: (type $2 (func (param i32))) - ;; WITHOUT: (tag $tag (param)) + ;; WITHOUT: (tag $tag) ;; INCLUDE: (type $0 (func)) ;; INCLUDE: (type $1 (func (result i32))) ;; INCLUDE: (type $2 (func (param i32))) - ;; INCLUDE: (tag $tag (param)) + ;; INCLUDE: (tag $tag) ;; DISCARD: (type $0 (func)) ;; DISCARD: (type $1 (func (result i32))) ;; DISCARD: (type $2 (func (param i32))) - ;; DISCARD: (tag $tag (param)) + ;; DISCARD: (tag $tag) (tag $tag) ;; WITHOUT: (func $main (type $0) diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast index fa4afd6e0..3e7530926 100644 --- a/test/lit/passes/gufa-refs.wast +++ b/test/lit/passes/gufa-refs.wast @@ -1903,7 +1903,7 @@ ;; CHECK: (tag $something (param anyref)) (tag $something (param (ref null any))) - ;; CHECK: (tag $empty (param)) + ;; CHECK: (tag $empty) (tag $empty (param)) ;; CHECK: (func $func (type $0) diff --git a/test/lit/passes/rse-eh.wast b/test/lit/passes/rse-eh.wast index 615ed2a37..64802aec4 100644 --- a/test/lit/passes/rse-eh.wast +++ b/test/lit/passes/rse-eh.wast @@ -4,7 +4,7 @@ (module ;; CHECK: (tag $e (param i32)) (tag $e (param i32)) - ;; CHECK: (tag $e2 (param)) + ;; CHECK: (tag $e2) (tag $e2) ;; CHECK: (func $try1 (type $0) diff --git a/test/lit/passes/type-refining.wast b/test/lit/passes/type-refining.wast index 2f550cc37..0a133d7a0 100644 --- a/test/lit/passes/type-refining.wast +++ b/test/lit/passes/type-refining.wast @@ -1240,7 +1240,7 @@ ;; CHECK: (type $6 (func)) - ;; CHECK: (tag $tag (param)) + ;; CHECK: (tag $tag) (tag $tag) ;; CHECK: (func $struct.new (type $4) (param $extern externref) (result anyref) |