blob: a695e826d69a99d3f5305c99ad893932faaec771 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
(module
(type $mixed_results (func (result anyref f32 anyref f32)))
(type $none_=>_none (func))
(type $i32-i32 (func (param i32) (result i32)))
(type $=>eqref (func (result eqref)))
(type $ref|$i32-i32|_=>_i32 (func (param (ref $i32-i32)) (result i32)))
(type $ref?|$i32-i32|_=>_i32 (func (param (ref null $i32-i32)) (result i32)))
(type $none_=>_i32 (func (result i32)))
(type $f64_=>_ref_null<_->_eqref> (func (param f64) (result (ref null $=>eqref))))
(type $=>anyref (func (result anyref)))
(type $none_=>_i32_ref?|$mixed_results|_f64 (func (result i32 (ref null $mixed_results) f64)))
(type $ref?|$mixed_results|_=>_none (func (param (ref null $mixed_results))))
(elem declare func $call-ref $call-ref-more)
(func $call-ref
(call_ref
(ref.func $call-ref)
)
)
(func $return-call-ref
(return_call_ref
(ref.func $call-ref)
)
)
(func $call-ref-more (param $0 i32) (result i32)
(call_ref
(i32.const 42)
(ref.func $call-ref-more)
)
)
(func $call_from-param (param $f (ref $i32-i32)) (result i32)
(call_ref
(i32.const 42)
(local.get $f)
)
)
(func $call_from-param-null (param $f (ref null $i32-i32)) (result i32)
(call_ref
(i32.const 42)
(local.get $f)
)
)
(func $call_from-local-null (result i32)
(local $f (ref null $i32-i32))
(local.set $f
(ref.func $call-ref-more)
)
(call_ref
(i32.const 42)
(local.get $f)
)
)
(func $ref-in-sig (param $0 f64) (result (ref null $=>eqref))
(ref.null $=>eqref)
)
(func $type-only-in-tuple-local
(local $x (i32 (ref null $=>anyref) f64))
(nop)
)
(func $type-only-in-tuple-block
(drop
(block $block (result i32 (ref null $mixed_results) f64)
(unreachable)
)
)
)
(func $ref-types-first
(local $r1 (ref null $mixed_results))
(local $r2 (ref null $mixed_results))
(local $i1 i32)
(local $r3 anyref)
(local $i2 i64)
(local $r4 anyref)
(local $i3 i64)
(local $r5 anyref)
(local $r6 funcref)
(nop)
)
(func $mvp-types-first
(local $i1 i32)
(local $r1 (ref null $mixed_results))
(local $r2 (ref null $mixed_results))
(local $r3 anyref)
(local $i2 i64)
(local $r4 anyref)
(local $i3 i64)
(local $r5 anyref)
(local $r6 funcref)
(nop)
)
(func $mvp-types-first-param (param $r0 (ref null $mixed_results))
(local $i1 i32)
(local $r1 (ref null $mixed_results))
(local $r2 (ref null $mixed_results))
(local $r3 anyref)
(local $i2 i64)
(local $r4 anyref)
(local $i3 i64)
(local $r5 anyref)
(local $r6 funcref)
(nop)
)
)
|