summaryrefslogtreecommitdiff
path: root/test/lit/passes
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-09-18 10:45:36 -0700
committerGitHub <noreply@github.com>2023-09-18 10:45:36 -0700
commitcd94f8af963ea8233fc15db35ff8d9e70aff22cf (patch)
tree044d2a677ab589e49fd56420b1cc570a3cc32418 /test/lit/passes
parent16a59938563c93d8459bf36679c83497aeba7cc7 (diff)
downloadbinaryen-cd94f8af963ea8233fc15db35ff8d9e70aff22cf.tar.gz
binaryen-cd94f8af963ea8233fc15db35ff8d9e70aff22cf.tar.bz2
binaryen-cd94f8af963ea8233fc15db35ff8d9e70aff22cf.zip
Remove legacy type defintion text syntax (#5948)
Remove support for the "struct_subtype", "array_subtype", "func_subtype", and "extends" notations we used at various times to declare WasmGC types, leaving only support for the standard text fromat for declaring types. Update all the tests using the old formats and delete tests that existed solely to test the old formats.
Diffstat (limited to 'test/lit/passes')
-rw-r--r--test/lit/passes/abstract-type-refining.wast44
-rw-r--r--test/lit/passes/cfp.wast36
-rw-r--r--test/lit/passes/coalesce-locals-gc.wast4
-rw-r--r--test/lit/passes/dae-gc-refine-params.wast8
-rw-r--r--test/lit/passes/dae-gc-refine-return.wast6
-rw-r--r--test/lit/passes/dae_tnh.wast2
-rw-r--r--test/lit/passes/gsi.wast42
-rw-r--r--test/lit/passes/gsi_vacuum_precompute.wast6
-rw-r--r--test/lit/passes/gto-mutability.wast6
-rw-r--r--test/lit/passes/gto-removals.wast40
-rw-r--r--test/lit/passes/gto_and_cfp_in_O.wast2
-rw-r--r--test/lit/passes/gufa-refs.wast138
-rw-r--r--test/lit/passes/gufa-vs-cfp.wast44
-rw-r--r--test/lit/passes/inlining_vacuum_optimize-instructions.wast4
-rw-r--r--test/lit/passes/local-subtyping.wast6
-rw-r--r--test/lit/passes/merge-similar-functions_types.wast18
-rw-r--r--test/lit/passes/monomorphize.wast22
-rw-r--r--test/lit/passes/optimize-casts-tnh.wast3
-rw-r--r--test/lit/passes/optimize-casts.wast4
-rw-r--r--test/lit/passes/optimize-instructions-gc-iit.wast10
-rw-r--r--test/lit/passes/optimize-instructions-gc-tnh.wast2
-rw-r--r--test/lit/passes/optimize-instructions-gc.wast8
-rw-r--r--test/lit/passes/remove-unused-module-elements-refs.wast18
-rw-r--r--test/lit/passes/roundtrip-gc-types.wast2
-rw-r--r--test/lit/passes/rse-gc.wast2
-rw-r--r--test/lit/passes/signature-pruning.wast50
-rw-r--r--test/lit/passes/signature-refining.wast50
-rw-r--r--test/lit/passes/simplify-locals-gc.wast4
-rw-r--r--test/lit/passes/simplify-locals-strings.wast4
-rw-r--r--test/lit/passes/type-merging-tnh.wast8
-rw-r--r--test/lit/passes/type-merging.wast132
-rw-r--r--test/lit/passes/type-refining-isorecursive.wast14
-rw-r--r--test/lit/passes/type-refining.wast102
-rw-r--r--test/lit/passes/type-ssa.wast6
-rw-r--r--test/lit/passes/type-ssa_and_merging.wast2
35 files changed, 424 insertions, 425 deletions
diff --git a/test/lit/passes/abstract-type-refining.wast b/test/lit/passes/abstract-type-refining.wast
index 274909605..0b2025e7b 100644
--- a/test/lit/passes/abstract-type-refining.wast
+++ b/test/lit/passes/abstract-type-refining.wast
@@ -22,18 +22,18 @@
;; YESTNH: (type $B (sub (struct )))
;; NO_TNH: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; YESTNH: (type $C (sub $B (struct )))
;; NO_TNH: (type $C (sub $B (struct )))
- (type $C (struct_subtype $B))
+ (type $C (sub $B (struct)))
;; NO_TNH: (type $D (sub $C (struct )))
- (type $D (struct_subtype $C))
+ (type $D (sub $C (struct)))
;; YESTNH: (type $E (sub $C (struct )))
;; NO_TNH: (type $E (sub $D (struct )))
- (type $E (struct_subtype $D))
+ (type $E (sub $D (struct)))
;; YESTNH: (type $4 (func (param anyref)))
@@ -279,9 +279,9 @@
;; NO_TNH: (type $2 (func (param anyref)))
;; NO_TNH: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
- (type $B1 (struct_subtype $A)) ;; this is a new type
+ (type $B1 (sub $A (struct))) ;; this is a new type
)
;; YESTNH: (global $global anyref (struct.new_default $B))
@@ -365,12 +365,12 @@
;; NO_TNH-NEXT: (type $A (sub (struct )))
(type $A (sub (struct)))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; YESTNH: (rec
;; YESTNH-NEXT: (type $B1 (sub (struct )))
;; NO_TNH: (type $B1 (sub $A (struct )))
- (type $B1 (struct_subtype $A)) ;; this is a new type
+ (type $B1 (sub $A (struct))) ;; this is a new type
)
;; YESTNH: (type $1 (func (param anyref)))
@@ -453,12 +453,12 @@
(type $A (sub (struct)))
;; NO_TNH: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; YESTNH: (rec
;; YESTNH-NEXT: (type $C (sub (struct )))
;; NO_TNH: (type $C (sub $B (struct )))
- (type $C (struct_subtype $B))
+ (type $C (sub $B (struct)))
;; YESTNH: (type $1 (func (param anyref)))
@@ -539,11 +539,11 @@
(rec
(type $A (sub (struct)))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
- (type $C1 (struct_subtype $B))
+ (type $C1 (sub $B (struct)))
- (type $C2 (struct_subtype $B))
+ (type $C2 (sub $B (struct)))
)
;; YESTNH: (rec
@@ -828,16 +828,16 @@
(type $A (sub (struct)))
;; NO_TNH: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; YESTNH: (rec
;; YESTNH-NEXT: (type $0 (func (param anyref)))
;; YESTNH: (type $C1 (sub (struct )))
;; NO_TNH: (type $C1 (sub $B (struct )))
- (type $C1 (struct_subtype $B))
+ (type $C1 (sub $B (struct)))
- (type $C2 (struct_subtype $B))
+ (type $C2 (sub $B (struct)))
)
;; YESTNH: (global $global anyref (struct.new_default $C1))
@@ -993,11 +993,11 @@
;; YESTNH: (type $B (sub $A (func)))
;; NO_TNH: (type $B (sub $A (func)))
- (type $B (func_subtype $A))
+ (type $B (sub $A (func)))
;; YESTNH: (type $C (sub $B (func)))
;; NO_TNH: (type $C (sub $B (func)))
- (type $C (func_subtype $B))
+ (type $C (sub $B (func)))
;; YESTNH: (type $3 (func (param funcref)))
@@ -1091,11 +1091,11 @@
;; NO_TNH-NEXT: (type $1 (func (param funcref)))
;; NO_TNH: (type $B (sub $A (func)))
- (type $B (func_subtype $A))
+ (type $B (sub $A (func)))
;; YESTNH: (type $C (sub $B (func)))
;; NO_TNH: (type $C (sub $B (func)))
- (type $C (func_subtype $B))
+ (type $C (sub $B (func)))
;; YESTNH: (elem declare func $A $C)
@@ -1207,11 +1207,11 @@
;; YESTNH: (type $B (sub $A (array (mut i32))))
;; NO_TNH: (type $B (sub $A (array (mut i32))))
- (type $B (array_subtype (mut i32) $A))
+ (type $B (sub $A (array (mut i32))))
;; YESTNH: (type $C (sub $B (array (mut i32))))
;; NO_TNH: (type $C (sub $B (array (mut i32))))
- (type $C (array_subtype (mut i32) $B))
+ (type $C (sub $B (array (mut i32))))
;; YESTNH: (global $A (ref $A) (array.new $A
;; YESTNH-NEXT: (i32.const 10)
diff --git a/test/lit/passes/cfp.wast b/test/lit/passes/cfp.wast
index 4236a16c6..e3bd4b049 100644
--- a/test/lit/passes/cfp.wast
+++ b/test/lit/passes/cfp.wast
@@ -552,7 +552,7 @@
;; CHECK: (type $struct (sub (struct (field i32))))
(type $struct (sub (struct i32)))
;; CHECK: (type $substruct (sub $struct (struct (field i32))))
- (type $substruct (struct_subtype i32 $struct))
+ (type $substruct (sub $struct (struct i32)))
;; CHECK: (type $3 (func (param (ref null $substruct))))
@@ -599,7 +599,7 @@
;; CHECK: (type $1 (func (param (ref null $struct))))
;; CHECK: (type $substruct (sub $struct (struct (field (mut i32)))))
- (type $substruct (struct_subtype (mut i32) $struct))
+ (type $substruct (sub $struct (struct (mut i32))))
;; CHECK: (type $3 (func (param (ref null $substruct))))
@@ -656,7 +656,7 @@
(type $struct (sub (struct i32)))
;; CHECK: (type $substruct (sub $struct (struct (field i32) (field f64))))
- (type $substruct (struct_subtype i32 f64 $struct))
+ (type $substruct (sub $struct (struct i32 f64)))
;; CHECK: (type $3 (func (param (ref null $struct))))
@@ -705,7 +705,7 @@
;; CHECK: (type $1 (func))
;; CHECK: (type $substruct (sub $struct (struct (field i32) (field f64))))
- (type $substruct (struct_subtype i32 f64 $struct))
+ (type $substruct (sub $struct (struct i32 f64)))
;; CHECK: (type $3 (func (param (ref null $struct))))
@@ -765,7 +765,7 @@
;; CHECK: (type $1 (func))
;; CHECK: (type $substruct (sub $struct (struct (field i32) (field f64))))
- (type $substruct (struct_subtype i32 f64 $struct))
+ (type $substruct (sub $struct (struct i32 f64)))
;; CHECK: (type $3 (func (param (ref null $struct))))
@@ -821,7 +821,7 @@
(type $struct (sub (struct i32)))
;; CHECK: (type $substruct (sub $struct (struct (field i32) (field f64))))
- (type $substruct (struct_subtype i32 f64 $struct))
+ (type $substruct (sub $struct (struct i32 f64)))
;; CHECK: (type $2 (func))
@@ -880,7 +880,7 @@
(type $struct (sub (struct (mut i32))))
;; CHECK: (type $substruct (sub $struct (struct (field (mut i32)) (field f64))))
- (type $substruct (struct_subtype (mut i32) f64 $struct))
+ (type $substruct (sub $struct (struct (mut i32) f64)))
;; CHECK: (type $2 (func (param (ref null $struct))))
@@ -943,10 +943,10 @@
(type $struct1 (sub (struct i32)))
;; CHECK: (type $struct2 (sub $struct1 (struct (field i32) (field f64))))
- (type $struct2 (struct_subtype i32 f64 $struct1))
+ (type $struct2 (sub $struct1 (struct i32 f64)))
;; CHECK: (type $struct3 (sub $struct2 (struct (field i32) (field f64) (field anyref))))
- (type $struct3 (struct_subtype i32 f64 anyref $struct2))
+ (type $struct3 (sub $struct2 (struct i32 f64 anyref)))
;; CHECK: (type $3 (func))
@@ -1078,10 +1078,10 @@
(type $struct1 (sub (struct i32 i32)))
;; CHECK: (type $struct2 (sub $struct1 (struct (field i32) (field i32) (field f64) (field f64))))
- (type $struct2 (struct_subtype i32 i32 f64 f64 $struct1))
+ (type $struct2 (sub $struct1 (struct i32 i32 f64 f64)))
;; CHECK: (type $struct3 (sub $struct2 (struct (field i32) (field i32) (field f64) (field f64) (field anyref) (field anyref))))
- (type $struct3 (struct_subtype i32 i32 f64 f64 anyref anyref $struct2))
+ (type $struct3 (sub $struct2 (struct i32 i32 f64 f64 anyref anyref)))
;; CHECK: (type $3 (func (param anyref)))
@@ -1307,9 +1307,9 @@
;; CHECK: (type $struct1 (sub (struct (field (mut i32)))))
(type $struct1 (sub (struct (mut i32))))
;; CHECK: (type $struct2 (sub $struct1 (struct (field (mut i32)) (field f64))))
- (type $struct2 (struct_subtype (mut i32) f64 $struct1))
+ (type $struct2 (sub $struct1 (struct (mut i32) f64)))
;; CHECK: (type $struct3 (sub $struct2 (struct (field (mut i32)) (field f64) (field anyref))))
- (type $struct3 (struct_subtype (mut i32) f64 anyref $struct2))
+ (type $struct3 (sub $struct2 (struct (mut i32) f64 anyref)))
;; CHECK: (type $3 (func))
@@ -1405,10 +1405,10 @@
(type $struct1 (sub (struct (mut i32))))
;; CHECK: (type $struct2 (sub $struct1 (struct (field (mut i32)) (field f64))))
- (type $struct2 (struct_subtype (mut i32) f64 $struct1))
+ (type $struct2 (sub $struct1 (struct (mut i32) f64)))
;; CHECK: (type $struct3 (sub $struct2 (struct (field (mut i32)) (field f64) (field anyref))))
- (type $struct3 (struct_subtype (mut i32) f64 anyref $struct2))
+ (type $struct3 (sub $struct2 (struct (mut i32) f64 anyref)))
;; CHECK: (type $3 (func (param (ref null $struct2))))
@@ -1631,10 +1631,10 @@
(type $A (sub (struct (mut i32))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (mut i32) $A))
+ (type $B (sub $A (struct (mut i32))))
;; CHECK: (type $C (sub $B (struct (field (mut i32)))))
- (type $C (struct_subtype (mut i32) $B))
+ (type $C (sub $B (struct (mut i32))))
;; CHECK: (type $3 (func))
@@ -2229,7 +2229,7 @@
;; CHECK-NEXT: (type $A (sub (struct (field (mut i32)))))
(type $A (sub (struct (field (mut i32)))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (field (mut i32)) $A))
+ (type $B (sub $A (struct (field (mut i32)))))
)
;; CHECK: (type $2 (func (param i32) (result i32)))
diff --git a/test/lit/passes/coalesce-locals-gc.wast b/test/lit/passes/coalesce-locals-gc.wast
index b9224f59e..3706dc61f 100644
--- a/test/lit/passes/coalesce-locals-gc.wast
+++ b/test/lit/passes/coalesce-locals-gc.wast
@@ -8,10 +8,10 @@
;; CHECK: (type $array (array (mut i8)))
(type $array (array (mut i8)))
- (type $A (struct_subtype (field (ref null struct)) data))
+ (type $A (sub (struct (field (ref null struct)))))
;; CHECK: (type $B (sub $A (struct (field (ref struct)))))
- (type $B (struct_subtype (field (ref struct)) $A))
+ (type $B (sub $A (struct (field (ref struct)))))
;; CHECK: (global $global (ref null $array) (ref.null none))
(global $global (ref null $array) (ref.null $array))
diff --git a/test/lit/passes/dae-gc-refine-params.wast b/test/lit/passes/dae-gc-refine-params.wast
index 7a7a30954..2f55e4012 100644
--- a/test/lit/passes/dae-gc-refine-params.wast
+++ b/test/lit/passes/dae-gc-refine-params.wast
@@ -6,18 +6,18 @@
(type ${} (sub (struct)))
;; CHECK: (type ${i32} (sub ${} (struct (field i32))))
- (type ${i32} (struct_subtype (field i32) ${}))
+ (type ${i32} (sub ${} (struct (field i32))))
;; CHECK: (type ${i32_i64} (sub ${i32} (struct (field i32) (field i64))))
;; CHECK: (type ${i32_f32} (sub ${i32} (struct (field i32) (field f32))))
;; CHECK: (type ${f64} (sub ${} (struct (field f64))))
- (type ${f64} (struct_subtype (field f64) ${}))
+ (type ${f64} (sub ${} (struct (field f64))))
- (type ${i32_i64} (struct_subtype (field i32) (field i64) ${i32}))
+ (type ${i32_i64} (sub ${i32} (struct (field i32) (field i64))))
- (type ${i32_f32} (struct_subtype (field i32) (field f32) ${i32}))
+ (type ${i32_f32} (sub ${i32} (struct (field i32) (field f32))))
;; CHECK: (func $call-various-params-no (type $0)
;; CHECK-NEXT: (call $various-params-no
diff --git a/test/lit/passes/dae-gc-refine-return.wast b/test/lit/passes/dae-gc-refine-return.wast
index a071cfc93..595a562e8 100644
--- a/test/lit/passes/dae-gc-refine-return.wast
+++ b/test/lit/passes/dae-gc-refine-return.wast
@@ -9,13 +9,13 @@
(type $return_{} (func (result (ref ${}))))
;; CHECK: (type ${i32} (sub ${} (struct (field i32))))
- (type ${i32} (struct_subtype (field i32) ${}))
+ (type ${i32} (sub ${} (struct (field i32))))
;; CHECK: (type ${i32_f32} (sub ${i32} (struct (field i32) (field f32))))
- (type ${i32_f32} (struct_subtype (field i32) (field f32) ${i32}))
+ (type ${i32_f32} (sub ${i32} (struct (field i32) (field f32))))
;; CHECK: (type ${i32_i64} (sub ${i32} (struct (field i32) (field i64))))
- (type ${i32_i64} (struct_subtype (field i32) (field i64) ${i32}))
+ (type ${i32_i64} (sub ${i32} (struct (field i32) (field i64))))
(table 1 1 funcref)
diff --git a/test/lit/passes/dae_tnh.wast b/test/lit/passes/dae_tnh.wast
index a5b1f2f2a..33e6eb09b 100644
--- a/test/lit/passes/dae_tnh.wast
+++ b/test/lit/passes/dae_tnh.wast
@@ -6,7 +6,7 @@
;; CHECK: (type $0 (func))
;; CHECK: (type $struct (sub (struct (field i32))))
- (type $struct (struct_subtype (field i32) data))
+ (type $struct (sub (struct (field i32))))
;; CHECK: (type $2 (func (param (ref null $struct))))
diff --git a/test/lit/passes/gsi.wast b/test/lit/passes/gsi.wast
index 00a2f6c60..70991f550 100644
--- a/test/lit/passes/gsi.wast
+++ b/test/lit/passes/gsi.wast
@@ -668,12 +668,12 @@
;; A subtype is not optimizable, which prevents $struct from being optimized.
(module
;; CHECK: (type $struct (sub (struct (field i32))))
- (type $struct (struct_subtype i32 data))
+ (type $struct (sub (struct i32)))
;; CHECK: (type $1 (func (param (ref null $struct))))
;; CHECK: (type $sub-struct (sub $struct (struct (field i32))))
- (type $sub-struct (struct_subtype i32 $struct))
+ (type $sub-struct (sub $struct (struct i32)))
;; CHECK: (global $global1 (ref $struct) (struct.new $struct
;; CHECK-NEXT: (i32.const 42)
@@ -719,10 +719,10 @@
;; optimize.
(module
;; CHECK: (type $super-struct (sub (struct (field i32))))
- (type $super-struct (struct_subtype i32 data))
+ (type $super-struct (sub (struct i32)))
;; CHECK: (type $struct (sub $super-struct (struct (field i32))))
- (type $struct (struct_subtype i32 $super-struct))
+ (type $struct (sub $super-struct (struct i32)))
;; CHECK: (type $2 (func (param (ref null $struct))))
@@ -777,10 +777,10 @@
;; between their 2 values.
(module
;; CHECK: (type $super-struct (sub (struct (field i32))))
- (type $super-struct (struct_subtype i32 data))
+ (type $super-struct (sub (struct i32)))
;; CHECK: (type $struct (sub $super-struct (struct (field i32))))
- (type $struct (struct_subtype i32 $super-struct))
+ (type $struct (sub $super-struct (struct i32)))
;; CHECK: (type $2 (func (param (ref null $struct) (ref null $super-struct))))
@@ -888,13 +888,13 @@
;; supertype.
(module
;; CHECK: (type $super-struct (sub (struct (field i32))))
- (type $super-struct (struct_subtype i32 data))
+ (type $super-struct (sub (struct i32)))
;; CHECK: (type $struct1 (sub $super-struct (struct (field i32) (field f32))))
- (type $struct1 (struct_subtype i32 f32 $super-struct))
+ (type $struct1 (sub $super-struct (struct i32 f32)))
;; CHECK: (type $struct2 (sub $super-struct (struct (field i32) (field f64))))
- (type $struct2 (struct_subtype i32 f64 $super-struct))
+ (type $struct2 (sub $super-struct (struct i32 f64)))
;; CHECK: (type $3 (func (param (ref null $super-struct) (ref null $struct1) (ref null $struct2))))
@@ -981,13 +981,13 @@
;; As above, but now the subtypes each have 2 values, and we can optimize.
(module
;; CHECK: (type $super-struct (sub (struct (field i32))))
- (type $super-struct (struct_subtype i32 data))
+ (type $super-struct (sub (struct i32)))
;; CHECK: (type $struct1 (sub $super-struct (struct (field i32) (field f32))))
- (type $struct1 (struct_subtype i32 f32 $super-struct))
+ (type $struct1 (sub $super-struct (struct i32 f32)))
;; CHECK: (type $struct2 (sub $super-struct (struct (field i32) (field f64))))
- (type $struct2 (struct_subtype i32 f64 $super-struct))
+ (type $struct2 (sub $super-struct (struct i32 f64)))
;; CHECK: (type $3 (func (param (ref null $super-struct) (ref null $struct1) (ref null $struct2))))
@@ -1229,13 +1229,13 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field i32))))
- (type $struct (struct_subtype i32 data))
+ (type $struct (sub (struct i32)))
;; CHECK: (type $sub-struct1 (sub $struct (struct (field i32))))
- (type $sub-struct1 (struct_subtype i32 $struct))
+ (type $sub-struct1 (sub $struct (struct i32)))
;; CHECK: (type $sub-struct2 (sub $struct (struct (field i32))))
- (type $sub-struct2 (struct_subtype i32 $struct))
+ (type $sub-struct2 (sub $struct (struct i32)))
)
;; CHECK: (type $3 (func (param (ref null $struct))))
@@ -1283,13 +1283,13 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field i32))))
- (type $struct (struct_subtype i32 data))
+ (type $struct (sub (struct i32)))
;; CHECK: (type $sub-struct1 (sub $struct (struct (field i32))))
- (type $sub-struct1 (struct_subtype i32 $struct))
+ (type $sub-struct1 (sub $struct (struct i32)))
;; CHECK: (type $sub-struct2 (sub $struct (struct (field i32))))
- (type $sub-struct2 (struct_subtype i32 $struct))
+ (type $sub-struct2 (sub $struct (struct i32)))
)
;; CHECK: (type $3 (func (param (ref null $struct))))
@@ -1340,13 +1340,13 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field i32))))
- (type $struct (struct_subtype i32 data))
+ (type $struct (sub (struct i32)))
;; CHECK: (type $sub-struct1 (sub $struct (struct (field i32))))
- (type $sub-struct1 (struct_subtype i32 $struct))
+ (type $sub-struct1 (sub $struct (struct i32)))
;; CHECK: (type $sub-struct2 (sub $struct (struct (field i32))))
- (type $sub-struct2 (struct_subtype i32 $struct))
+ (type $sub-struct2 (sub $struct (struct i32)))
)
;; CHECK: (type $3 (func (param (ref null $struct))))
diff --git a/test/lit/passes/gsi_vacuum_precompute.wast b/test/lit/passes/gsi_vacuum_precompute.wast
index 1cbf47032..8383d57ad 100644
--- a/test/lit/passes/gsi_vacuum_precompute.wast
+++ b/test/lit/passes/gsi_vacuum_precompute.wast
@@ -23,11 +23,11 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $vtable (sub (struct (field funcref))))
- (type $vtable (struct_subtype (field funcref) data))
+ (type $vtable (sub (struct (field funcref))))
;; CHECK: (type $itable1 (sub (struct (field (ref $vtable)))))
- (type $itable1 (struct_subtype (field (ref $vtable)) data))
+ (type $itable1 (sub (struct (field (ref $vtable)))))
;; CHECK: (type $itable2 (sub (struct (field (ref $vtable)))))
- (type $itable2 (struct_subtype (field (ref $vtable)) data))
+ (type $itable2 (sub (struct (field (ref $vtable)))))
)
;; Two $vtable instances are created, in separate enclosing objects.
diff --git a/test/lit/passes/gto-mutability.wast b/test/lit/passes/gto-mutability.wast
index 4be26c348..28fc1bc69 100644
--- a/test/lit/passes/gto-mutability.wast
+++ b/test/lit/passes/gto-mutability.wast
@@ -434,7 +434,7 @@
;; CHECK: (type $super (sub (struct (field i32))))
(type $super (sub (struct (field (mut i32)))))
;; CHECK: (type $sub (sub $super (struct (field i32))))
- (type $sub (struct_subtype (field (mut i32)) $super))
+ (type $sub (sub $super (struct (field (mut i32)))))
;; CHECK: (type $3 (func))
@@ -488,7 +488,7 @@
;; CHECK: (type $super (sub (struct (field (mut i32)))))
(type $super (sub (struct (field (mut i32)))))
;; CHECK: (type $sub (sub $super (struct (field (mut i32)))))
- (type $sub (struct_subtype (field (mut i32)) $super))
+ (type $sub (sub $super (struct (field (mut i32)))))
;; CHECK: (type $2 (func (param (ref $super))))
@@ -553,7 +553,7 @@
;; CHECK: (type $super (sub (struct (field (mut i32)))))
(type $super (sub (struct (field (mut i32)))))
;; CHECK: (type $sub (sub $super (struct (field (mut i32)))))
- (type $sub (struct_subtype (field (mut i32)) $super))
+ (type $sub (sub $super (struct (field (mut i32)))))
;; CHECK: (type $2 (func (param (ref $sub))))
diff --git a/test/lit/passes/gto-removals.wast b/test/lit/passes/gto-removals.wast
index 34e29b71d..07bd3fa45 100644
--- a/test/lit/passes/gto-removals.wast
+++ b/test/lit/passes/gto-removals.wast
@@ -7,7 +7,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct )))
- (type $struct (struct_subtype (field (mut funcref)) data))
+ (type $struct (sub (struct (field (mut funcref)))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -23,7 +23,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct )))
- (type $struct (struct_subtype (field (mut funcref)) data))
+ (type $struct (sub (struct (field (mut funcref)))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -54,7 +54,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct )))
- (type $struct (struct_subtype (field (mut funcref)) data))
+ (type $struct (sub (struct (field (mut funcref)))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -78,7 +78,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct )))
- (type $struct (struct_subtype (field (mut funcref)) data))
+ (type $struct (sub (struct (field (mut funcref)))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -101,7 +101,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field funcref))))
- (type $struct (struct_subtype (field (mut funcref)) data))
+ (type $struct (sub (struct (field (mut funcref)))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -133,11 +133,11 @@
;; CHECK: (type $1 (func (param (ref $imm-struct))))
;; CHECK: (type $mut-struct (sub (struct (field $r i32) (field $rw (mut i32)) (field $r-2 i32) (field $rw-2 (mut i32)))))
- (type $mut-struct (struct_subtype (field $r (mut i32)) (field $w (mut i32)) (field $rw (mut i32)) (field $r-2 (mut i32)) (field $w-2 (mut i32)) (field $rw-2 (mut i32)) data))
+ (type $mut-struct (sub (struct (field $r (mut i32)) (field $w (mut i32)) (field $rw (mut i32)) (field $r-2 (mut i32)) (field $w-2 (mut i32)) (field $rw-2 (mut i32)))))
;; A similar struct but with all fields marked immutable, and the only
;; writes are from during creation (so all fields are at least writeable).
- (type $imm-struct (struct_subtype (field $w i32) (field $rw i32) (field $w-2 i32) (field $rw-2 i32) data))
+ (type $imm-struct (sub (struct (field $w i32) (field $rw i32) (field $w-2 i32) (field $rw-2 i32))))
;; CHECK: (type $3 (func (param (ref $mut-struct))))
@@ -284,7 +284,7 @@
;; CHECK-NEXT: (type $0 (func))
;; CHECK: (type $vtable (sub (struct (field $v1 funcref) (field $v2 funcref))))
- (type $vtable (struct_subtype (field $v0 funcref) (field $v1 funcref) (field $v2 funcref) (field $v3 funcref) (field $v4 funcref) data))
+ (type $vtable (sub (struct (field $v0 funcref) (field $v1 funcref) (field $v2 funcref) (field $v3 funcref) (field $v4 funcref))))
;; CHECK: (global $vtable (ref $vtable) (struct.new $vtable
;; CHECK-NEXT: (ref.func $func-1)
@@ -359,7 +359,7 @@
;; CHECK-NEXT: (type $0 (func))
;; CHECK: (type $vtable (sub (struct (field $v1 i64) (field $v2 f32))))
- (type $vtable (struct_subtype (field $v0 i32) (field $v1 i64) (field $v2 f32) (field $v3 f64) (field $v4 anyref) data))
+ (type $vtable (sub (struct (field $v0 i32) (field $v1 i64) (field $v2 f32) (field $v3 f64) (field $v4 anyref))))
;; CHECK: (global $vtable (ref $vtable) (struct.new $vtable
;; CHECK-NEXT: (i64.const 1)
@@ -636,10 +636,10 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $parent (sub (struct (field i32) (field i64))))
- (type $parent (struct_subtype (field i32) (field i64) (field f32) (field f64) data))
+ (type $parent (sub (struct (field i32) (field i64) (field f32) (field f64))))
;; CHECK: (type $child (sub $parent (struct (field i32) (field i64) (field f32) (field f64) (field anyref))))
- (type $child (struct_subtype (field i32) (field i64) (field f32) (field f64) (field anyref) $parent))
+ (type $child (sub $parent (struct (field i32) (field i64) (field f32) (field f64) (field anyref))))
;; CHECK: (type $2 (func (param (ref $parent) (ref $child))))
@@ -686,10 +686,10 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $parent (sub (struct (field i32) (field i64) (field (mut f32)))))
- (type $parent (struct_subtype (field (mut i32)) (field (mut i64)) (field (mut f32)) (field (mut f64)) data))
+ (type $parent (sub (struct (field (mut i32)) (field (mut i64)) (field (mut f32)) (field (mut f64)))))
;; CHECK: (type $child (sub $parent (struct (field i32) (field i64) (field (mut f32)) (field f64) (field anyref))))
- (type $child (struct_subtype (field (mut i32)) (field (mut i64)) (field (mut f32)) (field (mut f64)) (field (mut anyref)) $parent))
+ (type $child (sub $parent (struct (field (mut i32)) (field (mut i64)) (field (mut f32)) (field (mut f64)) (field (mut anyref)))))
;; CHECK: (type $2 (func (param (ref $parent) (ref $child))))
@@ -744,11 +744,11 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $parent (sub (struct (field i32))))
- (type $parent (struct_subtype (field i32) data))
+ (type $parent (sub (struct (field i32))))
;; CHECK: (type $child1 (sub $parent (struct (field i32))))
- (type $child1 (struct_subtype (field i32) $parent))
+ (type $child1 (sub $parent (struct (field i32))))
;; CHECK: (type $child2 (sub $parent (struct (field i32))))
- (type $child2 (struct_subtype (field i32) $parent))
+ (type $child2 (sub $parent (struct (field i32))))
)
;; CHECK: (type $3 (func (param (ref $parent) (ref $child1) (ref $child2))))
@@ -771,13 +771,13 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $parent (sub (struct )))
- (type $parent (struct_subtype (field i32) data))
+ (type $parent (sub (struct (field i32))))
;; CHECK: (type $child2 (sub $parent (struct )))
;; CHECK: (type $child1 (sub $parent (struct (field i32))))
- (type $child1 (struct_subtype (field i32) $parent))
- (type $child2 (struct_subtype (field i32) $parent))
+ (type $child1 (sub $parent (struct (field i32))))
+ (type $child2 (sub $parent (struct (field i32))))
)
;; CHECK: (type $3 (func (param (ref $parent) (ref $child1) (ref $child2))))
@@ -803,7 +803,7 @@
;; CHECK: (type $2 (func))
;; CHECK: (type ${mut:i8} (sub (struct )))
- (type ${mut:i8} (struct_subtype (field (mut i8)) data))
+ (type ${mut:i8} (sub (struct (field (mut i8)))))
;; CHECK: (type $4 (func (param (ref null ${mut:i8}))))
diff --git a/test/lit/passes/gto_and_cfp_in_O.wast b/test/lit/passes/gto_and_cfp_in_O.wast
index ae0b11ee2..a723038eb 100644
--- a/test/lit/passes/gto_and_cfp_in_O.wast
+++ b/test/lit/passes/gto_and_cfp_in_O.wast
@@ -9,7 +9,7 @@
(module
;; OPEN_WORLD: (type $struct (sub (struct (field (mut funcref)) (field (mut i32)))))
- (type $struct (struct_subtype (field (mut funcref)) (field (mut i32)) data))
+ (type $struct (sub (struct (field (mut funcref)) (field (mut i32)))))
;; OPEN_WORLD: (type $1 (func))
diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast
index ee125b1f2..fa4afd6e0 100644
--- a/test/lit/passes/gufa-refs.wast
+++ b/test/lit/passes/gufa-refs.wast
@@ -924,12 +924,12 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct )))
- (type $struct (struct_subtype data))
+ (type $struct (sub (struct)))
;; CHECK: (type $parent (sub (struct (field (mut (ref null $struct))))))
- (type $parent (struct_subtype (field (mut (ref null $struct))) data))
+ (type $parent (sub (struct (field (mut (ref null $struct))))))
;; CHECK: (type $child (sub $parent (struct (field (mut (ref null $struct))) (field (mut (ref null $struct))))))
- (type $child (struct_subtype (field (mut (ref null $struct))) (field (mut (ref null $struct))) $parent))
+ (type $child (sub $parent (struct (field (mut (ref null $struct))) (field (mut (ref null $struct))))))
;; CHECK: (type $unrelated (struct ))
(type $unrelated (struct))
@@ -1166,9 +1166,9 @@
;; Default values in struct fields.
(module
(rec
- (type $A (struct_subtype (field i32) data))
- (type $B (struct_subtype (field i32) data))
- (type $C (struct_subtype (field i32) data))
+ (type $A (sub (struct (field i32))))
+ (type $B (sub (struct (field i32))))
+ (type $C (sub (struct (field i32))))
)
;; CHECK: (type $0 (func))
@@ -1202,11 +1202,11 @@
;; Exact types: Writes to the parent class do not confuse us.
(module
;; CHECK: (type $struct (sub (struct )))
- (type $struct (struct_subtype data))
+ (type $struct (sub (struct)))
;; CHECK: (type $parent (sub (struct (field (mut (ref null $struct))))))
- (type $parent (struct_subtype (field (mut (ref null $struct))) data))
+ (type $parent (sub (struct (field (mut (ref null $struct))))))
;; CHECK: (type $child (sub $parent (struct (field (mut (ref null $struct))) (field i32))))
- (type $child (struct_subtype (field (mut (ref null $struct))) (field i32) $parent))
+ (type $child (sub $parent (struct (field (mut (ref null $struct))) (field i32))))
;; CHECK: (type $3 (func))
@@ -1286,9 +1286,9 @@
;; Write values to the parent *and* the child and read from the child.
(module
;; CHECK: (type $parent (sub (struct (field (mut i32)))))
- (type $parent (struct_subtype (field (mut i32)) data))
+ (type $parent (sub (struct (field (mut i32)))))
;; CHECK: (type $child (sub $parent (struct (field (mut i32)) (field i32))))
- (type $child (struct_subtype (field (mut i32)) (field i32) $parent))
+ (type $child (sub $parent (struct (field (mut i32)) (field i32))))
;; CHECK: (type $2 (func))
@@ -1378,9 +1378,9 @@
;; As above, but the $parent local can now contain a child too.
(module
;; CHECK: (type $parent (sub (struct (field (mut i32)))))
- (type $parent (struct_subtype (field (mut i32)) data))
+ (type $parent (sub (struct (field (mut i32)))))
;; CHECK: (type $child (sub $parent (struct (field (mut i32)) (field i32))))
- (type $child (struct_subtype (field (mut i32)) (field i32) $parent))
+ (type $child (sub $parent (struct (field (mut i32)) (field i32))))
;; CHECK: (type $2 (func (param i32)))
@@ -1461,9 +1461,9 @@
;; As above, but now the parent and child happen to agree on the aliased value.
(module
;; CHECK: (type $parent (sub (struct (field (mut i32)))))
- (type $parent (struct_subtype (field (mut i32)) data))
+ (type $parent (sub (struct (field (mut i32)))))
;; CHECK: (type $child (sub $parent (struct (field (mut i32)) (field i32))))
- (type $child (struct_subtype (field (mut i32)) (field i32) $parent))
+ (type $child (sub $parent (struct (field (mut i32)) (field i32))))
;; CHECK: (type $2 (func))
@@ -1539,16 +1539,16 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $nothing (sub (array (mut anyref))))
- (type $nothing (array_subtype (mut (ref null any)) data))
+ (type $nothing (sub (array (mut (ref null any)))))
;; CHECK: (type $null (sub (array (mut anyref))))
- (type $null (array_subtype (mut (ref null any)) data))
+ (type $null (sub (array (mut (ref null any)))))
;; CHECK: (type $something (sub (array (mut anyref))))
- (type $something (array_subtype (mut (ref null any)) data))
+ (type $something (sub (array (mut (ref null any)))))
;; CHECK: (type $something-child (sub $something (array (mut anyref))))
- (type $something-child (array_subtype (mut (ref null any)) $something))
+ (type $something-child (sub $something (array (mut (ref null any)))))
)
;; CHECK: (type $4 (func))
@@ -2204,7 +2204,7 @@
(module
;; CHECK: (type ${} (sub (struct )))
- (type ${} (struct_subtype data))
+ (type ${} (sub (struct)))
;; CHECK: (type $1 (func (result (ref ${}))))
@@ -2240,13 +2240,13 @@
;; CHECK: (type $0 (func))
;; CHECK: (type $A (sub (struct (field i32))))
- (type $A (struct_subtype (field i32) data))
+ (type $A (sub (struct (field i32))))
;; CHECK: (type $B (sub (struct (field i64))))
- (type $B (struct_subtype (field i64) data))
+ (type $B (sub (struct (field i64))))
;; CHECK: (type $C (sub (struct (field f32))))
- (type $C (struct_subtype (field f32) data))
+ (type $C (sub (struct (field f32))))
;; CHECK: (type $D (sub (struct (field f64))))
- (type $D (struct_subtype (field f64) data))
+ (type $D (sub (struct (field f64))))
;; CHECK: (func $many-types (type $0)
;; CHECK-NEXT: (local $x anyref)
@@ -2313,7 +2313,7 @@
;; init) and a function ($create).
(module
;; CHECK: (type $vtable-A (sub (struct (field funcref) (field funcref) (field funcref))))
- (type $vtable-A (struct_subtype (field (ref null func)) (field (ref null func)) (field (ref null func)) data))
+ (type $vtable-A (sub (struct (field (ref null func)) (field (ref null func)) (field (ref null func)))))
;; CHECK: (type $1 (func))
@@ -2396,7 +2396,7 @@
(module
;; CHECK: (type $struct (sub (struct (field i32))))
- (type $struct (struct_subtype (field i32) data))
+ (type $struct (sub (struct (field i32))))
;; CHECK: (type $1 (func))
@@ -2447,18 +2447,18 @@
;; Casts.
(module
;; CHECK: (type $struct (sub (struct (field i32))))
- (type $struct (struct_subtype (field i32) data))
+ (type $struct (sub (struct (field i32))))
;; CHECK: (type $substruct (sub $struct (struct (field i32) (field i32))))
- (type $substruct (struct_subtype (field i32) (field i32) $struct))
+ (type $substruct (sub $struct (struct (field i32) (field i32))))
;; CHECK: (type $2 (func))
;; CHECK: (type $subsubstruct (sub $substruct (struct (field i32) (field i32) (field i32))))
- (type $subsubstruct (struct_subtype (field i32) (field i32) (field i32) $substruct))
+ (type $subsubstruct (sub $substruct (struct (field i32) (field i32) (field i32))))
;; CHECK: (type $4 (func (param i32)))
;; CHECK: (type $other (sub (struct )))
- (type $other (struct_subtype data))
+ (type $other (sub (struct)))
;; CHECK: (type $6 (func (result i32)))
@@ -3348,8 +3348,8 @@
;; Test ref.eq on globals.
(module
;; CHECK: (type $A (sub (struct (field i32))))
- (type $A (struct_subtype (field i32) data))
- (type $B (struct_subtype (field i32) $A))
+ (type $A (sub (struct (field i32))))
+ (type $B (sub $A (struct (field i32))))
;; CHECK: (type $1 (func))
@@ -3478,9 +3478,9 @@
)
(module
- (type $A (struct_subtype (field i32) data))
- (type $B (struct_subtype (ref $A) data))
- (type $C (struct_subtype (ref $B) data))
+ (type $A (sub (struct (field i32))))
+ (type $B (sub (struct (ref $A))))
+ (type $C (sub (struct (ref $B))))
;; CHECK: (type $0 (func))
@@ -3512,11 +3512,11 @@
(module
;; CHECK: (type $A (sub (struct (field i32))))
- (type $A (struct_subtype (field i32) data))
+ (type $A (sub (struct (field i32))))
;; CHECK: (type $B (sub (struct (field (ref $A)))))
- (type $B (struct_subtype (ref $A) data))
+ (type $B (sub (struct (ref $A))))
;; CHECK: (type $C (sub (struct (field (ref $B)))))
- (type $C (struct_subtype (ref $B) data))
+ (type $C (sub (struct (ref $B))))
;; CHECK: (type $3 (func (result i32)))
@@ -3565,9 +3565,9 @@
;; ref.as* test.
(module
;; CHECK: (type $A (sub (struct (field i32))))
- (type $A (struct_subtype (field i32) data))
+ (type $A (sub (struct (field i32))))
;; CHECK: (type $B (sub $A (struct (field i32) (field f64))))
- (type $B (struct_subtype (field i32) (field f64) $A))
+ (type $B (sub $A (struct (field i32) (field f64))))
;; CHECK: (type $2 (func (result i32)))
@@ -3611,11 +3611,11 @@
(module
;; CHECK: (type $A (sub (struct (field i32))))
- (type $A (struct_subtype (field i32) data))
+ (type $A (sub (struct (field i32))))
;; CHECK: (type $1 (func (result i32)))
;; CHECK: (type $B (sub $A (struct (field i32) (field i32))))
- (type $B (struct_subtype (field i32) (field i32) $A))
+ (type $B (sub $A (struct (field i32) (field i32))))
;; CHECK: (func $0 (type $1) (result i32)
;; CHECK-NEXT: (local $ref (ref null $A))
;; CHECK-NEXT: (local.set $ref
@@ -3838,7 +3838,7 @@
;; they might appear as if no content were possible there, and we'd emit an
;; unreachable. That should not happen anywhere here.
(module
- (type $A (struct_subtype data))
+ (type $A (sub (struct)))
;; CHECK: (type $0 (func))
@@ -4224,10 +4224,10 @@
(module
;; CHECK: (type $struct (sub (struct (field (mut i32)))))
- (type $struct (struct_subtype (mut i32) data))
+ (type $struct (sub (struct (mut i32))))
;; CHECK: (type $substruct (sub $struct (struct (field (mut i32)) (field f64))))
- (type $substruct (struct_subtype (mut i32) f64 $struct))
+ (type $substruct (sub $struct (struct (mut i32) f64)))
;; CHECK: (type $2 (func))
@@ -4300,10 +4300,10 @@
;; global $something.
(module
;; CHECK: (type $struct (sub (struct (field (mut i32)))))
- (type $struct (struct_subtype (mut i32) data))
+ (type $struct (sub (struct (mut i32))))
;; CHECK: (type $substruct (sub $struct (struct (field (mut i32)) (field f64))))
- (type $substruct (struct_subtype (mut i32) f64 $struct))
+ (type $substruct (sub $struct (struct (mut i32) f64)))
;; CHECK: (type $2 (func))
@@ -4378,10 +4378,10 @@
;; we can optimize.
(module
;; CHECK: (type $struct (sub (struct (field (mut i32)))))
- (type $struct (struct_subtype (mut i32) data))
+ (type $struct (sub (struct (mut i32))))
;; CHECK: (type $substruct (sub $struct (struct (field (mut i32)) (field f64))))
- (type $substruct (struct_subtype (mut i32) f64 $struct))
+ (type $substruct (sub $struct (struct (mut i32) f64)))
;; CHECK: (type $2 (func))
@@ -4586,11 +4586,11 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field (mut i32)))))
- (type $A (struct_subtype (field (mut i32)) data))
+ (type $A (sub (struct (field (mut i32)))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (field (mut i32)) $A))
+ (type $B (sub $A (struct (field (mut i32)))))
;; CHECK: (type $C (sub $B (struct (field (mut i32)))))
- (type $C (struct_subtype (field (mut i32)) $B))
+ (type $C (sub $B (struct (field (mut i32)))))
)
;; CHECK: (type $3 (func (param i32)))
@@ -4694,11 +4694,11 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field (mut i32)))))
- (type $A (struct_subtype (field (mut i32)) data))
+ (type $A (sub (struct (field (mut i32)))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (field (mut i32)) $A))
+ (type $B (sub $A (struct (field (mut i32)))))
;; CHECK: (type $C (sub $B (struct (field (mut i32)))))
- (type $C (struct_subtype (field (mut i32)) $B))
+ (type $C (sub $B (struct (field (mut i32)))))
)
;; CHECK: (type $3 (func (param i32)))
@@ -4802,11 +4802,11 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field (mut i32)))))
- (type $A (struct_subtype (field (mut i32)) data))
+ (type $A (sub (struct (field (mut i32)))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (field (mut i32)) $A))
+ (type $B (sub $A (struct (field (mut i32)))))
;; CHECK: (type $C (sub $A (struct (field (mut i32)))))
- (type $C (struct_subtype (field (mut i32)) $A)) ;; This line changed.
+ (type $C (sub $A (struct (field (mut i32))))) ;; This line changed.
)
;; CHECK: (type $3 (func (param i32)))
@@ -4916,11 +4916,11 @@
;; Cone writes.
(module
;; CHECK: (type $A (sub (struct (field (mut i32)))))
- (type $A (struct_subtype (field (mut i32)) data))
+ (type $A (sub (struct (field (mut i32)))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (field (mut i32)) $A))
+ (type $B (sub $A (struct (field (mut i32)))))
;; CHECK: (type $C (sub $B (struct (field (mut i32)))))
- (type $C (struct_subtype (field (mut i32)) $B))
+ (type $C (sub $B (struct (field (mut i32)))))
;; CHECK: (type $3 (func (param i32)))
@@ -5014,11 +5014,11 @@
;; As above, but write a different value.
(module
;; CHECK: (type $A (sub (struct (field (mut i32)))))
- (type $A (struct_subtype (field (mut i32)) data))
+ (type $A (sub (struct (field (mut i32)))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (field (mut i32)) $A))
+ (type $B (sub $A (struct (field (mut i32)))))
;; CHECK: (type $C (sub $B (struct (field (mut i32)))))
- (type $C (struct_subtype (field (mut i32)) $B))
+ (type $C (sub $B (struct (field (mut i32)))))
;; CHECK: (type $3 (func (param i32)))
@@ -5113,11 +5113,11 @@
;; As above, but write a different cone.
(module
;; CHECK: (type $A (sub (struct (field (mut i32)))))
- (type $A (struct_subtype (field (mut i32)) data))
+ (type $A (sub (struct (field (mut i32)))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (field (mut i32)) $A))
+ (type $B (sub $A (struct (field (mut i32)))))
;; CHECK: (type $C (sub $B (struct (field (mut i32)))))
- (type $C (struct_subtype (field (mut i32)) $B))
+ (type $C (sub $B (struct (field (mut i32)))))
;; CHECK: (type $3 (func (param i32)))
@@ -5213,10 +5213,10 @@
;; at least.
(module
;; CHECK: (type $A (sub (struct (field (mut i32)))))
- (type $A (struct_subtype (field (mut i32)) data))
+ (type $A (sub (struct (field (mut i32)))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (field (mut i32)) $A))
+ (type $B (sub $A (struct (field (mut i32)))))
;; CHECK: (type $2 (func (param (ref $A))))
diff --git a/test/lit/passes/gufa-vs-cfp.wast b/test/lit/passes/gufa-vs-cfp.wast
index 3ed490628..eb365c5d1 100644
--- a/test/lit/passes/gufa-vs-cfp.wast
+++ b/test/lit/passes/gufa-vs-cfp.wast
@@ -498,7 +498,7 @@
(module
;; CHECK: (type $struct (sub (struct (field i32))))
(type $struct (sub (struct i32)))
- (type $substruct (struct_subtype i32 $struct))
+ (type $substruct (sub $struct (struct i32)))
;; CHECK: (type $1 (func (result (ref $struct))))
@@ -545,7 +545,7 @@
(module
;; CHECK: (type $struct (sub (struct (field (mut i32)))))
(type $struct (sub (struct (mut i32))))
- (type $substruct (struct_subtype (mut i32) $struct))
+ (type $substruct (sub $struct (struct (mut i32))))
;; CHECK: (type $1 (func))
@@ -604,7 +604,7 @@
(module
;; CHECK: (type $struct (sub (struct (field (mut i32)))))
(type $struct (sub (struct (mut i32))))
- (type $substruct (struct_subtype (mut i32) $struct))
+ (type $substruct (sub $struct (struct (mut i32))))
;; CHECK: (type $1 (func))
@@ -657,7 +657,7 @@
(module
(type $struct (sub (struct i32)))
- (type $substruct (struct_subtype i32 f64 $struct))
+ (type $substruct (sub $struct (struct i32 f64)))
;; CHECK: (type $0 (func))
@@ -688,7 +688,7 @@
;; CHECK: (type $2 (func))
;; CHECK: (type $substruct (sub $struct (struct (field i32) (field f64))))
- (type $substruct (struct_subtype i32 f64 $struct))
+ (type $substruct (sub $struct (struct i32 f64)))
;; CHECK: (import "a" "b" (func $import (type $1) (result i32)))
(import "a" "b" (func $import (result i32)))
@@ -742,7 +742,7 @@
;; CHECK: (type $2 (func))
;; CHECK: (type $substruct (sub $struct (struct (field i32) (field f64))))
- (type $substruct (struct_subtype i32 f64 $struct))
+ (type $substruct (sub $struct (struct i32 f64)))
;; CHECK: (import "a" "b" (func $import (type $1) (result i32)))
(import "a" "b" (func $import (result i32)))
@@ -790,7 +790,7 @@
(type $struct (sub (struct i32)))
;; CHECK: (type $substruct (sub $struct (struct (field i32) (field f64))))
- (type $substruct (struct_subtype i32 f64 $struct))
+ (type $substruct (sub $struct (struct i32 f64)))
;; CHECK: (type $2 (func (result i32)))
@@ -847,7 +847,7 @@
(type $struct (sub (struct (mut i32))))
;; CHECK: (type $substruct (sub $struct (struct (field (mut i32)) (field f64))))
- (type $substruct (struct_subtype (mut i32) f64 $struct))
+ (type $substruct (sub $struct (struct (mut i32) f64)))
;; CHECK: (type $2 (func (result i32)))
@@ -921,7 +921,7 @@
(type $struct (sub (struct (mut i32))))
;; CHECK: (type $substruct (sub $struct (struct (field (mut i32)) (field f64))))
- (type $substruct (struct_subtype (mut i32) f64 $struct))
+ (type $substruct (sub $struct (struct (mut i32) f64)))
;; CHECK: (type $2 (func (result i32)))
@@ -997,13 +997,13 @@
;; supertype but all the way as needed.
(module
;; CHECK: (type $struct1 (sub (struct (field i32))))
- (type $struct1 (struct_subtype i32 data))
+ (type $struct1 (sub (struct i32)))
;; CHECK: (type $struct2 (sub $struct1 (struct (field i32) (field f64))))
- (type $struct2 (struct_subtype i32 f64 $struct1))
+ (type $struct2 (sub $struct1 (struct i32 f64)))
;; CHECK: (type $struct3 (sub $struct2 (struct (field i32) (field f64) (field anyref))))
- (type $struct3 (struct_subtype i32 f64 anyref $struct2))
+ (type $struct3 (sub $struct2 (struct i32 f64 anyref)))
;; CHECK: (type $3 (func (result (ref $struct3))))
@@ -1141,10 +1141,10 @@
(type $struct1 (sub (struct i32 i32)))
;; CHECK: (type $struct2 (sub $struct1 (struct (field i32) (field i32) (field f64) (field f64))))
- (type $struct2 (struct_subtype i32 i32 f64 f64 $struct1))
+ (type $struct2 (sub $struct1 (struct i32 i32 f64 f64)))
;; CHECK: (type $struct3 (sub $struct2 (struct (field i32) (field i32) (field f64) (field f64) (field anyref) (field anyref))))
- (type $struct3 (struct_subtype i32 i32 f64 f64 anyref anyref $struct2))
+ (type $struct3 (sub $struct2 (struct i32 i32 f64 f64 anyref anyref)))
;; CHECK: (type $3 (func))
@@ -1374,11 +1374,11 @@
;; CHECK: (type $struct1 (sub (struct (field (mut i32)))))
(type $struct1 (sub (struct (mut i32))))
;; CHECK: (type $struct2 (sub $struct1 (struct (field (mut i32)) (field f64))))
- (type $struct2 (struct_subtype (mut i32) f64 $struct1))
+ (type $struct2 (sub $struct1 (struct (mut i32) f64)))
;; CHECK: (type $2 (func))
;; CHECK: (type $struct3 (sub $struct2 (struct (field (mut i32)) (field f64) (field anyref))))
- (type $struct3 (struct_subtype (mut i32) f64 anyref $struct2))
+ (type $struct3 (sub $struct2 (struct (mut i32) f64 anyref)))
;; CHECK: (type $4 (func (result i32)))
@@ -1679,9 +1679,9 @@
;; CHECK: (type $struct1 (sub (struct (field (mut i32)))))
(type $struct1 (sub (struct (mut i32))))
;; CHECK: (type $struct2 (sub $struct1 (struct (field (mut i32)) (field f64))))
- (type $struct2 (struct_subtype (mut i32) f64 $struct1))
+ (type $struct2 (sub $struct1 (struct (mut i32) f64)))
;; CHECK: (type $struct3 (sub $struct2 (struct (field (mut i32)) (field f64) (field anyref))))
- (type $struct3 (struct_subtype (mut i32) f64 anyref $struct2))
+ (type $struct3 (sub $struct2 (struct (mut i32) f64 anyref)))
;; CHECK: (type $3 (func (result i32)))
@@ -1795,9 +1795,9 @@
;; CHECK: (type $struct1 (sub (struct (field (mut i32)))))
(type $struct1 (sub (struct (mut i32))))
;; CHECK: (type $struct2 (sub $struct1 (struct (field (mut i32)) (field f64))))
- (type $struct2 (struct_subtype (mut i32) f64 $struct1))
+ (type $struct2 (sub $struct1 (struct (mut i32) f64)))
;; CHECK: (type $struct3 (sub $struct2 (struct (field (mut i32)) (field f64) (field anyref))))
- (type $struct3 (struct_subtype (mut i32) f64 anyref $struct2))
+ (type $struct3 (sub $struct2 (struct (mut i32) f64 anyref)))
;; CHECK: (type $3 (func (result i32)))
@@ -2023,10 +2023,10 @@
(type $A (sub (struct (mut i32))))
;; CHECK: (type $B (sub $A (struct (field (mut i32)))))
- (type $B (struct_subtype (mut i32) $A))
+ (type $B (sub $A (struct (mut i32))))
;; CHECK: (type $C (sub $B (struct (field (mut i32)))))
- (type $C (struct_subtype (mut i32) $B))
+ (type $C (sub $B (struct (mut i32))))
;; CHECK: (type $3 (func))
diff --git a/test/lit/passes/inlining_vacuum_optimize-instructions.wast b/test/lit/passes/inlining_vacuum_optimize-instructions.wast
index 948fe467f..f93dca217 100644
--- a/test/lit/passes/inlining_vacuum_optimize-instructions.wast
+++ b/test/lit/passes/inlining_vacuum_optimize-instructions.wast
@@ -12,9 +12,9 @@
;; there.
(module
;; CHECK: (type $B (sub (struct )))
- (type $B (struct_subtype data))
+ (type $B (sub (struct )))
;; CHECK: (type $A (sub (struct (field (ref null $B)))))
- (type $A (struct_subtype (field (ref null $B)) data))
+ (type $A (sub (struct (field (ref null $B)))))
;; CHECK: (type $2 (func (param (ref null $A))))
;; CHECK: (func $target (type $2) (param $0 (ref null $A))
diff --git a/test/lit/passes/local-subtyping.wast b/test/lit/passes/local-subtyping.wast
index 3d4d392a9..38571e703 100644
--- a/test/lit/passes/local-subtyping.wast
+++ b/test/lit/passes/local-subtyping.wast
@@ -8,11 +8,11 @@
;; testcases.
(module
- (type ${} (struct_subtype data))
+ (type ${} (sub (struct)))
- (type ${i32} (struct_subtype (field i32) data))
+ (type ${i32} (sub (struct (field i32))))
- (type $array (array_subtype i8 data))
+ (type $array (sub (array i8)))
;; CHECK: (type $ret-any (sub (func (result anyref))))
(type $ret-any (sub (func (result anyref))))
diff --git a/test/lit/passes/merge-similar-functions_types.wast b/test/lit/passes/merge-similar-functions_types.wast
index 5c4364a14..717777ab7 100644
--- a/test/lit/passes/merge-similar-functions_types.wast
+++ b/test/lit/passes/merge-similar-functions_types.wast
@@ -7,11 +7,11 @@
;; However, their nominal types differ, so in nominal typing we cannot do so.
(module
;; CHECK: (type $type$0 (sub (func)))
- (type $type$0 (func_subtype func))
- (type $type$1 (func_subtype func))
- (type $type$2 (func_subtype func))
- (type $type$3 (func_subtype (param f32) (result f32) func))
- (type $type$4 (func_subtype (param f64) (result f64) func))
+ (type $type$0 (sub (func)))
+ (type $type$1 (sub (func)))
+ (type $type$2 (sub (func)))
+ (type $type$3 (sub (func (param f32) (result f32))))
+ (type $type$4 (sub (func (param f64) (result f64))))
;; CHECK: (type $1 (func (param (ref $type$0))))
;; CHECK: (elem declare func $2 $3)
@@ -111,10 +111,10 @@
;; As above, but now the nominal types do match, so we can optimize in all
;; modes.
;; CHECK: (type $type$0 (sub (func)))
- (type $type$0 (func_subtype func))
- (type $type$1 (func_subtype func))
- (type $type$3 (func_subtype (param f32) (result f32) func))
- (type $type$4 (func_subtype (param f64) (result f64) func))
+ (type $type$0 (sub (func)))
+ (type $type$1 (sub (func)))
+ (type $type$3 (sub (func (param f32) (result f32))))
+ (type $type$4 (sub (func (param f64) (result f64))))
;; CHECK: (type $1 (func (param (ref $type$0))))
diff --git a/test/lit/passes/monomorphize.wast b/test/lit/passes/monomorphize.wast
index 858cb4bf5..0974978b9 100644
--- a/test/lit/passes/monomorphize.wast
+++ b/test/lit/passes/monomorphize.wast
@@ -9,10 +9,10 @@
(module
;; ALWAYS: (type $A (sub (struct )))
;; CAREFUL: (type $A (sub (struct )))
- (type $A (struct_subtype data))
+ (type $A (sub (struct)))
;; ALWAYS: (type $B (sub $A (struct )))
;; CAREFUL: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; ALWAYS: (type $2 (func (param (ref $A))))
@@ -128,10 +128,10 @@
;; CAREFUL: (type $0 (func))
;; CAREFUL: (type $A (sub (struct )))
- (type $A (struct_subtype data))
+ (type $A (sub (struct)))
;; ALWAYS: (type $B (sub $A (struct )))
;; CAREFUL: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
@@ -208,10 +208,10 @@
;; CAREFUL: (type $0 (func))
;; CAREFUL: (type $A (sub (struct )))
- (type $A (struct_subtype data))
+ (type $A (sub (struct)))
;; ALWAYS: (type $B (sub $A (struct )))
;; CAREFUL: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; ALWAYS: (type $2 (func))
@@ -219,7 +219,7 @@
;; CAREFUL: (type $3 (func (param (ref $A))))
;; CAREFUL: (type $C (sub $B (struct )))
- (type $C (struct_subtype $B))
+ (type $C (sub $B (struct)))
;; ALWAYS: (type $4 (func (param (ref $A))))
@@ -329,11 +329,11 @@
;; ALWAYS: (type $A (sub (struct )))
;; CAREFUL: (type $A (sub (struct )))
- (type $A (struct_subtype data))
+ (type $A (sub (struct)))
;; ALWAYS: (type $B (sub $A (struct )))
;; CAREFUL: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; ALWAYS: (type $2 (func (param (ref $B))))
@@ -560,14 +560,14 @@
;; ALWAYS: (type $A (sub (struct )))
;; CAREFUL: (type $A (sub (struct )))
- (type $A (struct_subtype data))
+ (type $A (sub (struct)))
;; ALWAYS: (type $1 (func (param (ref $A))))
;; ALWAYS: (type $B (sub $A (struct )))
;; CAREFUL: (type $1 (func (param (ref $A))))
;; CAREFUL: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; ALWAYS: (func $calls (type $1) (param $ref (ref $A))
diff --git a/test/lit/passes/optimize-casts-tnh.wast b/test/lit/passes/optimize-casts-tnh.wast
index d5f83f024..a03994705 100644
--- a/test/lit/passes/optimize-casts-tnh.wast
+++ b/test/lit/passes/optimize-casts-tnh.wast
@@ -3,7 +3,7 @@
(module
;; CHECK: (type $A (sub (struct )))
- (type $A (struct_subtype data))
+ (type $A (sub (struct)))
;; CHECK: (global $a (mut i32) (i32.const 0))
(global $a (mut i32) (i32.const 0))
@@ -42,4 +42,3 @@
)
)
)
-
diff --git a/test/lit/passes/optimize-casts.wast b/test/lit/passes/optimize-casts.wast
index 2854df3bb..d0b4d05d7 100644
--- a/test/lit/passes/optimize-casts.wast
+++ b/test/lit/passes/optimize-casts.wast
@@ -3,10 +3,10 @@
(module
;; CHECK: (type $A (sub (struct )))
- (type $A (struct_subtype data))
+ (type $A (sub (struct)))
;; CHECK: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; CHECK: (type $void (func))
diff --git a/test/lit/passes/optimize-instructions-gc-iit.wast b/test/lit/passes/optimize-instructions-gc-iit.wast
index cc5e8aec9..1cd92d98a 100644
--- a/test/lit/passes/optimize-instructions-gc-iit.wast
+++ b/test/lit/passes/optimize-instructions-gc-iit.wast
@@ -13,7 +13,7 @@
(type $parent (sub (struct (field i32))))
;; CHECK: (type $child (sub $parent (struct (field i32) (field f64))))
;; TNH: (type $child (sub $parent (struct (field i32) (field f64))))
- (type $child (struct_subtype (field i32) (field f64) $parent))
+ (type $child (sub $parent (struct (field i32) (field f64))))
;; CHECK: (type $other (struct (field i64) (field f32)))
;; TNH: (type $other (struct (field i64) (field f32)))
(type $other (struct (field i64) (field f32)))
@@ -203,16 +203,16 @@
;; CHECK-NEXT: (type $A (sub (struct )))
;; TNH: (rec
;; TNH-NEXT: (type $A (sub (struct )))
- (type $A (struct_subtype data))
+ (type $A (sub (struct )))
;; CHECK: (type $B (sub $A (struct (field (ref null $A)))))
;; TNH: (type $B (sub $A (struct (field (ref null $A)))))
- (type $B (struct_subtype (field (ref null $A)) $A))
+ (type $B (sub $A (struct (field (ref null $A)))))
;; CHECK: (type $C (sub $B (struct (field (ref null $D)))))
;; TNH: (type $C (sub $B (struct (field (ref null $D)))))
- (type $C (struct_subtype (field (ref null $D)) $B))
+ (type $C (sub $B (struct (field (ref null $D)))))
;; CHECK: (type $D (sub $A (struct )))
;; TNH: (type $D (sub $A (struct )))
- (type $D (struct_subtype $A))
+ (type $D (sub $A (struct )))
)
;; CHECK: (func $test (type $4) (param $C (ref $C)) (result anyref)
diff --git a/test/lit/passes/optimize-instructions-gc-tnh.wast b/test/lit/passes/optimize-instructions-gc-tnh.wast
index 9d55ef801..98372bed2 100644
--- a/test/lit/passes/optimize-instructions-gc-tnh.wast
+++ b/test/lit/passes/optimize-instructions-gc-tnh.wast
@@ -5,7 +5,7 @@
(module
;; TNH: (type $struct (sub (struct (field (mut i32)))))
;; NO_TNH: (type $struct (sub (struct (field (mut i32)))))
- (type $struct (struct_subtype (field (mut i32)) data))
+ (type $struct (sub (struct (field (mut i32)))))
;; TNH: (type $void (func))
;; NO_TNH: (type $void (func))
diff --git a/test/lit/passes/optimize-instructions-gc.wast b/test/lit/passes/optimize-instructions-gc.wast
index e62b64125..cbf44aee4 100644
--- a/test/lit/passes/optimize-instructions-gc.wast
+++ b/test/lit/passes/optimize-instructions-gc.wast
@@ -20,10 +20,10 @@
;; CHECK: (type $array (array (mut i8)))
(type $array (array (mut i8)))
- (type $B (struct_subtype (field i32) (field i32) (field f32) $A))
+ (type $B (sub $A (struct (field i32) (field i32) (field f32))))
;; CHECK: (type $B-child (sub $B (struct (field i32) (field i32) (field f32) (field i64))))
- (type $B-child (struct_subtype (field i32) (field i32) (field f32) (field i64) $B))
+ (type $B-child (sub $B (struct (field i32) (field i32) (field f32) (field i64))))
(type $empty (struct))
@@ -32,11 +32,11 @@
;; CHECK: (type $void2 (sub $void (func)))
;; CHECK: (type $C (sub $A (struct (field i32) (field i32) (field f64))))
- (type $C (struct_subtype (field i32) (field i32) (field f64) $A))
+ (type $C (sub $A (struct (field i32) (field i32) (field f64))))
(type $void (sub (func)))
- (type $void2 (func_subtype $void))
+ (type $void2 (sub $void (func)))
;; CHECK: (type $struct_i64 (func (param structref) (result i64)))
(type $struct_i64 (func (param (ref null struct)) (result i64)))
diff --git a/test/lit/passes/remove-unused-module-elements-refs.wast b/test/lit/passes/remove-unused-module-elements-refs.wast
index 8a7ef42da..00ea9767f 100644
--- a/test/lit/passes/remove-unused-module-elements-refs.wast
+++ b/test/lit/passes/remove-unused-module-elements-refs.wast
@@ -16,11 +16,11 @@
;; CHECK: (type $A (sub $A-super (func)))
;; OPEN_WORLD: (type $A (sub $A-super (func)))
- (type $A (func_subtype $A-super))
+ (type $A (sub $A-super (func)))
;; CHECK: (type $A-sub (sub $A (func)))
;; OPEN_WORLD: (type $A-sub (sub $A (func)))
- (type $A-sub (func_subtype $A))
+ (type $A-sub (sub $A (func)))
;; CHECK: (type $B (func))
;; OPEN_WORLD: (type $B (func))
@@ -636,7 +636,7 @@
;; CHECK: (type $vtable (sub (struct (field (ref $void)) (field (ref $void)))))
;; OPEN_WORLD: (type $vtable (sub (struct (field (ref $void)) (field (ref $void)))))
- (type $vtable (struct_subtype (field (ref $void)) (field (ref $void)) data))
+ (type $vtable (sub (struct (field (ref $void)) (field (ref $void)))))
;; CHECK: (global $vtable (ref $vtable) (struct.new $vtable
;; CHECK-NEXT: (ref.func $a)
@@ -756,11 +756,11 @@
;; CHECK: (type $vtable (sub (struct (field (ref $void)) (field (ref $void)))))
;; OPEN_WORLD: (type $vtable (sub (struct (field (ref $void)) (field (ref $void)))))
- (type $vtable (struct_subtype (field (ref $void)) (field (ref $void)) data))
+ (type $vtable (sub (struct (field (ref $void)) (field (ref $void)))))
;; CHECK: (type $struct (sub (struct (field (ref $vtable)) (field (ref $vtable)) (field (ref $vtable)) (field (ref $vtable)))))
;; OPEN_WORLD: (type $struct (sub (struct (field (ref $vtable)) (field (ref $vtable)) (field (ref $vtable)) (field (ref $vtable)))))
- (type $struct (struct_subtype (field (ref $vtable)) (field (ref $vtable)) (field (ref $vtable)) (field (ref $vtable)) data))
+ (type $struct (sub (struct (field (ref $vtable)) (field (ref $vtable)) (field (ref $vtable)) (field (ref $vtable)))))
;; CHECK: (global $vtable (ref $vtable) (struct.new $vtable
;; CHECK-NEXT: (ref.func $a)
@@ -1072,7 +1072,7 @@
;; CHECK: (type $vtable (sub (struct (field (ref $void)) (field (ref $void)))))
;; OPEN_WORLD: (type $vtable (sub (struct (field (ref $void)) (field (ref $void)))))
- (type $vtable (struct_subtype (field (ref $void)) (field (ref $void)) data))
+ (type $vtable (sub (struct (field (ref $void)) (field (ref $void)))))
;; CHECK: (elem declare func $a $b $void)
@@ -1176,7 +1176,7 @@
(type $vtable-func (func (param (ref $vtable))))
;; CHECK: (type $vtable (sub (struct (field (ref $vtable-func)) (field (ref $vtable-func)))))
;; OPEN_WORLD: (type $vtable (sub (struct (field (ref $vtable-func)) (field (ref $vtable-func)))))
- (type $vtable (struct_subtype (field (ref $vtable-func)) (field (ref $vtable-func)) data))
+ (type $vtable (sub (struct (field (ref $vtable-func)) (field (ref $vtable-func)))))
)
;; CHECK: (type $2 (func))
@@ -1374,11 +1374,11 @@
;; CHECK: (type $substruct (sub $struct (struct (field funcref))))
;; OPEN_WORLD: (type $substruct (sub $struct (struct (field funcref))))
- (type $substruct (struct_subtype (field funcref) $struct))
+ (type $substruct (sub $struct (struct (field funcref))))
;; CHECK: (type $subsubstruct (sub $substruct (struct (field funcref))))
;; OPEN_WORLD: (type $subsubstruct (sub $substruct (struct (field funcref))))
- (type $subsubstruct (struct_subtype (field funcref) $substruct))
+ (type $subsubstruct (sub $substruct (struct (field funcref))))
;; CHECK: (global $g (ref $struct) (struct.new $struct
;; CHECK-NEXT: (ref.func $f)
diff --git a/test/lit/passes/roundtrip-gc-types.wast b/test/lit/passes/roundtrip-gc-types.wast
index c3b3e93c1..8f1bf4e82 100644
--- a/test/lit/passes/roundtrip-gc-types.wast
+++ b/test/lit/passes/roundtrip-gc-types.wast
@@ -19,7 +19,7 @@
(type $C (struct (field (mut (ref $B)))))
;; CHECK: (type $D (sub $A (struct (field (ref $C)) (field (ref $A)))))
- (type $D (struct_subtype (field (ref $C)) (field (ref $A)) $A))
+ (type $D (sub $A (struct (field (ref $C)) (field (ref $A)))))
)
;; CHECK: (func $use-types (type $4) (param $0 (ref $A)) (param $1 (ref $D))
diff --git a/test/lit/passes/rse-gc.wast b/test/lit/passes/rse-gc.wast
index 1dbc61574..367f3ce18 100644
--- a/test/lit/passes/rse-gc.wast
+++ b/test/lit/passes/rse-gc.wast
@@ -8,7 +8,7 @@
;; $B is a subtype of $A, and its field has a more refined type (it is non-
;; nullable).
;; CHECK: (type $B (sub $A (struct (field (ref struct)))))
- (type $B (struct_subtype (field (ref struct)) $A))
+ (type $B (sub $A (struct (field (ref struct)))))
;; CHECK: (func $test (type $3)
;; CHECK-NEXT: (local $single (ref func))
diff --git a/test/lit/passes/signature-pruning.wast b/test/lit/passes/signature-pruning.wast
index eaa05ac46..cf6485f63 100644
--- a/test/lit/passes/signature-pruning.wast
+++ b/test/lit/passes/signature-pruning.wast
@@ -6,7 +6,7 @@
;; CHECK-NEXT: (type $0 (func))
;; CHECK: (type $sig (sub (func (param i32 f64))))
- (type $sig (func_subtype (param i32) (param i64) (param f32) (param f64) func))
+ (type $sig (sub (func (param i32) (param i64) (param f32) (param f64))))
(memory 1 1)
@@ -72,7 +72,7 @@
;; CHECK-NEXT: (type $0 (func))
;; CHECK: (type $sig (sub (func (param i64 f32))))
- (type $sig (func_subtype (param i32) (param i64) (param f32) (param f64) func))
+ (type $sig (sub (func (param i32) (param i64) (param f32) (param f64))))
(memory 1 1)
@@ -137,7 +137,7 @@
;; CHECK-NEXT: (type $0 (func))
;; CHECK: (type $sig (sub (func (param i32 i64 f32))))
- (type $sig (func_subtype (param i32) (param i64) (param f32) (param f64) func))
+ (type $sig (sub (func (param i32) (param i64) (param f32) (param f64))))
(memory 1 1)
@@ -214,7 +214,7 @@
;; CHECK-NEXT: (type $0 (func))
;; CHECK: (type $sig (sub (func (param i32 i64 f32))))
- (type $sig (func_subtype (param i32) (param i64) (param f32) (param f64) func))
+ (type $sig (sub (func (param i32) (param i64) (param f32) (param f64))))
(memory 1 1)
@@ -285,7 +285,7 @@
;; CHECK-NEXT: (type $0 (func))
;; CHECK: (type $sig (sub (func)))
- (type $sig (func_subtype (param i32) (param i64) (param f32) (param f64) func))
+ (type $sig (sub (func (param i32) (param i64) (param f32) (param f64))))
(memory 1 1)
@@ -332,7 +332,7 @@
;; CHECK-NEXT: (type $0 (func))
;; CHECK: (type $sig (sub (func)))
- (type $sig (func_subtype (param i32) func))
+ (type $sig (sub (func (param i32))))
(memory 1 1)
@@ -376,7 +376,7 @@
(module
;; CHECK: (type $sig (sub (func)))
- (type $sig (func_subtype (param i32) func))
+ (type $sig (sub (func (param i32))))
(memory 1 1)
@@ -394,7 +394,7 @@
(module
;; CHECK: (type $sig (sub (func (param i32))))
- (type $sig (func_subtype (param i32) func))
+ (type $sig (sub (func (param i32))))
;; As above, but now an import also uses this signature, which prevents us
;; from changing anything.
@@ -414,7 +414,7 @@
(module
;; CHECK: (type $sig (sub (func (param i32))))
- (type $sig (func_subtype (param i32) func))
+ (type $sig (sub (func (param i32))))
(memory 1 1)
@@ -448,9 +448,9 @@
;; CHECK-NEXT: (type $sig2 (sub (func (param i32))))
;; CHECK: (type $sig (sub (func)))
- (type $sig (func_subtype (param i32) func))
+ (type $sig (sub (func (param i32))))
- (type $sig2 (func_subtype (param i32) func))
+ (type $sig2 (sub (func (param i32))))
)
(memory 1 1)
@@ -485,7 +485,7 @@
;; CHECK-NEXT: (type $0 (func))
;; CHECK: (type $sig (sub (func)))
- (type $sig (func_subtype (param i32) func))
+ (type $sig (sub (func (param i32))))
(memory 1 1)
@@ -559,7 +559,7 @@
(table 1 1 anyref)
;; CHECK: (type $sig (sub (func (param i32))))
- (type $sig (func_subtype (param i32) func))
+ (type $sig (sub (func (param i32))))
;; CHECK: (table $0 1 1 anyref)
@@ -574,7 +574,7 @@
;; them, and also we cannot apply constant parameter values either.
(module
;; CHECK: (type $sig (sub (func (param i32))))
- (type $sig (func_subtype (param i32) func))
+ (type $sig (sub (func (param i32))))
;; CHECK: (type $1 (func))
@@ -616,8 +616,8 @@
;; CHECK-NEXT: (type $sig2 (sub (func)))
;; CHECK: (type $sig1 (sub (func)))
- (type $sig1 (func_subtype (param i32) func))
- (type $sig2 (func_subtype (param f64) func))
+ (type $sig1 (sub (func (param i32))))
+ (type $sig2 (sub (func (param f64))))
)
;; CHECK: (func $foo1 (type $sig1)
@@ -641,8 +641,8 @@
;; CHECK-NEXT: (type $sig-bar (sub (func (param i32))))
;; CHECK: (type $sig-foo (sub (func)))
- (type $sig-foo (func_subtype (param i32) func))
- (type $sig-bar (func_subtype (param i32) func))
+ (type $sig-foo (sub (func (param i32))))
+ (type $sig-bar (sub (func (param i32))))
)
(memory 1 1)
@@ -709,8 +709,8 @@
;; CHECK-NEXT: (type $sig-bar (sub (func (param funcref))))
;; CHECK: (type $sig-foo (sub (func)))
- (type $sig-foo (func_subtype (param funcref) func))
- (type $sig-bar (func_subtype (param funcref) func))
+ (type $sig-foo (sub (func (param funcref))))
+ (type $sig-bar (sub (func (param funcref))))
)
(memory 1 1)
@@ -765,8 +765,8 @@
;; CHECK-NEXT: (type $sig-bar (sub (func (param anyref))))
;; CHECK: (type $sig-foo (sub (func)))
- (type $sig-foo (func_subtype (param anyref) func))
- (type $sig-bar (func_subtype (param anyref) func))
+ (type $sig-foo (sub (func (param anyref))))
+ (type $sig-bar (sub (func (param anyref))))
)
(memory 1 1)
@@ -887,16 +887,16 @@
;; CHECK: (type $array.A (sub (array (ref $struct.A))))
;; CHECK: (type $struct.B (sub $struct.A (struct (field i32) (field i64))))
- (type $struct.B (struct_subtype (field i32) (field i64) $struct.A))
+ (type $struct.B (sub $struct.A (struct (field i32) (field i64))))
(type $array.A (sub (array (ref $struct.A))))
;; CHECK: (type $array.B (sub $array.A (array (ref $struct.B))))
- (type $array.B (array_subtype (ref $struct.B) $array.A))
+ (type $array.B (sub $array.A (array (ref $struct.B))))
;; CHECK: (type $func.A (sub (func (param (ref $array.B)) (result (ref $array.A)))))
(type $func.A (sub (func (param (ref $array.B)) (result (ref $array.A)))))
;; CHECK: (type $func.B (sub $func.A (func (param (ref $array.A)) (result (ref $array.B)))))
- (type $func.B (func_subtype (param (ref $array.A)) (result (ref $array.B)) $func.A))
+ (type $func.B (sub $func.A (func (param (ref $array.A)) (result (ref $array.B)))))
;; CHECK: (func $func.A (type $func.A) (param $0 (ref $array.B)) (result (ref $array.A))
;; CHECK-NEXT: (unreachable)
diff --git a/test/lit/passes/signature-refining.wast b/test/lit/passes/signature-refining.wast
index 6516b4a24..c2a505e51 100644
--- a/test/lit/passes/signature-refining.wast
+++ b/test/lit/passes/signature-refining.wast
@@ -14,7 +14,7 @@
;; CHECK: (type $1 (func))
;; CHECK: (type $sig (sub (func (param (ref $struct)))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
;; CHECK: (func $func (type $sig) (param $x (ref $struct))
;; CHECK-NEXT: (nop)
@@ -44,7 +44,7 @@
;; CHECK: (type $1 (func))
;; CHECK: (type $sig (sub (func (param (ref $struct)))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
;; CHECK: (elem declare func $func)
@@ -80,7 +80,7 @@
;; CHECK: (type $1 (func))
;; CHECK: (type $sig (sub (func (param eqref))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
;; CHECK: (elem declare func $func)
@@ -130,13 +130,13 @@
;; CHECK: (type $3 (func))
;; CHECK: (type $sig (sub (func (param (ref $struct)))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
(type $struct (sub (struct)))
- (type $struct-sub1 (struct_subtype $struct))
+ (type $struct-sub1 (sub $struct (struct)))
- (type $struct-sub2 (struct_subtype $struct))
+ (type $struct-sub2 (sub $struct (struct)))
)
;; CHECK: (func $func-1 (type $sig) (param $x (ref $struct))
@@ -179,7 +179,7 @@
;; CHECK: (type $1 (func))
;; CHECK: (type $sig (sub (func (param (ref $struct)))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
(type $struct (struct))
@@ -217,9 +217,9 @@
;; CHECK: (type $1 (func))
;; CHECK: (type $sig (sub (func (param (ref $struct) (ref $sig)))))
- (type $sig (func_subtype (param anyref funcref) func))
+ (type $sig (sub (func (param anyref funcref))))
- (type $struct (struct_subtype (field (ref $sig)) data))
+ (type $struct (sub (struct (field (ref $sig)))))
;; CHECK: (elem declare func $func)
@@ -283,7 +283,7 @@
;; CHECK: (type $1 (func))
;; CHECK: (type $sig (sub (func (param (ref $struct)))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
;; CHECK: (elem declare func $func)
@@ -320,7 +320,7 @@
(type $struct (struct))
;; CHECK: (type $sig (sub (func (param anyref))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
;; CHECK: (type $1 (func))
@@ -353,7 +353,7 @@
(type $struct (struct))
;; CHECK: (type $sig (sub (func (param anyref))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
;; CHECK: (func $func (type $sig) (param $x anyref)
;; CHECK-NEXT: (nop)
@@ -374,8 +374,8 @@
;; CHECK: (type $sig-2 (sub (func (param eqref (ref $struct)))))
;; CHECK: (type $sig-1 (sub (func (param structref anyref))))
- (type $sig-1 (func_subtype (param anyref) (param anyref) func))
- (type $sig-2 (func_subtype (param anyref) (param anyref) func))
+ (type $sig-1 (sub (func (param anyref) (param anyref))))
+ (type $sig-2 (sub (func (param anyref) (param anyref))))
)
;; CHECK: (elem declare func $func-2)
@@ -443,7 +443,7 @@
;; The presence of a table prevents us from doing any optimizations.
;; CHECK: (type $sig (sub (func (param anyref))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
;; CHECK: (type $1 (func))
@@ -482,7 +482,7 @@
;; CHECK: (type $1 (func))
;; CHECK: (type $sig (sub (func (param (ref null $struct)))))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
(type $struct (struct))
@@ -525,13 +525,13 @@
;; This signature has a single function using it, which returns a more
;; refined type, and we can refine to that.
;; CHECK: (type $sig-can-refine (sub (func (result (ref $struct)))))
- (type $sig-can-refine (func_subtype (result anyref) func))
+ (type $sig-can-refine (sub (func (result anyref))))
;; Also a single function, but no refinement is possible.
- (type $sig-cannot-refine (func_subtype (result (ref func)) func))
+ (type $sig-cannot-refine (sub (func (result (ref func)))))
;; The single function never returns, so no refinement is possible.
- (type $sig-unreachable (func_subtype (result anyref) func))
+ (type $sig-unreachable (sub (func (result anyref))))
)
;; CHECK: (elem declare func $func-can-refine $func-cannot-refine)
@@ -615,7 +615,7 @@
;; This signature has multiple functions using it, and some of them have nulls
;; which should be updated when we refine.
;; CHECK: (type $sig (sub (func (result (ref null $struct)))))
- (type $sig (func_subtype (result anyref) func))
+ (type $sig (sub (func (result anyref))))
;; CHECK: (func $func-1 (type $sig) (result (ref null $struct))
;; CHECK-NEXT: (struct.new_default $struct)
@@ -667,7 +667,7 @@
;; CHECK: (type $struct (struct ))
(type $struct (struct))
- (type $sig (func_subtype (param anyref) func))
+ (type $sig (sub (func (param anyref))))
;; CHECK: (export "prevent-opts" (func $func))
@@ -691,9 +691,9 @@
(module
;; CHECK: (type $A (sub (func (param i32))))
- (type $A (func_subtype (param i32) func))
+ (type $A (sub (func (param i32))))
;; CHECK: (type $B (sub $A (func (param i32))))
- (type $B (func_subtype (param i32) $A))
+ (type $B (sub $A (func (param i32))))
;; CHECK: (func $bar (type $B) (param $x i32)
;; CHECK-NEXT: (nop)
@@ -786,7 +786,7 @@
;; CHECK-NEXT: (type $A (sub (func (param (ref null $B)) (result (ref null $A)))))
(type $A (sub (func (param (ref null $B)) (result (ref null $A)))))
;; CHECK: (type $B (sub $A (func (param (ref null $A)) (result (ref null $B)))))
- (type $B (func_subtype (param (ref null $A)) (result (ref null $B)) $A))
+ (type $B (sub $A (func (param (ref null $A)) (result (ref null $B)))))
)
;; CHECK: (elem declare func $func)
@@ -808,7 +808,7 @@
;; CHECK: (type $parent (sub (func (param anyref))))
(type $parent (sub (func (param anyref))))
;; CHECK: (type $child (sub $parent (func (param anyref))))
- (type $child (func_subtype (param anyref) $parent))
+ (type $child (sub $parent (func (param anyref))))
;; CHECK: (type $2 (func))
diff --git a/test/lit/passes/simplify-locals-gc.wast b/test/lit/passes/simplify-locals-gc.wast
index 1de41e8e8..2c5f56952 100644
--- a/test/lit/passes/simplify-locals-gc.wast
+++ b/test/lit/passes/simplify-locals-gc.wast
@@ -14,11 +14,11 @@
;; CHECK: (type $struct-immutable (struct (field i32)))
(type $struct-immutable (struct (field i32)))
- (type $A (struct_subtype (field (ref null struct)) data))
+ (type $A (sub (struct (field (ref null struct)))))
;; $B is a subtype of $A, and its field has a more refined type (it is non-
;; nullable).
- (type $B (struct_subtype (field (ref struct)) $A))
+ (type $B (sub $A (struct (field (ref struct)))))
;; Writes to heap objects cannot be reordered with reads.
;; CHECK: (func $no-reorder-past-write (type $4) (param $x (ref $struct)) (result i32)
diff --git a/test/lit/passes/simplify-locals-strings.wast b/test/lit/passes/simplify-locals-strings.wast
index d36db96ae..890364a83 100644
--- a/test/lit/passes/simplify-locals-strings.wast
+++ b/test/lit/passes/simplify-locals-strings.wast
@@ -6,9 +6,9 @@
(memory 10 10)
;; CHECK: (type $array (sub (array (mut i8))))
- (type $array (array_subtype (mut i8) data))
+ (type $array (sub (array (mut i8))))
;; CHECK: (type $array16 (sub (array (mut i16))))
- (type $array16 (array_subtype (mut i16) data))
+ (type $array16 (sub (array (mut i16))))
;; CHECK: (func $no-new-past-store (type $1)
;; CHECK-NEXT: (local $temp stringref)
diff --git a/test/lit/passes/type-merging-tnh.wast b/test/lit/passes/type-merging-tnh.wast
index 9df11164f..a82aa87e1 100644
--- a/test/lit/passes/type-merging-tnh.wast
+++ b/test/lit/passes/type-merging-tnh.wast
@@ -6,7 +6,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct )))
(type $A (sub (struct)))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; CHECK: (type $1 (func (param (ref $A)) (result (ref $A))))
@@ -28,7 +28,7 @@
;; CHECK-NEXT: (type $A (sub (struct )))
(type $A (sub (struct)))
;; CHECK: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; CHECK: (type $2 (func (param (ref $A)) (result i32)))
@@ -50,7 +50,7 @@
;; CHECK-NEXT: (type $A (sub (struct )))
(type $A (sub (struct)))
;; CHECK: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; CHECK: (type $2 (func (param (ref $A)) (result (ref $B))))
@@ -95,7 +95,7 @@
(module
;; CHECK: (type $A (sub (func)))
(type $A (sub (func)))
- (type $B (func_subtype $A))
+ (type $B (sub $A (func)))
(table 1 1 (ref null $A))
diff --git a/test/lit/passes/type-merging.wast b/test/lit/passes/type-merging.wast
index 4a68a9213..643e28bd9 100644
--- a/test/lit/passes/type-merging.wast
+++ b/test/lit/passes/type-merging.wast
@@ -5,8 +5,8 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field anyref))))
- (type $A (struct_subtype (field anyref) data))
- (type $B (struct_subtype (field anyref) $A))
+ (type $A (sub (struct (field anyref))))
+ (type $B (sub $A (struct (field anyref))))
;; CHECK: (type $G (sub final $A (struct (field anyref))))
;; CHECK: (type $F (sub $A (struct (field anyref))))
@@ -16,10 +16,10 @@
;; CHECK: (type $D (sub $A (struct (field (ref any)))))
;; CHECK: (type $C (sub $A (struct (field anyref) (field f64))))
- (type $C (struct_subtype (field anyref) (field f64) $A))
- (type $D (struct_subtype (field (ref any)) $A))
- (type $E (struct_subtype (field eqref) $A))
- (type $F (struct_subtype (field anyref) $A))
+ (type $C (sub $A (struct (field anyref) (field f64))))
+ (type $D (sub $A (struct (field (ref any)))))
+ (type $E (sub $A (struct (field eqref))))
+ (type $F (sub $A (struct (field anyref))))
(type $G (sub final $A (struct (field anyref))))
)
@@ -79,14 +79,14 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field i32))))
- (type $A (struct_subtype (field i32) data))
- (type $B (struct_subtype (field i32) $A))
- (type $C (struct_subtype (field i32) $B))
+ (type $A (sub (struct (field i32))))
+ (type $B (sub $A (struct (field i32))))
+ (type $C (sub $B (struct (field i32))))
;; CHECK: (type $D (sub $A (struct (field i32) (field f64))))
- (type $D (struct_subtype (field i32) (field f64) $A))
- (type $E (struct_subtype (field i32) (field f64) $D))
- (type $F (struct_subtype (field i32) (field f64) $E))
- (type $G (struct_subtype (field i32) (field f64) $F))
+ (type $D (sub $A (struct (field i32) (field f64))))
+ (type $E (sub $D (struct (field i32) (field f64))))
+ (type $F (sub $E (struct (field i32) (field f64))))
+ (type $G (sub $F (struct (field i32) (field f64))))
;; CHECK: (type $2 (func))
@@ -123,14 +123,14 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field i32))))
- (type $A (struct_subtype (field i32) data))
- (type $B (struct_subtype (field i32) $A))
- (type $C (struct_subtype (field i32) $B))
+ (type $A (sub (struct (field i32))))
+ (type $B (sub $A (struct (field i32))))
+ (type $C (sub $B (struct (field i32))))
;; CHECK: (type $D (sub $A (struct (field i32) (field f64))))
- (type $D (struct_subtype (field i32) (field f64) $C)) ;; this line changed
- (type $E (struct_subtype (field i32) (field f64) $D))
- (type $F (struct_subtype (field i32) (field f64) $E))
- (type $G (struct_subtype (field i32) (field f64) $F))
+ (type $D (sub $C (struct (field i32) (field f64)))) ;; this line changed
+ (type $E (sub $D (struct (field i32) (field f64))))
+ (type $F (sub $E (struct (field i32) (field f64))))
+ (type $G (sub $F (struct (field i32) (field f64))))
;; CHECK: (type $2 (func))
@@ -159,12 +159,12 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $X (sub (struct )))
(type $X (sub (struct)))
- (type $Y (struct_subtype $X))
+ (type $Y (sub $X (struct)))
;; CHECK: (type $A (sub (struct (field (ref null $X)))))
(type $A (sub (struct (field (ref null $X)))))
- (type $B (struct_subtype (field (ref null $Y)) $A))
+ (type $B (sub $A (struct (field (ref null $Y)))))
;; CHECK: (type $C (sub $A (struct (field (ref $X)))))
- (type $C (struct_subtype (field (ref $Y)) $A))
+ (type $C (sub $A (struct (field (ref $Y)))))
;; CHECK: (type $3 (func))
@@ -188,7 +188,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field (ref null $A)))))
(type $A (sub (struct (ref null $A))))
- (type $B (struct_subtype (ref null $B) $A))
+ (type $B (sub $A (struct (ref null $B))))
;; CHECK: (type $1 (func))
@@ -212,9 +212,9 @@
;; CHECK: (type $A (sub (struct (field (ref null $X)) (field i32))))
(type $A (sub (struct (ref null $X) i32)))
- (type $B (struct_subtype (ref null $Y) i32 $A))
+ (type $B (sub $A (struct (ref null $Y) i32)))
(type $X (sub (struct (ref null $A) f32)))
- (type $Y (struct_subtype (ref null $B) f32 $X))
+ (type $Y (sub $X (struct (ref null $B) f32)))
)
;; CHECK: (type $2 (func))
@@ -241,9 +241,9 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field (ref null $A)))))
(type $A (sub (struct (ref null $X))))
- (type $B (struct_subtype (ref null $Y) $A))
+ (type $B (sub $A (struct (ref null $Y))))
(type $X (sub (struct (ref null $A))))
- (type $Y (struct_subtype (ref null $B) $X))
+ (type $Y (sub $X (struct (ref null $B))))
)
;; CHECK: (type $1 (func))
@@ -329,9 +329,9 @@
;; CHECK: (type $A (sub (struct (field (ref null $X)))))
(type $A (sub (struct (ref null $X))))
- (type $B (struct_subtype (ref null $Y) $A))
+ (type $B (sub $A (struct (ref null $Y))))
(type $X (sub (struct (ref null $A))))
- (type $Y (struct_subtype (ref null $B) $X))
+ (type $Y (sub $X (struct (ref null $B))))
)
;; CHECK: (type $2 (func))
@@ -484,12 +484,12 @@
;; CHECK-NEXT: (type $X (sub (struct (field anyref))))
(type $X (sub (struct anyref)))
;; CHECK: (type $Y (sub $X (struct (field eqref))))
- (type $Y (struct_subtype eqref $X))
+ (type $Y (sub $X (struct eqref)))
;; CHECK: (type $A (sub (struct (field (ref null $X)))))
(type $A (sub (struct (ref null $X))))
;; CHECK: (type $B (sub $A (struct (field (ref null $Y)))))
- (type $B (struct_subtype (ref null $Y) $A))
- (type $C (struct_subtype (ref null $Y) $A))
+ (type $B (sub $A (struct (ref null $Y))))
+ (type $C (sub $A (struct (ref null $Y))))
;; CHECK: (type $4 (func))
@@ -513,9 +513,9 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field anyref))))
(type $A (sub (struct anyref)))
- (type $B (struct_subtype eqref $A))
+ (type $B (sub $A (struct eqref)))
;; CHECK: (type $C (sub $A (struct (field eqref))))
- (type $C (struct_subtype eqref $A))
+ (type $C (sub $A (struct eqref)))
)
;; CHECK: (type $2 (func))
@@ -540,11 +540,11 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field anyref))))
(type $A (sub (struct anyref)))
- (type $B (struct_subtype anyref $A))
- (type $C (struct_subtype anyref $A))
- (type $D (struct_subtype eqref $B))
+ (type $B (sub $A (struct anyref)))
+ (type $C (sub $A (struct anyref)))
+ (type $D (sub $B (struct eqref)))
;; CHECK: (type $E (sub $A (struct (field eqref))))
- (type $E (struct_subtype eqref $C))
+ (type $E (sub $C (struct eqref)))
)
;; CHECK: (type $2 (func))
@@ -582,19 +582,19 @@
;; CHECK: (type $A (sub (struct )))
(type $A (sub (struct)))
- (type $A' (struct_subtype $A))
+ (type $A' (sub $A (struct)))
;; These siblings will be merged only after $a and $a' are merged.
(type $B (sub (struct (ref $A))))
(type $B' (sub (struct (ref $A'))))
;; These will get merged only after $b and $b' are merged.
- (type $C (struct_subtype (ref $A) i32 $B))
- (type $C' (struct_subtype (ref $A') i32 $B'))
+ (type $C (sub $B (struct (ref $A) i32)))
+ (type $C' (sub $B' (struct (ref $A') i32)))
;; These will get merged only after $c and $c' are merged.
- (type $D (struct_subtype (ref $A) i32 i32 $C))
- (type $D' (struct_subtype (ref $A') i32 i32 $C'))
+ (type $D (sub $C (struct (ref $A) i32 i32)))
+ (type $D' (sub $C' (struct (ref $A') i32 i32)))
)
;; CHECK: (type $4 (func))
@@ -627,7 +627,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct )))
(type $A (sub (struct)))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; CHECK: (type $1 (func (result (ref null $A))))
@@ -664,15 +664,15 @@
;; CHECK: (type $I (array (mut (ref null $C))))
(type $I (array (mut (ref null $C))))
(type $C (sub (struct (field (mut i32)))))
- (type $D (struct_subtype (field (mut i32)) (field (mut i32)) $C))
- (type $E (struct_subtype (field (mut i32)) (field (mut i32)) $D))
- (type $F (struct_subtype (field (mut i32)) (field (mut i32)) $E))
- (type $D$to-merge (struct_subtype (field (mut i32)) (field (mut i32)) $F))
+ (type $D (sub $C (struct (field (mut i32)) (field (mut i32)))))
+ (type $E (sub $D (struct (field (mut i32)) (field (mut i32)))))
+ (type $F (sub $E (struct (field (mut i32)) (field (mut i32)))))
+ (type $D$to-merge (sub $F (struct (field (mut i32)) (field (mut i32)))))
;; CHECK: (type $G (func (param (ref $C)) (result (ref $D))))
(type $G (func (param (ref $C)) (result (ref $D))))
- (type $H (struct_subtype (field (mut i32)) (field (mut i32)) (field (mut (ref null $E))) $D))
- (type $A (struct_subtype (field (mut i32)) (field (mut i32)) (field (mut (ref null $E))) (field (mut i64)) (field (mut (ref null $I))) $H))
- (type $A$to-merge (struct_subtype (field (mut i32)) (field (mut i32)) (field (mut (ref null $E))) (field (mut i64)) (field (mut (ref null $I))) $A))
+ (type $H (sub $D (struct (field (mut i32)) (field (mut i32)) (field (mut (ref null $E))))))
+ (type $A (sub $H (struct (field (mut i32)) (field (mut i32)) (field (mut (ref null $E))) (field (mut i64)) (field (mut (ref null $I))))))
+ (type $A$to-merge (sub $A (struct (field (mut i32)) (field (mut i32)) (field (mut (ref null $E))) (field (mut i64)) (field (mut (ref null $I))))))
)
;; CHECK: (global $global$0 (ref $D) (struct.new $D
@@ -712,11 +712,11 @@
;; CHECK: (type $intarray (sub (array (mut i32))))
(type $intarray (sub (array (mut i32))))
- (type $sub-intarray (array_subtype (mut i32) $intarray))
+ (type $sub-intarray (sub $intarray (array (mut i32))))
(type $refarray (sub (array (ref null any))))
- (type $sub-refarray (array_subtype (ref null any) $refarray))
- (type $sub-refarray-nn (array_subtype (ref any) $refarray))
+ (type $sub-refarray (sub $refarray (array (ref null any))))
+ (type $sub-refarray-nn (sub $refarray (array (ref any))))
;; CHECK: (type $3 (func))
@@ -752,9 +752,9 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $func (sub (func (param eqref))))
(type $func (sub (func (param eqref))))
- (type $sub-func (func_subtype (param eqref) $func))
+ (type $sub-func (sub $func (func (param eqref))))
;; CHECK: (type $sub-func-refined (sub $func (func (param anyref))))
- (type $sub-func-refined (func_subtype (param anyref) $func))
+ (type $sub-func-refined (sub $func (func (param anyref))))
;; CHECK: (type $2 (func))
@@ -779,8 +779,8 @@
;; CHECK: (type $A (sub (func)))
(type $A (sub (func))) ;; public
;; CHECK: (type $B (sub $A (func)))
- (type $B (func_subtype $A)) ;; public
- (type $C (func_subtype $B)) ;; private
+ (type $B (sub $A (func))) ;; public
+ (type $C (sub $B (func))) ;; private
;; CHECK: (type $2 (func (param (ref $A) (ref $B) (ref $B))))
@@ -827,7 +827,7 @@
(rec
;; CHECK: (type $A (sub (func (param (ref null $A)) (result (ref null $A)))))
(type $A (sub (func (param (ref null $B)) (result (ref null $A)))))
- (type $B (func_subtype (param (ref null $A)) (result (ref null $B)) $A))
+ (type $B (sub $A (func (param (ref null $A)) (result (ref null $B)))))
)
;; CHECK: (func $0 (type $A) (param $0 (ref null $A)) (result (ref null $A))
@@ -846,7 +846,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct )))
(type $A (sub (struct)))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; CHECK: (type $X (struct (field (ref $A))))
(type $X (struct (ref $B)))
;; CHECK: (type $A' (struct ))
@@ -879,7 +879,7 @@
;; CHECK: (type $x (sub (struct (field anyref))))
(type $x (sub (struct anyref)))
;; CHECK: (type $y (sub $x (struct (field anyref))))
- (type $y (struct_subtype anyref $x))
+ (type $y (sub $x (struct anyref)))
;; If we did vertical and horizontal merges at the same time, these three
;; types would be put into the same initial partition and $b1 would be merged
@@ -888,7 +888,7 @@
;; CHECK: (type $a (struct (field (ref null $y))))
(type $a (struct (ref null $y)))
(type $b (sub (struct (ref null $x))))
- (type $b1 (struct_subtype (ref null $y) $b))
+ (type $b1 (sub $b (struct (ref null $y))))
)
;; CHECK: (type $5 (func (result (ref $b))))
@@ -1033,7 +1033,7 @@
;; CHECK-NEXT: (type $A (sub (struct )))
(type $A (sub (struct)))
;; CHECK: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; CHECK: (type $2 (func (param (ref $A)) (result i32)))
@@ -1055,7 +1055,7 @@
;; CHECK-NEXT: (type $A (sub (struct )))
(type $A (sub (struct)))
;; CHECK: (type $B (sub $A (struct )))
- (type $B (struct_subtype $A))
+ (type $B (sub $A (struct)))
;; CHECK: (type $2 (func (param (ref $A)) (result (ref $B))))
@@ -1102,7 +1102,7 @@
;; CHECK-NEXT: (type $A (sub (func)))
(type $A (sub (func)))
;; CHECK: (type $B (sub $A (func)))
- (type $B (func_subtype $A))
+ (type $B (sub $A (func)))
(table 1 1 (ref null $A))
diff --git a/test/lit/passes/type-refining-isorecursive.wast b/test/lit/passes/type-refining-isorecursive.wast
index ecc9b1f90..537f99e66 100644
--- a/test/lit/passes/type-refining-isorecursive.wast
+++ b/test/lit/passes/type-refining-isorecursive.wast
@@ -10,9 +10,9 @@
;; CHECK: (type $1 (sub (struct (field nullfuncref) (field (ref $2)))))
;; CHECK: (type $0 (sub (struct (field nullref) (field (ref $1)))))
- (type $0 (struct_subtype nullref anyref data))
- (type $1 (struct_subtype nullfuncref anyref data))
- (type $2 (struct_subtype nullexternref anyref data))
+ (type $0 (sub (struct nullref anyref)))
+ (type $1 (sub (struct nullfuncref anyref)))
+ (type $2 (sub (struct nullexternref anyref)))
;; CHECK: (type $3 (func (param (ref $0) (ref $1) (ref $2))))
@@ -71,11 +71,11 @@
;; CHECK: (type $2 (sub $1 (struct (field (ref null $all)) (field (ref $0)))))
;; CHECK: (type $all (sub (struct (field i32) (field (ref $0)) (field (ref $1)) (field (ref $2)))))
- (type $all (struct_subtype i32 anyref anyref anyref data))
+ (type $all (sub (struct i32 anyref anyref anyref)))
- (type $0 (struct_subtype anyref anyref data))
- (type $1 (struct_subtype anyref anyref $0))
- (type $2 (struct_subtype anyref anyref $1))
+ (type $0 (sub (struct anyref anyref)))
+ (type $1 (sub $0 (struct anyref anyref)))
+ (type $2 (sub $1 (struct anyref anyref)))
;; CHECK: (type $4 (func (param (ref $0) (ref $1) (ref $2))))
diff --git a/test/lit/passes/type-refining.wast b/test/lit/passes/type-refining.wast
index e41cd9261..2f550cc37 100644
--- a/test/lit/passes/type-refining.wast
+++ b/test/lit/passes/type-refining.wast
@@ -7,7 +7,7 @@
;; us to specialize that one.
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut anyref)) (field (mut (ref i31))) (field (mut (ref i31))))))
- (type $struct (struct_subtype (field (mut anyref)) (field (mut (ref i31))) (field (mut anyref)) data))
+ (type $struct (sub (struct (field (mut anyref)) (field (mut (ref i31))) (field (mut anyref)))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -56,7 +56,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut i31ref)))))
- (type $struct (struct_subtype (field (mut anyref)) data))
+ (type $struct (sub (struct (field (mut anyref)))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -91,14 +91,14 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref $struct))))))
- (type $struct (struct_subtype (field (mut structref)) data))
+ (type $struct (sub (struct (field (mut structref)))))
;; CHECK: (type $child-B (sub $struct (struct (field (mut (ref $struct))))))
;; CHECK: (type $child-A (sub $struct (struct (field (mut (ref $struct))))))
- (type $child-A (struct_subtype (field (mut structref)) $struct))
+ (type $child-A (sub $struct (struct (field (mut structref)))))
- (type $child-B (struct_subtype (field (mut structref)) $struct))
+ (type $child-B (sub $struct (struct (field (mut structref)))))
)
;; CHECK: (type $3 (func (param (ref $struct) (ref $child-A) (ref $child-B))))
@@ -132,13 +132,13 @@
(rec
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref $child-A))))))
- (type $struct (struct_subtype (field (mut structref)) data))
+ (type $struct (sub (struct (field (mut structref)))))
;; CHECK: (type $child-A (sub $struct (struct (field (mut (ref $child-A))))))
- (type $child-A (struct_subtype (field (mut structref)) $struct))
+ (type $child-A (sub $struct (struct (field (mut structref)))))
;; CHECK: (type $child-B (sub $struct (struct (field (mut (ref $child-A))))))
- (type $child-B (struct_subtype (field (mut structref)) $struct))
+ (type $child-B (sub $struct (struct (field (mut structref)))))
)
;; CHECK: (type $3 (func))
@@ -185,10 +185,10 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref $struct))))))
- (type $struct (struct_subtype (field (mut structref)) data))
+ (type $struct (sub (struct (field (mut structref)))))
;; CHECK: (type $child (sub $struct (struct (field (mut (ref $struct))))))
- (type $child (struct_subtype (field (mut structref)) $struct))
+ (type $child (sub $struct (struct (field (mut structref)))))
;; CHECK: (type $2 (func (param (ref $struct) (ref $child))))
@@ -219,10 +219,10 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref $child))))))
- (type $struct (struct_subtype (field (mut structref)) data))
+ (type $struct (sub (struct (field (mut structref)))))
;; CHECK: (type $child (sub $struct (struct (field (mut (ref $child))))))
- (type $child (struct_subtype (field (mut structref)) $struct))
+ (type $child (sub $struct (struct (field (mut structref)))))
;; CHECK: (type $2 (func (param (ref $struct) (ref $child))))
@@ -256,10 +256,10 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref $struct))))))
- (type $struct (struct_subtype (field (mut structref)) data))
+ (type $struct (sub (struct (field (mut structref)))))
;; CHECK: (type $child (sub $struct (struct (field (mut (ref $struct))))))
- (type $child (struct_subtype (field (mut structref)) $struct))
+ (type $child (sub $struct (struct (field (mut structref)))))
;; CHECK: (type $2 (func (param (ref $struct) (ref $child))))
@@ -301,10 +301,10 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (ref $struct)))))
- (type $struct (struct_subtype (field structref) data))
+ (type $struct (sub (struct (field structref))))
;; CHECK: (type $child (sub $struct (struct (field (ref $child)))))
- (type $child (struct_subtype (field structref) $struct))
+ (type $child (sub $struct (struct (field structref))))
;; CHECK: (type $2 (func (param (ref $struct) (ref $child))))
@@ -341,10 +341,10 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref $struct))))))
- (type $struct (struct_subtype (field (mut structref)) data))
+ (type $struct (sub (struct (field (mut structref)))))
;; CHECK: (type $child (sub $struct (struct (field (mut (ref $struct))))))
- (type $child (struct_subtype (field (mut structref)) $struct))
+ (type $child (sub $struct (struct (field (mut structref)))))
;; CHECK: (type $2 (func (param (ref $struct) (ref $child))))
@@ -381,10 +381,10 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref $struct))))))
- (type $struct (struct_subtype (field (mut structref)) data))
+ (type $struct (sub (struct (field (mut structref)))))
;; CHECK: (type $child (sub $struct (struct (field (mut (ref $struct))) (field (mut (ref $child))))))
- (type $child (struct_subtype (field (mut structref)) (field (mut structref)) $struct))
+ (type $child (sub $struct (struct (field (mut structref)) (field (mut structref)))))
;; CHECK: (type $2 (func (param (ref $struct) (ref $child))))
@@ -422,7 +422,7 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref $struct))))))
- (type $struct (struct_subtype (field (mut structref)) data))
+ (type $struct (sub (struct (field (mut structref)))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -463,14 +463,14 @@
(type $X (sub (struct)))
;; CHECK: (type $Y (sub $X (struct )))
- (type $Y (struct_subtype $X))
+ (type $Y (sub $X (struct)))
- (type $A (struct_subtype (field (ref $X)) data))
+ (type $A (sub (struct (field (ref $X)))))
;; CHECK: (type $C (sub $A (struct (field (ref $Y)))))
- (type $C (struct_subtype (field (ref $X)) $A))
+ (type $C (sub $A (struct (field (ref $X)))))
- (type $B (struct_subtype (field (ref $X)) $A))
+ (type $B (sub $A (struct (field (ref $X)))))
)
;; CHECK: (type $5 (func))
@@ -513,16 +513,16 @@
(type $X (sub (struct)))
;; CHECK: (type $Y (sub $X (struct )))
- (type $Y (struct_subtype $X))
+ (type $Y (sub $X (struct)))
;; CHECK: (type $A (sub (struct (field (ref $X)))))
- (type $A (struct_subtype (field (ref $X)) data))
+ (type $A (sub (struct (field (ref $X)))))
;; CHECK: (type $B (sub $A (struct (field (ref $X)))))
- (type $B (struct_subtype (field (ref $X)) $A))
+ (type $B (sub $A (struct (field (ref $X)))))
;; CHECK: (type $C (sub $A (struct (field (ref $X)))))
- (type $C (struct_subtype (field (ref $X)) $A))
+ (type $C (sub $A (struct (field (ref $X)))))
)
;; CHECK: (type $5 (func))
@@ -550,12 +550,12 @@
;; CHECK: (type $A (sub (struct (field (ref $X)))))
;; CHECK: (type $Y (sub $X (struct )))
- (type $Y (struct_subtype $X))
+ (type $Y (sub $X (struct)))
- (type $A (struct_subtype (field (ref $X)) data))
+ (type $A (sub (struct (field (ref $X)))))
;; CHECK: (type $B (sub $A (struct (field (ref $Y)))))
- (type $B (struct_subtype (field (ref $Y)) $A))
+ (type $B (sub $A (struct (field (ref $Y)))))
;; CHECK: (func $foo (type $1)
;; CHECK-NEXT: (local $unused2 (ref null $B))
@@ -583,7 +583,7 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref null $struct))))))
- (type $struct (struct_subtype (field (mut (ref null struct))) data))
+ (type $struct (sub (struct (field (mut (ref null struct))))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -617,9 +617,9 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref null $struct))))))
- (type $struct (struct_subtype (field (mut (ref null struct))) data))
+ (type $struct (sub (struct (field (mut (ref null struct))))))
;; CHECK: (type $child (sub $struct (struct (field (mut (ref null $struct))))))
- (type $child (struct_subtype (field (mut (ref null struct))) $struct))
+ (type $child (sub $struct (struct (field (mut (ref null struct))))))
;; CHECK: (type $2 (func (param (ref $struct) (ref $child))))
@@ -650,9 +650,9 @@
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref null $struct))))))
- (type $struct (struct_subtype (field (mut (ref null struct))) data))
+ (type $struct (sub (struct (field (mut (ref null struct))))))
;; CHECK: (type $child (sub $struct (struct (field (mut (ref null $struct))))))
- (type $child (struct_subtype (field (mut (ref null struct))) $struct))
+ (type $child (sub $struct (struct (field (mut (ref null struct))))))
;; CHECK: (type $2 (func (param (ref $struct) (ref $child))))
@@ -681,7 +681,7 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut nullref)))))
- (type $struct (struct_subtype (field (mut (ref null struct))) data))
+ (type $struct (sub (struct (field (mut (ref null struct))))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -702,7 +702,7 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref null $struct))))))
- (type $struct (struct_subtype (field (mut (ref null struct))) data))
+ (type $struct (sub (struct (field (mut (ref null struct))))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -731,7 +731,7 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref null $struct))))))
- (type $struct (struct_subtype (field (mut (ref null struct))) data))
+ (type $struct (sub (struct (field (mut (ref null struct))))))
;; CHECK: (type $1 (func (param (ref $struct))))
@@ -764,10 +764,10 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $struct (sub (struct (field (mut (ref null $child))) (field (mut (ref null $struct))))))
- (type $struct (struct_subtype (field (mut (ref null struct))) (field (mut (ref null struct))) data))
+ (type $struct (sub (struct (field (mut (ref null struct))) (field (mut (ref null struct))))))
;; CHECK: (type $child (sub $struct (struct (field (mut (ref null $child))) (field (mut (ref null $struct))))))
- (type $child (struct_subtype (field (mut (ref null struct))) (field (mut (ref null struct))) $struct))
+ (type $child (sub $struct (struct (field (mut (ref null struct))) (field (mut (ref null struct))))))
;; CHECK: (type $2 (func (param (ref $struct) (ref $child))))
@@ -823,7 +823,7 @@
(type $Root-Inner (sub (struct)))
;; CHECK: (type $Leaf1-Inner (sub $Root-Inner (struct (field i32))))
- (type $Leaf1-Inner (struct_subtype (field i32) $Root-Inner))
+ (type $Leaf1-Inner (sub $Root-Inner (struct (field i32))))
;; CHECK: (type $Root-Outer (sub (struct (field (ref $Leaf2-Inner)))))
@@ -832,13 +832,13 @@
;; CHECK: (type $Leaf2-Outer (sub $Root-Outer (struct (field (ref $Leaf2-Inner)))))
;; CHECK: (type $Leaf2-Inner (sub $Root-Inner (struct )))
- (type $Leaf2-Inner (struct_subtype $Root-Inner))
+ (type $Leaf2-Inner (sub $Root-Inner (struct )))
- (type $Root-Outer (struct_subtype (field (ref $Root-Inner)) data))
+ (type $Root-Outer (sub (struct (field (ref $Root-Inner)))))
- (type $Leaf1-Outer (struct_subtype (field (ref $Leaf1-Inner)) $Root-Outer))
+ (type $Leaf1-Outer (sub $Root-Outer (struct (field (ref $Leaf1-Inner)))))
- (type $Leaf2-Outer (struct_subtype (field (ref $Leaf2-Inner)) $Root-Outer))
+ (type $Leaf2-Outer (sub $Root-Outer (struct (field (ref $Leaf2-Inner)))))
;; CHECK: (type $6 (func (param (ref null $Leaf1-Outer))))
@@ -898,7 +898,7 @@
(module
;; CHECK: (type $A (sub (struct (field (mut (ref null $A))))))
- (type $A (struct_subtype (field (mut (ref null $A))) data))
+ (type $A (sub (struct (field (mut (ref null $A))))))
;; CHECK: (type $1 (func (param (ref $A) (ref null $A))))
@@ -962,9 +962,9 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field (ref null $A)))))
- (type $A (struct_subtype (field (ref null $A)) data))
+ (type $A (sub (struct (field (ref null $A)))))
;; CHECK: (type $B (sub $A (struct (field (ref null $B)))))
- (type $B (struct_subtype (field (ref null $A)) $A))
+ (type $B (sub $A (struct (field (ref null $A)))))
;; CHECK: (type $2 (func (param (ref null $B) (ref null $A))))
@@ -1013,7 +1013,7 @@
(module
;; CHECK: (rec
;; CHECK-NEXT: (type $A (sub (struct (field (mut (ref $A))))))
- (type $A (struct_subtype (field (mut (ref null $A))) data))
+ (type $A (sub (struct (field (mut (ref null $A))))))
;; CHECK: (type $1 (func (param (ref $A) (ref null $A))))
diff --git a/test/lit/passes/type-ssa.wast b/test/lit/passes/type-ssa.wast
index ae5b2c532..1c03ecf76 100644
--- a/test/lit/passes/type-ssa.wast
+++ b/test/lit/passes/type-ssa.wast
@@ -5,7 +5,7 @@
;; Every struct.new here should get a new type.
(module
;; CHECK: (type $struct (sub (struct (field i32))))
- (type $struct (struct_subtype (field i32) data))
+ (type $struct (sub (struct (field i32))))
;; CHECK: (type $1 (func))
@@ -136,7 +136,7 @@
;; CHECK: (type $0 (func (param anyref arrayref)))
;; CHECK: (type $struct (sub (struct (field anyref))))
- (type $struct (struct_subtype (field (ref null any)) data))
+ (type $struct (sub (struct (field (ref null any)))))
;; CHECK: (rec
;; CHECK-NEXT: (type $struct$1 (sub $struct (struct (field anyref))))
@@ -423,7 +423,7 @@
(type $array (sub (array (mut f32))))
;; CHECK: (type $subarray (sub $array (array (mut f32))))
- (type $subarray (array_subtype (mut f32) $array))
+ (type $subarray (sub $array (array (mut f32))))
;; CHECK: (type $2 (func (param (ref $subarray))))
diff --git a/test/lit/passes/type-ssa_and_merging.wast b/test/lit/passes/type-ssa_and_merging.wast
index 46129e37f..d1e3a53fa 100644
--- a/test/lit/passes/type-ssa_and_merging.wast
+++ b/test/lit/passes/type-ssa_and_merging.wast
@@ -17,7 +17,7 @@
;; YES-NEXT: (type $1 (func (param (ref $A))))
;; YES: (type $A (sub (struct )))
- (type $A (struct_subtype (field (mut i32)) data))
+ (type $A (sub (struct (field (mut i32)))))
;; NOP: (type $2 (func (result i32)))