diff options
Diffstat (limited to 'test/heap-types.wast.fromBinary')
-rw-r--r-- | test/heap-types.wast.fromBinary | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/test/heap-types.wast.fromBinary b/test/heap-types.wast.fromBinary index 74c47eddf..a9bff28f3 100644 --- a/test/heap-types.wast.fromBinary +++ b/test/heap-types.wast.fromBinary @@ -1,23 +1,25 @@ (module (type $struct.A (struct (field i32) (field f32) (field $named f64))) + (type $vector (array (mut f64))) (type $none_=>_none (func)) (type $struct.B (struct (field i8) (field (mut i16)) (field (ref $struct.A)) (field (mut (ref $struct.A))))) - (type $vector (array (mut f64))) (type $grandchild (struct (field i32) (field i64))) (type $matrix (array (mut (ref null $vector)))) (type $struct.C (struct (field $named-mut (mut f32)))) (type $parent (struct )) (type $child (struct (field i32))) + (type $bytes (array (mut i8))) (type $anyref_=>_none (func (param anyref))) (type $nested-child-struct (struct (field (mut (ref $child))))) (type $ref|$struct.A|_=>_ref|$struct.B| (func (param (ref $struct.A)) (result (ref $struct.B)))) (type $ref|$vector|_=>_ref|$matrix| (func (param (ref $vector)) (result (ref $matrix)))) - (type $bytes (array (mut i8))) (type $words (array (mut i32))) (type $nested-child-array (array (mut (ref $child)))) (type $rtt_1_$parent_=>_none (func (param (rtt 1 $parent)))) (type $rtt_$parent_=>_none (func (param (rtt $parent)))) (type $ref|$vector|_ref?|$vector|_=>_none (func (param (ref $vector) (ref null $vector)))) + (type $none_=>_ref|$vector| (func (result (ref $vector)))) + (type $none_=>_ref|$bytes| (func (result (ref $bytes)))) (global $rttparent (rtt 0 $parent) (rtt.canon $parent)) (global $rttchild (rtt 1 $child) (rtt.sub $child (global.get $rttparent) @@ -423,5 +425,22 @@ (i32.const 1337) ) ) + (func $array-init (result (ref $vector)) + (array.init $vector + (f64.const 1) + (f64.const 2) + (f64.const 4) + (f64.const 8) + (rtt.canon $vector) + ) + ) + (func $array-init-packed (result (ref $bytes)) + (array.init $bytes + (i32.const 4) + (i32.const 2) + (i32.const 1) + (rtt.canon $bytes) + ) + ) ) |