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/passes/gsi.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/passes/gsi.wast')
-rw-r--r-- | test/lit/passes/gsi.wast | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/lit/passes/gsi.wast b/test/lit/passes/gsi.wast index 559050f1f..00a2f6c60 100644 --- a/test/lit/passes/gsi.wast +++ b/test/lit/passes/gsi.wast @@ -667,7 +667,7 @@ ;; A subtype is not optimizable, which prevents $struct from being optimized. (module - ;; CHECK: (type $struct (struct (field i32))) + ;; CHECK: (type $struct (sub (struct (field i32)))) (type $struct (struct_subtype i32 data)) ;; CHECK: (type $1 (func (param (ref null $struct)))) @@ -718,7 +718,7 @@ ;; A *super*-type is not optimizable, but that does not block us, and we can ;; optimize. (module - ;; CHECK: (type $super-struct (struct (field i32))) + ;; CHECK: (type $super-struct (sub (struct (field i32)))) (type $super-struct (struct_subtype i32 data)) ;; CHECK: (type $struct (sub $super-struct (struct (field i32)))) @@ -776,7 +776,7 @@ ;; One global for each of the type and the subtype. The optimization will pick ;; between their 2 values. (module - ;; CHECK: (type $super-struct (struct (field i32))) + ;; CHECK: (type $super-struct (sub (struct (field i32)))) (type $super-struct (struct_subtype i32 data)) ;; CHECK: (type $struct (sub $super-struct (struct (field i32)))) @@ -887,7 +887,7 @@ ;; One global each for two subtypes of a common supertype, and one for the ;; supertype. (module - ;; CHECK: (type $super-struct (struct (field i32))) + ;; CHECK: (type $super-struct (sub (struct (field i32)))) (type $super-struct (struct_subtype i32 data)) ;; CHECK: (type $struct1 (sub $super-struct (struct (field i32) (field f32)))) @@ -980,7 +980,7 @@ ;; As above, but now the subtypes each have 2 values, and we can optimize. (module - ;; CHECK: (type $super-struct (struct (field i32))) + ;; CHECK: (type $super-struct (sub (struct (field i32)))) (type $super-struct (struct_subtype i32 data)) ;; CHECK: (type $struct1 (sub $super-struct (struct (field i32) (field f32)))) @@ -1228,7 +1228,7 @@ (module (rec ;; CHECK: (rec - ;; CHECK-NEXT: (type $struct (struct (field i32))) + ;; CHECK-NEXT: (type $struct (sub (struct (field i32)))) (type $struct (struct_subtype i32 data)) ;; CHECK: (type $sub-struct1 (sub $struct (struct (field i32)))) @@ -1282,7 +1282,7 @@ (module (rec ;; CHECK: (rec - ;; CHECK-NEXT: (type $struct (struct (field i32))) + ;; CHECK-NEXT: (type $struct (sub (struct (field i32)))) (type $struct (struct_subtype i32 data)) ;; CHECK: (type $sub-struct1 (sub $struct (struct (field i32)))) @@ -1339,7 +1339,7 @@ (module (rec ;; CHECK: (rec - ;; CHECK-NEXT: (type $struct (struct (field i32))) + ;; CHECK-NEXT: (type $struct (sub (struct (field i32)))) (type $struct (struct_subtype i32 data)) ;; CHECK: (type $sub-struct1 (sub $struct (struct (field i32)))) @@ -1394,8 +1394,8 @@ (module (rec ;; CHECK: (rec - ;; CHECK-NEXT: (type $A (struct (field funcref))) - (type $A (struct (field funcref))) + ;; CHECK-NEXT: (type $A (sub (struct (field funcref)))) + (type $A (sub (struct (field funcref)))) ;; CHECK: (type $B (sub $A (struct (field (ref func))))) (type $B (sub $A (struct (field (ref func))))) ) |