diff options
Diffstat (limited to 'test/heap-types.wast.fromBinary')
-rw-r--r-- | test/heap-types.wast.fromBinary | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/test/heap-types.wast.fromBinary b/test/heap-types.wast.fromBinary index f16e07c7f..fd2dbeed6 100644 --- a/test/heap-types.wast.fromBinary +++ b/test/heap-types.wast.fromBinary @@ -6,13 +6,14 @@ (type $matrix (array (mut (ref null $vector)))) (type $bytes (array (mut i8))) (type $struct.C (struct (field $named-mut (mut f32)))) - (type $grandchild (struct (field i32) (field i64))) + (type $parent (struct )) + (type $child (struct_subtype (field i32) $parent)) + (type $grandchild (struct_subtype (field i32) (field i64) $child)) (type $anyref_=>_none (func (param anyref))) (type $ref?|$vector|_=>_none (func (param (ref null $vector)))) (type $nested-child-struct (struct (field (mut (ref $child))))) (type $words (array (mut i32))) (type $nested-child-array (array (mut (ref $child)))) - (type $child (struct (field i32))) (type $ref|$struct.A|_ref?|$struct.A|_ref?|$grandchild|_ref?|$struct.C|_ref?|$nested-child-struct|_=>_ref|$struct.B| (func (param (ref $struct.A) (ref null $struct.A) (ref null $grandchild) (ref null $struct.C) (ref null $nested-child-struct)) (result (ref $struct.B)))) (type $ref|$vector|_ref?|$nested-child-array|_ref?|$grandchild|_=>_ref|$matrix| (func (param (ref $vector) (ref null $nested-child-array) (ref null $grandchild)) (result (ref $matrix)))) (type $ref?|$struct.C|_=>_none (func (param (ref null $struct.C)))) @@ -20,7 +21,7 @@ (type $none_=>_ref|$vector| (func (result (ref $vector)))) (type $none_=>_ref|$bytes| (func (result (ref $bytes)))) (global $struct.new-in-global (ref $struct.A) (struct.new_default $struct.A)) - (func $structs (param $x (ref $struct.A)) (param $struct.A.prime (ref null $struct.A)) (param $grandchild (ref null $grandchild)) (param $struct.C (ref null $struct.C)) (param $nested-child-struct (ref null $nested-child-struct)) (result (ref $struct.B)) + (func $structs (type $ref|$struct.A|_ref?|$struct.A|_ref?|$grandchild|_ref?|$struct.C|_ref?|$nested-child-struct|_=>_ref|$struct.B|) (param $x (ref $struct.A)) (param $struct.A.prime (ref null $struct.A)) (param $grandchild (ref null $grandchild)) (param $struct.C (ref null $struct.C)) (param $nested-child-struct (ref null $nested-child-struct)) (result (ref $struct.B)) (local $tA (ref null $struct.A)) (local $tB (ref null $struct.B)) (local $tc (ref null $struct.C)) @@ -113,7 +114,7 @@ ) (unreachable) ) - (func $arrays (param $x (ref $vector)) (param $nested-child-array (ref null $nested-child-array)) (param $grandchild (ref null $grandchild)) (result (ref $matrix)) + (func $arrays (type $ref|$vector|_ref?|$nested-child-array|_ref?|$grandchild|_=>_ref|$matrix|) (param $x (ref $vector)) (param $nested-child-array (ref null $nested-child-array)) (param $grandchild (ref null $grandchild)) (result (ref $matrix)) (local $tv (ref null $vector)) (local $tm (ref null $matrix)) (local $tb (ref null $bytes)) @@ -172,7 +173,7 @@ ) (unreachable) ) - (func $ref.is_X (param $x anyref) + (func $ref.is_X (type $anyref_=>_none) (param $x anyref) (if (ref.is_func (local.get $x) @@ -192,7 +193,7 @@ (unreachable) ) ) - (func $ref.as_X (param $x anyref) + (func $ref.as_X (type $anyref_=>_none) (param $x anyref) (drop (ref.as_non_null (local.get $x) @@ -214,7 +215,7 @@ ) ) ) - (func $br_on_X (param $x anyref) + (func $br_on_X (type $anyref_=>_none) (param $x anyref) (local $y anyref) (local $z anyref) (local $temp-func funcref) @@ -296,40 +297,40 @@ ) ) ) - (func $unreachables-1 + (func $unreachables-1 (type $none_=>_none) (unreachable) ) - (func $unreachables-2 (param $struct.C (ref null $struct.C)) + (func $unreachables-2 (type $ref?|$struct.C|_=>_none) (param $struct.C (ref null $struct.C)) (drop (local.get $struct.C) ) (unreachable) ) - (func $unreachables-3 + (func $unreachables-3 (type $none_=>_none) (unreachable) ) - (func $unreachables-4 + (func $unreachables-4 (type $none_=>_none) (unreachable) ) - (func $unreachables-array-1 + (func $unreachables-array-1 (type $none_=>_none) (unreachable) ) - (func $unreachables-array-2 (param $vector (ref null $vector)) + (func $unreachables-array-2 (type $ref?|$vector|_=>_none) (param $vector (ref null $vector)) (drop (local.get $vector) ) (unreachable) ) - (func $unreachables-array-3 + (func $unreachables-array-3 (type $none_=>_none) (unreachable) ) - (func $unreachables-array-4 (param $vector (ref null $vector)) + (func $unreachables-array-4 (type $ref?|$vector|_=>_none) (param $vector (ref null $vector)) (drop (local.get $vector) ) (unreachable) ) - (func $unreachables-array-5 (param $vector (ref null $vector)) + (func $unreachables-array-5 (type $ref?|$vector|_=>_none) (param $vector (ref null $vector)) (drop (local.get $vector) ) @@ -338,10 +339,10 @@ ) (unreachable) ) - (func $unreachables-array-6 + (func $unreachables-array-6 (type $none_=>_none) (unreachable) ) - (func $array-copy (param $x (ref $vector)) (param $y (ref null $vector)) + (func $array-copy (type $ref|$vector|_ref?|$vector|_=>_none) (param $x (ref $vector)) (param $y (ref null $vector)) (array.copy $vector $vector (local.get $x) (i32.const 11) @@ -350,7 +351,7 @@ (i32.const 1337) ) ) - (func $array-init (result (ref $vector)) + (func $array-init (type $none_=>_ref|$vector|) (result (ref $vector)) (array.init_static $vector (f64.const 1) (f64.const 2) @@ -358,14 +359,14 @@ (f64.const 8) ) ) - (func $array-init-packed (result (ref $bytes)) + (func $array-init-packed (type $none_=>_ref|$bytes|) (result (ref $bytes)) (array.init_static $bytes (i32.const 4) (i32.const 2) (i32.const 1) ) ) - (func $static-operations + (func $static-operations (type $none_=>_none) (local $temp.A (ref null $struct.A)) (local $temp.B (ref null $struct.B)) (drop |