Debian Codegraph @

tests/cli/gc/gc-struct-names.wast

raw
1 ;; RUN: wast --assert default --snapshot tests/snapshots %
2
3 ;; --enable-gc
4
5 (module
6 (type $named (struct (field $x i32) (field $y i32)))
7 (type $partially_named (struct (field $x i32) (field i32)))
8 (type $unnamed (struct (field i32) (field i32)))
9
10 (func (param (ref $named) (ref $partially_named) (ref $unnamed))
11 i32.const 1
12 i32.const 2
13 struct.new $named
14 local.tee 0
15 struct.get $named 0
16 local.get 0
17 struct.get $named 1
18 drop
19 drop
20
21 i32.const 1
22 i32.const 2
23 struct.new $partially_named
24 local.tee 1
25 struct.get $partially_named 0
26 local.get 1
27 struct.get $partially_named 1
28 drop
29 drop
30
31 i32.const 1
32 i32.const 2
33 struct.new $unnamed
34 local.tee 2
35 struct.get $unnamed 0
36 local.get 2
37 struct.get $unnamed 1
38 drop
39 drop
40 )
41 )