| 1 |
;; RUN: wast --assert default --snapshot tests/snapshots % |
| 2 |
|
| 3 |
;; --enable-gc |
| 4 |
|
| 5 |
(module |
| 6 |
(type (struct)) |
| 7 |
(type (struct (field i32))) |
| 8 |
(type (struct (field (mut i32)))) |
| 9 |
(type (struct (field i32) (field i32))) |
| 10 |
(type (struct (field i32) (field (mut i32)))) |
| 11 |
(type (struct (field (mut i32)) (field (mut i32)))) |
| 12 |
|
| 13 |
(type $a (struct (field $field_a f32))) |
| 14 |
(type $b (struct (field $field_b (mut f32)))) |
| 15 |
|
| 16 |
(type (struct (field $field_a externref))) |
| 17 |
(type (struct (field $field_b externref) (field $field_c funcref))) |
| 18 |
|
| 19 |
(func (param (ref $a) (ref $b)) |
| 20 |
f32.const 1.0 |
| 21 |
struct.new $a |
| 22 |
drop |
| 23 |
|
| 24 |
struct.new_default $a |
| 25 |
drop |
| 26 |
|
| 27 |
local.get 0 |
| 28 |
struct.get $a $field_a |
| 29 |
drop |
| 30 |
|
| 31 |
local.get 1 |
| 32 |
f32.const 1.0 |
| 33 |
struct.set $b $field_b |
| 34 |
) |
| 35 |
) |