diff options
author | Thomas Lively <tlively@google.com> | 2023-09-08 20:08:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-09 01:08:33 +0000 |
commit | 4e58466b40b65cda399b4749105f0ce10f48f62b (patch) | |
tree | 9e34ae5ed464d87d75683603171e7b2645015568 /test/lit/isorecursive-good.wast | |
parent | 90571051b3d6f89eab184df3d4dd716472a6cd7c (diff) | |
download | binaryen-4e58466b40b65cda399b4749105f0ce10f48f62b.tar.gz binaryen-4e58466b40b65cda399b4749105f0ce10f48f62b.tar.bz2 binaryen-4e58466b40b65cda399b4749105f0ce10f48f62b.zip |
Make final types the default (#5918)
Match the spec and parse the shorthand binary and text formats as final and emit
final types without supertypes using the shorthands as well. This is a
potentially-breaking change, since the text and binary shorthands can no longer
be used to define types that have subtypes.
Also make TypeBuilder entries final by default to better match the spec and
update the internal APIs to use the "open" terminology rather than "final"
terminology. Future changes will update the text format to use the standard "sub
open" rather than the current "sub final" keywords. The exception is the new wat
parser, which supporst "sub open" as of this change, since it didn't support
final types at all previously.
Diffstat (limited to 'test/lit/isorecursive-good.wast')
-rw-r--r-- | test/lit/isorecursive-good.wast | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/lit/isorecursive-good.wast b/test/lit/isorecursive-good.wast index 10dc7726b..43caeb7d1 100644 --- a/test/lit/isorecursive-good.wast +++ b/test/lit/isorecursive-good.wast @@ -6,7 +6,7 @@ (module (rec ;; CHECK: (rec - ;; CHECK-NEXT: (type $super-struct (struct (field i32))) + ;; CHECK-NEXT: (type $super-struct (sub (struct (field i32)))) (type $super-struct (sub (struct i32))) ;; CHECK: (type $sub-struct (sub $super-struct (struct (field i32) (field i64)))) (type $sub-struct (sub $super-struct (struct i32 i64))) @@ -16,7 +16,7 @@ (rec ;; CHECK: (rec - ;; CHECK-NEXT: (type $super-array (array (ref $super-struct))) + ;; CHECK-NEXT: (type $super-array (sub (array (ref $super-struct)))) (type $super-array (sub (array (ref $super-struct)))) ;; CHECK: (type $sub-array (sub $super-array (array (ref $sub-struct)))) (type $sub-array (sub $super-array (array (ref $sub-struct)))) @@ -26,7 +26,7 @@ (rec ;; CHECK: (rec - ;; CHECK-NEXT: (type $super-func (func (param (ref $sub-array)) (result (ref $super-array)))) + ;; CHECK-NEXT: (type $super-func (sub (func (param (ref $sub-array)) (result (ref $super-array))))) (type $super-func (sub (func (param (ref $sub-array)) (result (ref $super-array))))) ;; CHECK: (type $sub-func (sub $super-func (func (param (ref $super-array)) (result (ref $sub-array))))) (type $sub-func (sub $super-func (func (param (ref $super-array)) (result (ref $sub-array))))) @@ -34,7 +34,7 @@ (type $final-func (sub final $sub-func (func (param (ref $super-array)) (result (ref $final-array))))) ) - ;; CHECK: (type $final-root (sub final (struct ))) + ;; CHECK: (type $final-root (struct )) (type $final-root (sub final (struct))) ;; CHECK: (func $make-super-struct (type $6) (result (ref $super-struct)) |