Debian Codegraph @

tests/snapshots/testsuite/proposals/wasm-3.0/br_on_cast_fail.wast/0.print

raw
1 (module
2 (type $ft (;0;) (func (result i32)))
3 (type $st (;1;) (struct (field i16)))
4 (type $at (;2;) (array i8))
5 (type (;3;) (func (param externref)))
6 (type (;4;) (func (param i32) (result i32)))
7 (type (;5;) (func (param structref) (result (ref $st))))
8 (type (;6;) (func (param structref) (result (ref $at))))
9 (table (;0;) 10 anyref)
10 (export "init" (func 1))
11 (export "br_on_non_null" (func 2))
12 (export "br_on_non_i31" (func 3))
13 (export "br_on_non_struct" (func 4))
14 (export "br_on_non_array" (func 5))
15 (export "null-diff" (func 6))
16 (elem (;0;) declare func $f)
17 (func $f (;0;) (type $ft) (result i32)
18 i32.const 9
19 )
20 (func (;1;) (type 3) (param $x externref)
21 i32.const 0
22 ref.null any
23 table.set 0
24 i32.const 1
25 i32.const 7
26 ref.i31
27 table.set 0
28 i32.const 2
29 i32.const 6
30 struct.new $st
31 table.set 0
32 i32.const 3
33 i32.const 5
34 i32.const 3
35 array.new $at
36 table.set 0
37 i32.const 4
38 local.get $x
39 any.convert_extern
40 table.set 0
41 )
42 (func (;2;) (type 4) (param $i i32) (result i32)
43 block $l (result (ref any))
44 local.get $i
45 table.get 0
46 br_on_non_null $l
47 i32.const 0
48 return
49 end
50 i32.const -1
51 return
52 )
53 (func (;3;) (type 4) (param $i i32) (result i32)
54 block $l (result anyref)
55 local.get $i
56 table.get 0
57 br_on_cast_fail $l anyref (ref i31)
58 i31.get_u
59 return
60 end
61 i32.const -1
62 return
63 )
64 (func (;4;) (type 4) (param $i i32) (result i32)
65 block $l (result anyref)
66 local.get $i
67 table.get 0
68 br_on_cast_fail $l anyref (ref struct)
69 block $l2 (type 5) (param structref) (result (ref $st))
70 block $l3 (type 6) (param structref) (result (ref $at))
71 br_on_cast $l2 structref (ref $st)
72 br_on_cast $l3 anyref (ref $at)
73 i32.const -2
74 return
75 end
76 i32.const 0
77 array.get_u $at
78 return
79 end
80 struct.get_s $st 0
81 return
82 end
83 i32.const -1
84 return
85 )
86 (func (;5;) (type 4) (param $i i32) (result i32)
87 block $l (result anyref)
88 local.get $i
89 table.get 0
90 br_on_cast_fail $l anyref (ref array)
91 array.len
92 return
93 end
94 i32.const -1
95 return
96 )
97 (func (;6;) (type 4) (param $i i32) (result i32)
98 block $l (result (ref any))
99 block (result structref) ;; label = @2
100 local.get $i
101 table.get 0
102 br_on_cast_fail $l anyref structref
103 end
104 i32.const 1
105 return
106 end
107 i32.const 0
108 return
109 )
110 )