Debian Codegraph @

tests/snapshots/testsuite/ref_func.wast/2.print

raw
1 (module
2 (type (;0;) (func (param i32) (result i32)))
3 (type (;1;) (func))
4 (type (;2;) (func (result i32)))
5 (import "M" "f" (func $f (;0;) (type 0)))
6 (table $t (;0;) 1 funcref)
7 (global (;0;) funcref ref.func $f)
8 (global (;1;) funcref ref.func $g)
9 (global $v (;2;) (mut funcref) ref.func $f)
10 (global (;3;) funcref ref.func $gf1)
11 (global (;4;) funcref ref.func $gf2)
12 (export "is_null-f" (func 7))
13 (export "is_null-g" (func 8))
14 (export "is_null-v" (func 9))
15 (export "set-f" (func 10))
16 (export "set-g" (func 11))
17 (export "call-f" (func 12))
18 (export "call-g" (func 13))
19 (export "call-v" (func 14))
20 (elem (;0;) declare func $gf1 $ff1)
21 (elem (;1;) declare funcref (ref.func $gf2) (ref.func $ff2))
22 (elem (;2;) declare func $f $g)
23 (func $g (;1;) (type 0) (param $x i32) (result i32)
24 local.get $x
25 i32.const 1
26 i32.add
27 )
28 (func (;2;) (type 1)
29 ref.func $ff1
30 drop
31 ref.func $ff2
32 drop
33 )
34 (func $gf1 (;3;) (type 1))
35 (func $gf2 (;4;) (type 1))
36 (func $ff1 (;5;) (type 1))
37 (func $ff2 (;6;) (type 1))
38 (func (;7;) (type 2) (result i32)
39 ref.func $f
40 ref.is_null
41 )
42 (func (;8;) (type 2) (result i32)
43 ref.func $g
44 ref.is_null
45 )
46 (func (;9;) (type 2) (result i32)
47 global.get $v
48 ref.is_null
49 )
50 (func (;10;) (type 1)
51 ref.func $f
52 global.set $v
53 )
54 (func (;11;) (type 1)
55 ref.func $g
56 global.set $v
57 )
58 (func (;12;) (type 0) (param $x i32) (result i32)
59 i32.const 0
60 ref.func $f
61 table.set $t
62 local.get $x
63 i32.const 0
64 call_indirect (type 0)
65 )
66 (func (;13;) (type 0) (param $x i32) (result i32)
67 i32.const 0
68 ref.func $g
69 table.set $t
70 local.get $x
71 i32.const 0
72 call_indirect (type 0)
73 )
74 (func (;14;) (type 0) (param $x i32) (result i32)
75 i32.const 0
76 global.get $v
77 table.set $t
78 local.get $x
79 i32.const 0
80 call_indirect (type 0)
81 )
82 )