Debian Codegraph @

crates/wit-component/tests/components/link-asyncify/component.wat

raw
1 (component
2 (core module (;0;)
3 (table (;0;) 1 funcref)
4 (memory (;0;) 17)
5 (global (;0;) (mut i32) i32.const 1048576)
6 (global (;1;) (mut i32) i32.const 0)
7 (global (;2;) (mut i32) i32.const 0)
8 (global (;3;) i32 i32.const 1048592)
9 (global (;4;) i32 i32.const 1)
10 (global (;5;) i32 i32.const 1048608)
11 (global (;6;) i32 i32.const 1)
12 (global (;7;) (mut i32) i32.const 1048624)
13 (global (;8;) (mut i32) i32.const 1114112)
14 (export "__stack_pointer" (global 0))
15 (export "__asyncify_state" (global 1))
16 (export "__asyncify_data" (global 2))
17 (export "bar:memory_base" (global 3))
18 (export "bar:table_base" (global 4))
19 (export "foo:memory_base" (global 5))
20 (export "foo:table_base" (global 6))
21 (export "__heap_base" (global 7))
22 (export "__heap_end" (global 8))
23 (export "__indirect_function_table" (table 0))
24 (export "memory" (memory 0))
25 (@producers
26 (processed-by "wit-component" "$CARGO_PKG_VERSION")
27 )
28 )
29 (core module (;1;)
30 (@dylink.0
31 (mem-info (memory 1 4))
32 (needed "foo")
33 )
34 (type (;0;) (func))
35 (type (;1;) (func (param i32)))
36 (type (;2;) (func (result i32)))
37 (import "env" "__memory_base" (global $__memory_base (;0;) i32))
38 (import "env" "__table_base" (global $__table_base (;1;) i32))
39 (import "env" "__asyncify_state" (global (;2;) (mut i32)))
40 (import "env" "__asyncify_data" (global (;3;) (mut i32)))
41 (import "env" "memory" (memory (;0;) 1))
42 (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
43 (export "test:test/test#bar" (func $bar))
44 (export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs))
45 (export "asyncify_start_unwind" (func $asyncify_start_unwind))
46 (export "asyncify_stop_unwind" (func $asyncify_stop_unwind))
47 (export "asyncify_start_rewind" (func $asyncify_start_rewind))
48 (export "asyncify_stop_rewind" (func $asyncify_stop_rewind))
49 (export "asyncify_get_state" (func $asyncify_get_state))
50 (func $__wasm_call_ctors (;0;) (type 0))
51 (func $__wasm_apply_data_relocs (;1;) (type 0))
52 (func $asyncify_start_unwind (;2;) (type 1) (param i32)
53 i32.const 1
54 global.set 2
55 local.get 0
56 global.set 3
57 global.get 3
58 i32.load
59 global.get 3
60 i32.load offset=4
61 i32.gt_u
62 if ;; label = @1
63 unreachable
64 end
65 )
66 (func $asyncify_stop_unwind (;3;) (type 0)
67 i32.const 0
68 global.set 2
69 global.get 3
70 i32.load
71 global.get 3
72 i32.load offset=4
73 i32.gt_u
74 if ;; label = @1
75 unreachable
76 end
77 )
78 (func $asyncify_start_rewind (;4;) (type 1) (param i32)
79 i32.const 2
80 global.set 2
81 local.get 0
82 global.set 3
83 global.get 3
84 i32.load
85 global.get 3
86 i32.load offset=4
87 i32.gt_u
88 if ;; label = @1
89 unreachable
90 end
91 )
92 (func $asyncify_stop_rewind (;5;) (type 0)
93 i32.const 0
94 global.set 2
95 global.get 3
96 i32.load
97 global.get 3
98 i32.load offset=4
99 i32.gt_u
100 if ;; label = @1
101 unreachable
102 end
103 )
104 (func $asyncify_get_state (;6;) (type 2) (result i32)
105 global.get 2
106 )
107 (func $bar (;7;) (type 0))
108 (data $.bss (;0;) (global.get $__memory_base) "\00\00\00\00")
109 )
110 (core module (;2;)
111 (@dylink.0
112 (mem-info (memory 1 4))
113 (needed "bar")
114 )
115 (type (;0;) (func))
116 (type (;1;) (func (param i32)))
117 (type (;2;) (func (result i32)))
118 (import "env" "__memory_base" (global $__memory_base (;0;) i32))
119 (import "env" "__table_base" (global $__table_base (;1;) i32))
120 (import "env" "__asyncify_state" (global (;2;) (mut i32)))
121 (import "env" "__asyncify_data" (global (;3;) (mut i32)))
122 (import "env" "memory" (memory (;0;) 1))
123 (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
124 (export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs))
125 (export "asyncify_start_unwind" (func $asyncify_start_unwind))
126 (export "asyncify_stop_unwind" (func $asyncify_stop_unwind))
127 (export "asyncify_start_rewind" (func $asyncify_start_rewind))
128 (export "asyncify_stop_rewind" (func $asyncify_stop_rewind))
129 (export "asyncify_get_state" (func $asyncify_get_state))
130 (func $__wasm_call_ctors (;0;) (type 0))
131 (func $__wasm_apply_data_relocs (;1;) (type 0))
132 (func $asyncify_start_unwind (;2;) (type 1) (param i32)
133 i32.const 1
134 global.set 2
135 local.get 0
136 global.set 3
137 global.get 3
138 i32.load
139 global.get 3
140 i32.load offset=4
141 i32.gt_u
142 if ;; label = @1
143 unreachable
144 end
145 )
146 (func $asyncify_stop_unwind (;3;) (type 0)
147 i32.const 0
148 global.set 2
149 global.get 3
150 i32.load
151 global.get 3
152 i32.load offset=4
153 i32.gt_u
154 if ;; label = @1
155 unreachable
156 end
157 )
158 (func $asyncify_start_rewind (;4;) (type 1) (param i32)
159 i32.const 2
160 global.set 2
161 local.get 0
162 global.set 3
163 global.get 3
164 i32.load
165 global.get 3
166 i32.load offset=4
167 i32.gt_u
168 if ;; label = @1
169 unreachable
170 end
171 )
172 (func $asyncify_stop_rewind (;5;) (type 0)
173 i32.const 0
174 global.set 2
175 global.get 3
176 i32.load
177 global.get 3
178 i32.load offset=4
179 i32.gt_u
180 if ;; label = @1
181 unreachable
182 end
183 )
184 (func $asyncify_get_state (;6;) (type 2) (result i32)
185 global.get 2
186 )
187 )
188 (core module (;3;)
189 (type (;0;) (func))
190 (type (;1;) (func (param i32)))
191 (import "env" "memory" (memory (;0;) 0))
192 (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
193 (import "bar" "__wasm_apply_data_relocs" (func (;0;) (type 0)))
194 (import "foo" "__wasm_apply_data_relocs" (func (;1;) (type 0)))
195 (start 2)
196 (elem (;0;) (i32.const 1) func)
197 (elem (;1;) (i32.const 1) func)
198 (func (;2;) (type 0)
199 call 0
200 call 1
201 )
202 (data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00")
203 (@producers
204 (processed-by "wit-component" "$CARGO_PKG_VERSION")
205 )
206 )
207 (core instance (;0;) (instantiate 0))
208 (alias core export 0 "memory" (core memory (;0;)))
209 (alias core export 0 "bar:memory_base" (core global (;0;)))
210 (alias core export 0 "bar:table_base" (core global (;1;)))
211 (alias core export 0 "__asyncify_state" (core global (;2;)))
212 (alias core export 0 "__asyncify_data" (core global (;3;)))
213 (alias core export 0 "__indirect_function_table" (core table (;0;)))
214 (core instance (;1;)
215 (export "__memory_base" (global 0))
216 (export "__table_base" (global 1))
217 (export "__asyncify_state" (global 2))
218 (export "__asyncify_data" (global 3))
219 (export "memory" (memory 0))
220 (export "__indirect_function_table" (table 0))
221 )
222 (core instance (;2;) (instantiate 1
223 (with "env" (instance 1))
224 )
225 )
226 (alias core export 0 "foo:memory_base" (core global (;4;)))
227 (alias core export 0 "foo:table_base" (core global (;5;)))
228 (core instance (;3;)
229 (export "__memory_base" (global 4))
230 (export "__table_base" (global 5))
231 (export "__asyncify_state" (global 2))
232 (export "__asyncify_data" (global 3))
233 (export "memory" (memory 0))
234 (export "__indirect_function_table" (table 0))
235 )
236 (core instance (;4;) (instantiate 2
237 (with "env" (instance 3))
238 )
239 )
240 (core instance (;5;) (instantiate 3
241 (with "env" (instance 0))
242 (with "bar" (instance 2))
243 (with "foo" (instance 4))
244 )
245 )
246 (type (;0;) (func))
247 (alias core export 2 "test:test/test#bar" (core func (;0;)))
248 (func (;0;) (type 0) (canon lift (core func 0)))
249 (component (;0;)
250 (type (;0;) (func))
251 (import "import-func-bar" (func (;0;) (type 0)))
252 (type (;1;) (func))
253 (export (;1;) "bar" (func 0) (func (type 1)))
254 )
255 (instance (;0;) (instantiate 0
256 (with "import-func-bar" (func 0))
257 )
258 )
259 (export (;1;) "test:test/test" (instance 0))
260 (@producers
261 (processed-by "wit-component" "$CARGO_PKG_VERSION")
262 )
263 )