Debian Codegraph @

tests/snapshots/cli/component-model/resources.wast/43.print

raw
1 (component
2 (component $C1 (;0;)
3 (type $X (;0;) (resource (rep i32)))
4 (export $X1 (;1;) "X1" (type $X))
5 (export $X2 (;2;) "X2" (type $X))
6 (core func $f (;0;) (canon resource.drop $X))
7 (type (;3;) (own $X1))
8 (type (;4;) (func (param "X" 3)))
9 (func (;0;) (type 4) (canon lift (core func $f)))
10 (type (;5;) (own $X2))
11 (type (;6;) (func (param "X" 5)))
12 (func (;1;) (type 6) (canon lift (core func $f)))
13 (export (;2;) "f1" (func 0))
14 (export (;3;) "f2" (func 1))
15 )
16 (instance $c1 (;0;) (instantiate $C1))
17 (component $C2 (;1;)
18 (import "X" (type $X (;0;) (sub resource)))
19 (type (;1;) (own $X))
20 (type (;2;) (func (param "X" 1)))
21 (import "f" (func (;0;) (type 2)))
22 )
23 (alias export $c1 "X1" (type (;0;)))
24 (alias export $c1 "f2" (func (;0;)))
25 (instance $c2 (;1;) (instantiate $C2
26 (with "X" (type 0))
27 (with "f" (func 0))
28 )
29 )
30 (alias export $c1 "X2" (type (;1;)))
31 (alias export $c1 "f1" (func (;1;)))
32 (instance $c3 (;2;) (instantiate $C2
33 (with "X" (type 1))
34 (with "f" (func 1))
35 )
36 )
37 )