Debian Codegraph @

tests/snapshots/cli/component-model/virtualize.wast/0.print

raw
1 (component
2 (core module $libc (;0;)
3 (type (;0;) (func (param i32 i32 i32 i32) (result i32)))
4 (memory (;0;) 0)
5 (export "mem" (memory 0))
6 (export "realloc" (func 0))
7 (func (;0;) (type 0) (param i32 i32 i32 i32) (result i32)
8 unreachable
9 )
10 )
11 (core instance $libc (;0;) (instantiate $libc))
12 (component $child (;0;)
13 (type (;0;)
14 (instance
15 (type (;0;) (list u8))
16 (type (;1;) (func (param "count" u32) (result 0)))
17 (export (;0;) "read" (func (type 1)))
18 (type (;2;) (list u8))
19 (type (;3;) (func (param "bytes" 2) (result u32)))
20 (export (;1;) "write" (func (type 3)))
21 )
22 )
23 (import "wasi-file" (instance $wasi-file (;0;) (type 0)))
24 (alias outer 1 $libc (core module $libc (;0;)))
25 (core instance $libc (;0;) (instantiate $libc))
26 (core module $m (;1;)
27 (type (;0;) (func (param i32 i32)))
28 (type (;1;) (func))
29 (import "wasi-file" "read" (func $read (;0;) (type 0)))
30 (export "play" (func $play))
31 (func $play (;1;) (type 1)
32 unreachable
33 )
34 )
35 (alias export $wasi-file "read" (func (;0;)))
36 (alias core export $libc "mem" (core memory (;0;)))
37 (alias core export $libc "realloc" (core func (;0;)))
38 (core func $wasi_file_read (;1;) (canon lower (func 0) (memory 0) (realloc 0)))
39 (core instance (;1;)
40 (export "read" (func $wasi_file_read))
41 )
42 (core instance $i (;2;) (instantiate $m
43 (with "wasi-file" (instance 1))
44 )
45 )
46 (type (;1;) (func))
47 (alias core export $i "play" (core func (;2;)))
48 (func (;1;) (type 1) (canon lift (core func 2)))
49 (export (;2;) "play" (func 1))
50 )
51 (component $virtualize (;1;)
52 (type (;0;)
53 (instance
54 (type (;0;) (list u8))
55 (type (;1;) (func (param "len" u32) (result 0)))
56 (export (;0;) "read" (func (type 1)))
57 (type (;2;) (list u8))
58 (type (;3;) (func (param "buf" 2) (result u32)))
59 (export (;1;) "write" (func (type 3)))
60 )
61 )
62 (import "wasi-file" (instance $wasi-file (;0;) (type 0)))
63 (alias export $wasi-file "read" (func (;0;)))
64 (export (;1;) "read" (func 0))
65 (alias export $wasi-file "write" (func (;2;)))
66 (export (;3;) "write" (func 2))
67 )
68 (component (;2;)
69 (type $WasiFile (;0;)
70 (instance
71 (type (;0;) (list u8))
72 (type (;1;) (func (param "len" u32) (result 0)))
73 (export (;0;) "read" (func (type 1)))
74 (type (;2;) (list u8))
75 (type (;3;) (func (param "buf" 2) (result u32)))
76 (export (;1;) "write" (func (type 3)))
77 )
78 )
79 (import "wasi-file" (instance $real-wasi (;0;) (type $WasiFile)))
80 (type (;1;)
81 (component
82 (alias outer 1 $WasiFile (type (;0;)))
83 (import "wasi-file" (instance (;0;) (type 0)))
84 (type (;1;) (list u8))
85 (type (;2;) (func (param "len" u32) (result 1)))
86 (export (;0;) "read" (func (type 2)))
87 (type (;3;) (list u8))
88 (type (;4;) (func (param "buf" 3) (result u32)))
89 (export (;1;) "write" (func (type 4)))
90 )
91 )
92 (import "virtualize" (component $VIRTUALIZE (;0;) (type 1)))
93 (type (;2;)
94 (component
95 (alias outer 1 $WasiFile (type (;0;)))
96 (import "wasi-file" (instance (;0;) (type 0)))
97 (type (;1;) (func))
98 (export (;0;) "play" (func (type 1)))
99 )
100 )
101 (import "child" (component $CHILD (;1;) (type 2)))
102 (instance $virt-wasi (;1;) (instantiate $VIRTUALIZE
103 (with "wasi-file" (instance $real-wasi))
104 )
105 )
106 (instance $child (;2;) (instantiate $CHILD
107 (with "wasi-file" (instance $virt-wasi))
108 )
109 )
110 (alias export $child "play" (func (;0;)))
111 (export (;1;) "work" (func 0))
112 )
113 (component (;3;)
114 (type $WasiFile (;0;)
115 (instance
116 (type (;0;) (list u8))
117 (type (;1;) (func (param "len" u32) (result 0)))
118 (export (;0;) "read" (func (type 1)))
119 (type (;2;) (list u8))
120 (type (;3;) (func (param "buf" 2) (result u32)))
121 (export (;1;) "write" (func (type 3)))
122 )
123 )
124 (import "wasi-file" (instance $real-wasi (;0;) (type $WasiFile)))
125 (alias outer 1 $libc (core module $libc (;0;)))
126 (core instance $libc (;0;) (instantiate $libc))
127 (core module $CHILD (;1;)
128 (type (;0;) (func (param i32 i32)))
129 (type (;1;) (func))
130 (import "wasi-file" "read" (func $wasi-file (;0;) (type 0)))
131 (export "play" (func $play))
132 (func $play (;1;) (type 1)
133 unreachable
134 )
135 )
136 (core module $VIRTUALIZE (;2;)
137 (type (;0;) (func (param i32 i32)))
138 (type (;1;) (func (param i32 i32 i32)))
139 (import "wasi-file" "read" (func (;0;) (type 0)))
140 (export "read" (func 1))
141 (export "write" (func 2))
142 (func (;1;) (type 0) (param i32 i32)
143 unreachable
144 )
145 (func (;2;) (type 1) (param i32 i32 i32)
146 unreachable
147 )
148 )
149 (alias export $real-wasi "read" (func (;0;)))
150 (alias core export $libc "mem" (core memory (;0;)))
151 (alias core export $libc "realloc" (core func (;0;)))
152 (core func $real-wasi-read (;1;) (canon lower (func 0) (memory 0) (realloc 0)))
153 (core instance (;1;)
154 (export "read" (func $real-wasi-read))
155 )
156 (core instance $virt-wasi (;2;) (instantiate $VIRTUALIZE
157 (with "wasi-file" (instance 1))
158 )
159 )
160 (core instance $child (;3;) (instantiate $CHILD
161 (with "wasi-file" (instance $virt-wasi))
162 )
163 )
164 (type (;1;) (func))
165 (alias core export $child "play" (core func (;2;)))
166 (alias core export $libc "mem" (core memory (;1;)))
167 (alias core export $libc "realloc" (core func (;3;)))
168 (func (;1;) (type 1) (canon lift (core func 2) (memory 1) (realloc 3)))
169 (export (;2;) "work" (func 1))
170 )
171 )