Debian Codegraph @

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

raw
1 (module
2 (type $t (;0;) (func))
3 (type (;1;) (func (param funcref) (result i32)))
4 (type (;2;) (func (param externref) (result i32)))
5 (type (;3;) (func (param (ref null $t)) (result i32)))
6 (type (;4;) (func (result i32)))
7 (type (;5;) (func (param externref)))
8 (type (;6;) (func (param i32) (result i32)))
9 (table $t1 (;0;) 2 funcref)
10 (table $t2 (;1;) 2 externref)
11 (table $t3 (;2;) 2 (ref null $t))
12 (export "funcref" (func $f1))
13 (export "externref" (func $f2))
14 (export "ref-null" (func $f3'))
15 (export "init" (func 5))
16 (export "deinit" (func 6))
17 (export "funcref-elem" (func 7))
18 (export "externref-elem" (func 8))
19 (export "ref-elem" (func 9))
20 (elem (;0;) (table $t1) (i32.const 1) func $dummy)
21 (elem (;1;) (table $t3) (i32.const 1) (ref $t) (ref.func $dummy))
22 (func $dummy (;0;) (type $t))
23 (func $f1 (;1;) (type 1) (param $x funcref) (result i32)
24 local.get $x
25 ref.is_null
26 )
27 (func $f2 (;2;) (type 2) (param $x externref) (result i32)
28 local.get $x
29 ref.is_null
30 )
31 (func $f3 (;3;) (type 3) (param $x (ref null $t)) (result i32)
32 local.get $x
33 ref.is_null
34 )
35 (func $f3' (;4;) (type 4) (result i32)
36 ref.null $t
37 call $f3
38 )
39 (func (;5;) (type 5) (param $r externref)
40 i32.const 1
41 local.get $r
42 table.set $t2
43 )
44 (func (;6;) (type $t)
45 i32.const 1
46 ref.null func
47 table.set $t1
48 i32.const 1
49 ref.null extern
50 table.set $t2
51 i32.const 1
52 ref.null $t
53 table.set $t3
54 )
55 (func (;7;) (type 6) (param $x i32) (result i32)
56 local.get $x
57 table.get $t1
58 call $f1
59 )
60 (func (;8;) (type 6) (param $x i32) (result i32)
61 local.get $x
62 table.get $t2
63 call $f2
64 )
65 (func (;9;) (type 6) (param $x i32) (result i32)
66 local.get $x
67 table.get $t3
68 call $f3
69 )
70 )