blob: c2fcb0e3d94416e2e59d9a2c678c54f049ec8165 (
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
|
(module
(type $struct-rec-two (struct (field (ref null $struct-rec-two)) (field (ref null $struct-rec-two))))
(type $struct-i31 (struct (field (ref null i31))))
(type $struct-rec-one (struct (field (ref null $struct-rec-one))))
(type $vector-i32 (array i32))
(type $ref?|$struct-i31|_ref?|$struct-any|_=>_none (func (param (ref null $struct-i31) (ref null $struct-any))))
(type $ref?|$struct-i31|_ref?|$struct-i31_any|_=>_none (func (param (ref null $struct-i31) (ref null $struct-i31_any))))
(type $ref?|$struct-rec-one|_ref?|$struct-rec-two|_=>_none (func (param (ref null $struct-rec-one) (ref null $struct-rec-two))))
(type $ref?|$vector-i32|_ref?|$vector-i32|_=>_none (func (param (ref null $vector-i32) (ref null $vector-i32))))
(type $ref?|$vector-i31|_ref?|$vector-any|_=>_none (func (param (ref null $vector-i31) (ref null $vector-any))))
(type $struct-any (struct (field anyref)))
(type $struct-i31_any (struct (field (ref null i31)) (field anyref)))
(type $vector-any (array anyref))
(type $vector-i31 (array (ref null i31)))
(func $foo (param $no-null (ref null $vector-i32)) (param $yes-null (ref null $vector-i32))
(local.set $no-null
(local.get $yes-null)
)
)
(func $bar (param $v-i31 (ref null $vector-i31)) (param $v-any (ref null $vector-any))
(local.set $v-any
(local.get $v-i31)
)
)
(func $baz (param $s-i31 (ref null $struct-i31)) (param $s-any (ref null $struct-any))
(local.set $s-any
(local.get $s-i31)
)
)
(func $boo (param $s-i31 (ref null $struct-i31)) (param $s-i31_any (ref null $struct-i31_any))
(local.set $s-i31
(local.get $s-i31_any)
)
)
(func $coinductive (param $rec-one (ref null $struct-rec-one)) (param $rec-two (ref null $struct-rec-two))
(local.set $rec-one
(local.get $rec-two)
)
)
)
|