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/wat-kitchen-sink.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/wat-kitchen-sink.wast')
-rw-r--r-- | test/lit/wat-kitchen-sink.wast | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/lit/wat-kitchen-sink.wast b/test/lit/wat-kitchen-sink.wast index ddf35edcf..eb8d4f100 100644 --- a/test/lit/wat-kitchen-sink.wast +++ b/test/lit/wat-kitchen-sink.wast @@ -9,7 +9,7 @@ (type $ret2 (func (result i32 i32))) (rec - ;; CHECK: (type $void (func)) + ;; CHECK: (type $void (sub (func))) ;; CHECK: (type $pair (struct (field (mut i32)) (field (mut i64)))) @@ -33,7 +33,7 @@ ;; CHECK: (type $packed-i16 (array (mut i16))) - ;; CHECK: (type $many (func (param i32 i64 f32 f64) (result anyref (ref func)))) + ;; CHECK: (type $many (sub (func (param i32 i64 f32 f64) (result anyref (ref func))))) ;; CHECK: (type $14 (func (param i32 i32))) @@ -137,16 +137,16 @@ (type $packed-i16 (array (mut i16))) (rec - (type $void (func)) + (type $void (sub open (func))) ) - ;; CHECK: (type $subvoid (sub $void (func))) + ;; CHECK: (type $subvoid (sub final $void (func))) (type $subvoid (sub $void (func))) - (type $many (func (param $x i32) (param i64 f32) (param) (param $y f64) - (result anyref (ref func)))) + (type $many (sub open (func (param $x i32) (param i64 f32) (param) (param $y f64) + (result anyref (ref func))))) - ;; CHECK: (type $submany (sub $many (func (param i32 i64 f32 f64) (result anyref (ref func))))) + ;; CHECK: (type $submany (sub final $many (func (param i32 i64 f32 f64) (result anyref (ref func))))) (type $submany (sub $many (func (param i32 i64 f32 f64) (result anyref (ref func))))) ;; globals @@ -168,7 +168,7 @@ ;; CHECK: (import "mod" "" (global $gimport$1 (ref null $many))) - ;; CHECK: (import "mod" "f5" (func $fimport$1 (type $void))) + ;; CHECK: (import "mod" "f5" (func $fimport$1 (type $func.0))) ;; CHECK: (global $2 (mut i32) (i32.const 0)) |