Debian Codegraph @

tests/snapshots/testsuite/proposals/wasm-3.0/ref_test.wast/68.print

raw
1 (module
2 (type $t0 (;0;) (sub (struct)))
3 (type $t1 (;1;) (sub $t0 (struct (field i32))))
4 (type $t1' (;2;) (sub $t0 (struct (field i32))))
5 (type $t2 (;3;) (sub $t1 (struct (field i32) (field i32))))
6 (type $t2' (;4;) (sub $t1' (struct (field i32) (field i32))))
7 (type $t3 (;5;) (sub $t0 (struct (field i32) (field i32))))
8 (type $t0' (;6;) (sub $t0 (struct)))
9 (type $t4 (;7;) (sub $t0' (struct (field i32) (field i32))))
10 (type (;8;) (func))
11 (table (;0;) 20 structref)
12 (export "test-sub" (func 1))
13 (export "test-canon" (func 2))
14 (func $init (;0;) (type 8)
15 i32.const 0
16 struct.new_default $t0
17 table.set 0
18 i32.const 10
19 struct.new_default $t0
20 table.set 0
21 i32.const 1
22 struct.new_default $t1
23 table.set 0
24 i32.const 11
25 struct.new_default $t1'
26 table.set 0
27 i32.const 2
28 struct.new_default $t2
29 table.set 0
30 i32.const 12
31 struct.new_default $t2'
32 table.set 0
33 i32.const 3
34 struct.new_default $t3
35 table.set 0
36 i32.const 4
37 struct.new_default $t4
38 table.set 0
39 )
40 (func (;1;) (type 8)
41 call $init
42 block $l
43 ref.null struct
44 ref.test (ref null $t0)
45 i32.eqz
46 br_if $l
47 ref.null $t0
48 ref.test (ref null $t0)
49 i32.eqz
50 br_if $l
51 ref.null $t1
52 ref.test (ref null $t0)
53 i32.eqz
54 br_if $l
55 ref.null $t2
56 ref.test (ref null $t0)
57 i32.eqz
58 br_if $l
59 ref.null $t3
60 ref.test (ref null $t0)
61 i32.eqz
62 br_if $l
63 ref.null $t4
64 ref.test (ref null $t0)
65 i32.eqz
66 br_if $l
67 i32.const 0
68 table.get 0
69 ref.test (ref null $t0)
70 i32.eqz
71 br_if $l
72 i32.const 1
73 table.get 0
74 ref.test (ref null $t0)
75 i32.eqz
76 br_if $l
77 i32.const 2
78 table.get 0
79 ref.test (ref null $t0)
80 i32.eqz
81 br_if $l
82 i32.const 3
83 table.get 0
84 ref.test (ref null $t0)
85 i32.eqz
86 br_if $l
87 i32.const 4
88 table.get 0
89 ref.test (ref null $t0)
90 i32.eqz
91 br_if $l
92 ref.null struct
93 ref.test (ref null $t1)
94 i32.eqz
95 br_if $l
96 ref.null $t0
97 ref.test (ref null $t1)
98 i32.eqz
99 br_if $l
100 ref.null $t1
101 ref.test (ref null $t1)
102 i32.eqz
103 br_if $l
104 ref.null $t2
105 ref.test (ref null $t1)
106 i32.eqz
107 br_if $l
108 ref.null $t3
109 ref.test (ref null $t1)
110 i32.eqz
111 br_if $l
112 ref.null $t4
113 ref.test (ref null $t1)
114 i32.eqz
115 br_if $l
116 i32.const 1
117 table.get 0
118 ref.test (ref null $t1)
119 i32.eqz
120 br_if $l
121 i32.const 2
122 table.get 0
123 ref.test (ref null $t1)
124 i32.eqz
125 br_if $l
126 ref.null struct
127 ref.test (ref null $t2)
128 i32.eqz
129 br_if $l
130 ref.null $t0
131 ref.test (ref null $t2)
132 i32.eqz
133 br_if $l
134 ref.null $t1
135 ref.test (ref null $t2)
136 i32.eqz
137 br_if $l
138 ref.null $t2
139 ref.test (ref null $t2)
140 i32.eqz
141 br_if $l
142 ref.null $t3
143 ref.test (ref null $t2)
144 i32.eqz
145 br_if $l
146 ref.null $t4
147 ref.test (ref null $t2)
148 i32.eqz
149 br_if $l
150 i32.const 2
151 table.get 0
152 ref.test (ref null $t2)
153 i32.eqz
154 br_if $l
155 ref.null struct
156 ref.test (ref null $t3)
157 i32.eqz
158 br_if $l
159 ref.null $t0
160 ref.test (ref null $t3)
161 i32.eqz
162 br_if $l
163 ref.null $t1
164 ref.test (ref null $t3)
165 i32.eqz
166 br_if $l
167 ref.null $t2
168 ref.test (ref null $t3)
169 i32.eqz
170 br_if $l
171 ref.null $t3
172 ref.test (ref null $t3)
173 i32.eqz
174 br_if $l
175 ref.null $t4
176 ref.test (ref null $t3)
177 i32.eqz
178 br_if $l
179 i32.const 3
180 table.get 0
181 ref.test (ref null $t3)
182 i32.eqz
183 br_if $l
184 ref.null struct
185 ref.test (ref null $t4)
186 i32.eqz
187 br_if $l
188 ref.null $t0
189 ref.test (ref null $t4)
190 i32.eqz
191 br_if $l
192 ref.null $t1
193 ref.test (ref null $t4)
194 i32.eqz
195 br_if $l
196 ref.null $t2
197 ref.test (ref null $t4)
198 i32.eqz
199 br_if $l
200 ref.null $t3
201 ref.test (ref null $t4)
202 i32.eqz
203 br_if $l
204 ref.null $t4
205 ref.test (ref null $t4)
206 i32.eqz
207 br_if $l
208 i32.const 4
209 table.get 0
210 ref.test (ref null $t4)
211 i32.eqz
212 br_if $l
213 i32.const 0
214 table.get 0
215 ref.test (ref $t0)
216 i32.eqz
217 br_if $l
218 i32.const 1
219 table.get 0
220 ref.test (ref $t0)
221 i32.eqz
222 br_if $l
223 i32.const 2
224 table.get 0
225 ref.test (ref $t0)
226 i32.eqz
227 br_if $l
228 i32.const 3
229 table.get 0
230 ref.test (ref $t0)
231 i32.eqz
232 br_if $l
233 i32.const 4
234 table.get 0
235 ref.test (ref $t0)
236 i32.eqz
237 br_if $l
238 i32.const 1
239 table.get 0
240 ref.test (ref $t1)
241 i32.eqz
242 br_if $l
243 i32.const 2
244 table.get 0
245 ref.test (ref $t1)
246 i32.eqz
247 br_if $l
248 i32.const 2
249 table.get 0
250 ref.test (ref $t2)
251 i32.eqz
252 br_if $l
253 i32.const 3
254 table.get 0
255 ref.test (ref $t3)
256 i32.eqz
257 br_if $l
258 i32.const 4
259 table.get 0
260 ref.test (ref $t4)
261 i32.eqz
262 br_if $l
263 ref.null struct
264 ref.test (ref $t0)
265 br_if $l
266 ref.null struct
267 ref.test (ref $t1)
268 br_if $l
269 ref.null struct
270 ref.test (ref $t2)
271 br_if $l
272 ref.null struct
273 ref.test (ref $t3)
274 br_if $l
275 ref.null struct
276 ref.test (ref $t4)
277 br_if $l
278 i32.const 0
279 table.get 0
280 ref.test (ref $t1)
281 br_if $l
282 i32.const 3
283 table.get 0
284 ref.test (ref $t1)
285 br_if $l
286 i32.const 4
287 table.get 0
288 ref.test (ref $t1)
289 br_if $l
290 i32.const 0
291 table.get 0
292 ref.test (ref $t2)
293 br_if $l
294 i32.const 1
295 table.get 0
296 ref.test (ref $t2)
297 br_if $l
298 i32.const 3
299 table.get 0
300 ref.test (ref $t2)
301 br_if $l
302 i32.const 4
303 table.get 0
304 ref.test (ref $t2)
305 br_if $l
306 i32.const 0
307 table.get 0
308 ref.test (ref $t3)
309 br_if $l
310 i32.const 1
311 table.get 0
312 ref.test (ref $t3)
313 br_if $l
314 i32.const 2
315 table.get 0
316 ref.test (ref $t3)
317 br_if $l
318 i32.const 4
319 table.get 0
320 ref.test (ref $t3)
321 br_if $l
322 i32.const 0
323 table.get 0
324 ref.test (ref $t4)
325 br_if $l
326 i32.const 1
327 table.get 0
328 ref.test (ref $t4)
329 br_if $l
330 i32.const 2
331 table.get 0
332 ref.test (ref $t4)
333 br_if $l
334 i32.const 3
335 table.get 0
336 ref.test (ref $t4)
337 br_if $l
338 return
339 end
340 unreachable
341 )
342 (func (;2;) (type 8)
343 call $init
344 block $l
345 i32.const 0
346 table.get 0
347 ref.test (ref $t0)
348 i32.eqz
349 br_if $l
350 i32.const 1
351 table.get 0
352 ref.test (ref $t0)
353 i32.eqz
354 br_if $l
355 i32.const 2
356 table.get 0
357 ref.test (ref $t0)
358 i32.eqz
359 br_if $l
360 i32.const 3
361 table.get 0
362 ref.test (ref $t0)
363 i32.eqz
364 br_if $l
365 i32.const 4
366 table.get 0
367 ref.test (ref $t0)
368 i32.eqz
369 br_if $l
370 i32.const 10
371 table.get 0
372 ref.test (ref $t0)
373 i32.eqz
374 br_if $l
375 i32.const 11
376 table.get 0
377 ref.test (ref $t0)
378 i32.eqz
379 br_if $l
380 i32.const 12
381 table.get 0
382 ref.test (ref $t0)
383 i32.eqz
384 br_if $l
385 i32.const 1
386 table.get 0
387 ref.test (ref $t1')
388 i32.eqz
389 br_if $l
390 i32.const 2
391 table.get 0
392 ref.test (ref $t1')
393 i32.eqz
394 br_if $l
395 i32.const 11
396 table.get 0
397 ref.test (ref $t1)
398 i32.eqz
399 br_if $l
400 i32.const 12
401 table.get 0
402 ref.test (ref $t1)
403 i32.eqz
404 br_if $l
405 i32.const 2
406 table.get 0
407 ref.test (ref $t2')
408 i32.eqz
409 br_if $l
410 i32.const 12
411 table.get 0
412 ref.test (ref $t2)
413 i32.eqz
414 br_if $l
415 return
416 end
417 unreachable
418 )
419 )