Debian Codegraph @

tests/snapshots/cli/folding/array.wast.json

raw
1 {
2 "source_filename": "tests/cli/folding/array.wast",
3 "commands": [
4 {
5 "type": "module",
6 "line": 5,
7 "filename": "array.0.wasm",
8 "module_type": "binary"
9 },
10 {
11 "type": "assert_invalid",
12 "line": 30,
13 "filename": "array.1.wasm",
14 "module_type": "binary",
15 "text": "unknown type"
16 },
17 {
18 "type": "module",
19 "line": 39,
20 "filename": "array.2.wasm",
21 "module_type": "binary"
22 },
23 {
24 "type": "assert_invalid",
25 "line": 51,
26 "filename": "array.3.wasm",
27 "module_type": "binary",
28 "text": "unknown type"
29 },
30 {
31 "type": "assert_invalid",
32 "line": 55,
33 "filename": "array.4.wasm",
34 "module_type": "binary",
35 "text": "unknown type"
36 },
37 {
38 "type": "module",
39 "line": 62,
40 "filename": "array.5.wasm",
41 "module_type": "binary"
42 },
43 {
44 "type": "assert_return",
45 "line": 99,
46 "action": {
47 "type": "invoke",
48 "field": "new",
49 "args": []
50 },
51 "expected": [
52 {
53 "type": "arrayref"
54 }
55 ]
56 },
57 {
58 "type": "assert_return",
59 "line": 100,
60 "action": {
61 "type": "invoke",
62 "field": "new",
63 "args": []
64 },
65 "expected": [
66 {
67 "type": "eqref"
68 }
69 ]
70 },
71 {
72 "type": "assert_return",
73 "line": 101,
74 "action": {
75 "type": "invoke",
76 "field": "get",
77 "args": [
78 {
79 "type": "i32",
80 "value": "0"
81 }
82 ]
83 },
84 "expected": [
85 {
86 "type": "f32",
87 "value": "0"
88 }
89 ]
90 },
91 {
92 "type": "assert_return",
93 "line": 102,
94 "action": {
95 "type": "invoke",
96 "field": "set_get",
97 "args": [
98 {
99 "type": "i32",
100 "value": "1"
101 },
102 {
103 "type": "f32",
104 "value": "1088421888"
105 }
106 ]
107 },
108 "expected": [
109 {
110 "type": "f32",
111 "value": "1088421888"
112 }
113 ]
114 },
115 {
116 "type": "assert_return",
117 "line": 103,
118 "action": {
119 "type": "invoke",
120 "field": "len",
121 "args": []
122 },
123 "expected": [
124 {
125 "type": "i32",
126 "value": "3"
127 }
128 ]
129 },
130 {
131 "type": "assert_trap",
132 "line": 105,
133 "action": {
134 "type": "invoke",
135 "field": "get",
136 "args": [
137 {
138 "type": "i32",
139 "value": "10"
140 }
141 ]
142 },
143 "text": "out of bounds array access"
144 },
145 {
146 "type": "assert_trap",
147 "line": 106,
148 "action": {
149 "type": "invoke",
150 "field": "set_get",
151 "args": [
152 {
153 "type": "i32",
154 "value": "10"
155 },
156 {
157 "type": "f32",
158 "value": "1088421888"
159 }
160 ]
161 },
162 "text": "out of bounds array access"
163 },
164 {
165 "type": "module",
166 "line": 108,
167 "filename": "array.6.wasm",
168 "module_type": "binary"
169 },
170 {
171 "type": "assert_return",
172 "line": 144,
173 "action": {
174 "type": "invoke",
175 "field": "new",
176 "args": []
177 },
178 "expected": [
179 {
180 "type": "arrayref"
181 }
182 ]
183 },
184 {
185 "type": "assert_return",
186 "line": 145,
187 "action": {
188 "type": "invoke",
189 "field": "new",
190 "args": []
191 },
192 "expected": [
193 {
194 "type": "eqref"
195 }
196 ]
197 },
198 {
199 "type": "assert_return",
200 "line": 146,
201 "action": {
202 "type": "invoke",
203 "field": "get",
204 "args": [
205 {
206 "type": "i32",
207 "value": "0"
208 }
209 ]
210 },
211 "expected": [
212 {
213 "type": "f32",
214 "value": "1065353216"
215 }
216 ]
217 },
218 {
219 "type": "assert_return",
220 "line": 147,
221 "action": {
222 "type": "invoke",
223 "field": "set_get",
224 "args": [
225 {
226 "type": "i32",
227 "value": "1"
228 },
229 {
230 "type": "f32",
231 "value": "1088421888"
232 }
233 ]
234 },
235 "expected": [
236 {
237 "type": "f32",
238 "value": "1088421888"
239 }
240 ]
241 },
242 {
243 "type": "assert_return",
244 "line": 148,
245 "action": {
246 "type": "invoke",
247 "field": "len",
248 "args": []
249 },
250 "expected": [
251 {
252 "type": "i32",
253 "value": "2"
254 }
255 ]
256 },
257 {
258 "type": "assert_trap",
259 "line": 150,
260 "action": {
261 "type": "invoke",
262 "field": "get",
263 "args": [
264 {
265 "type": "i32",
266 "value": "10"
267 }
268 ]
269 },
270 "text": "out of bounds array access"
271 },
272 {
273 "type": "assert_trap",
274 "line": 151,
275 "action": {
276 "type": "invoke",
277 "field": "set_get",
278 "args": [
279 {
280 "type": "i32",
281 "value": "10"
282 },
283 {
284 "type": "f32",
285 "value": "1088421888"
286 }
287 ]
288 },
289 "text": "out of bounds array access"
290 },
291 {
292 "type": "module",
293 "line": 153,
294 "filename": "array.7.wasm",
295 "module_type": "binary"
296 },
297 {
298 "type": "assert_return",
299 "line": 196,
300 "action": {
301 "type": "invoke",
302 "field": "new",
303 "args": []
304 },
305 "expected": [
306 {
307 "type": "arrayref"
308 }
309 ]
310 },
311 {
312 "type": "assert_return",
313 "line": 197,
314 "action": {
315 "type": "invoke",
316 "field": "new",
317 "args": []
318 },
319 "expected": [
320 {
321 "type": "eqref"
322 }
323 ]
324 },
325 {
326 "type": "assert_return",
327 "line": 198,
328 "action": {
329 "type": "invoke",
330 "field": "get_u",
331 "args": [
332 {
333 "type": "i32",
334 "value": "2"
335 }
336 ]
337 },
338 "expected": [
339 {
340 "type": "i32",
341 "value": "255"
342 }
343 ]
344 },
345 {
346 "type": "assert_return",
347 "line": 199,
348 "action": {
349 "type": "invoke",
350 "field": "get_s",
351 "args": [
352 {
353 "type": "i32",
354 "value": "2"
355 }
356 ]
357 },
358 "expected": [
359 {
360 "type": "i32",
361 "value": "-1"
362 }
363 ]
364 },
365 {
366 "type": "assert_return",
367 "line": 200,
368 "action": {
369 "type": "invoke",
370 "field": "set_get",
371 "args": [
372 {
373 "type": "i32",
374 "value": "1"
375 },
376 {
377 "type": "i32",
378 "value": "7"
379 }
380 ]
381 },
382 "expected": [
383 {
384 "type": "i32",
385 "value": "7"
386 }
387 ]
388 },
389 {
390 "type": "assert_return",
391 "line": 201,
392 "action": {
393 "type": "invoke",
394 "field": "len",
395 "args": []
396 },
397 "expected": [
398 {
399 "type": "i32",
400 "value": "3"
401 }
402 ]
403 },
404 {
405 "type": "assert_trap",
406 "line": 203,
407 "action": {
408 "type": "invoke",
409 "field": "get_u",
410 "args": [
411 {
412 "type": "i32",
413 "value": "10"
414 }
415 ]
416 },
417 "text": "out of bounds array access"
418 },
419 {
420 "type": "assert_trap",
421 "line": 204,
422 "action": {
423 "type": "invoke",
424 "field": "get_s",
425 "args": [
426 {
427 "type": "i32",
428 "value": "10"
429 }
430 ]
431 },
432 "text": "out of bounds array access"
433 },
434 {
435 "type": "assert_trap",
436 "line": 205,
437 "action": {
438 "type": "invoke",
439 "field": "set_get",
440 "args": [
441 {
442 "type": "i32",
443 "value": "10"
444 },
445 {
446 "type": "i32",
447 "value": "7"
448 }
449 ]
450 },
451 "text": "out of bounds array access"
452 },
453 {
454 "type": "module",
455 "line": 207,
456 "filename": "array.8.wasm",
457 "module_type": "binary"
458 },
459 {
460 "type": "assert_return",
461 "line": 256,
462 "action": {
463 "type": "invoke",
464 "field": "new",
465 "args": []
466 },
467 "expected": [
468 {
469 "type": "arrayref"
470 }
471 ]
472 },
473 {
474 "type": "assert_return",
475 "line": 257,
476 "action": {
477 "type": "invoke",
478 "field": "new",
479 "args": []
480 },
481 "expected": [
482 {
483 "type": "eqref"
484 }
485 ]
486 },
487 {
488 "type": "assert_return",
489 "line": 258,
490 "action": {
491 "type": "invoke",
492 "field": "get",
493 "args": [
494 {
495 "type": "i32",
496 "value": "0"
497 },
498 {
499 "type": "i32",
500 "value": "0"
501 }
502 ]
503 },
504 "expected": [
505 {
506 "type": "i32",
507 "value": "7"
508 }
509 ]
510 },
511 {
512 "type": "assert_return",
513 "line": 259,
514 "action": {
515 "type": "invoke",
516 "field": "get",
517 "args": [
518 {
519 "type": "i32",
520 "value": "1"
521 },
522 {
523 "type": "i32",
524 "value": "0"
525 }
526 ]
527 },
528 "expected": [
529 {
530 "type": "i32",
531 "value": "1"
532 }
533 ]
534 },
535 {
536 "type": "assert_return",
537 "line": 260,
538 "action": {
539 "type": "invoke",
540 "field": "set_get",
541 "args": [
542 {
543 "type": "i32",
544 "value": "0"
545 },
546 {
547 "type": "i32",
548 "value": "1"
549 },
550 {
551 "type": "i32",
552 "value": "1"
553 }
554 ]
555 },
556 "expected": [
557 {
558 "type": "i32",
559 "value": "2"
560 }
561 ]
562 },
563 {
564 "type": "assert_return",
565 "line": 261,
566 "action": {
567 "type": "invoke",
568 "field": "len",
569 "args": []
570 },
571 "expected": [
572 {
573 "type": "i32",
574 "value": "2"
575 }
576 ]
577 },
578 {
579 "type": "assert_trap",
580 "line": 263,
581 "action": {
582 "type": "invoke",
583 "field": "get",
584 "args": [
585 {
586 "type": "i32",
587 "value": "10"
588 },
589 {
590 "type": "i32",
591 "value": "0"
592 }
593 ]
594 },
595 "text": "out of bounds array access"
596 },
597 {
598 "type": "assert_trap",
599 "line": 264,
600 "action": {
601 "type": "invoke",
602 "field": "set_get",
603 "args": [
604 {
605 "type": "i32",
606 "value": "10"
607 },
608 {
609 "type": "i32",
610 "value": "0"
611 },
612 {
613 "type": "i32",
614 "value": "0"
615 }
616 ]
617 },
618 "text": "out of bounds array access"
619 },
620 {
621 "type": "assert_invalid",
622 "line": 267,
623 "filename": "array.9.wasm",
624 "module_type": "binary",
625 "text": "array is immutable"
626 },
627 {
628 "type": "assert_invalid",
629 "line": 277,
630 "filename": "array.10.wasm",
631 "module_type": "binary",
632 "text": "constant expression required"
633 },
634 {
635 "type": "assert_invalid",
636 "line": 290,
637 "filename": "array.11.wasm",
638 "module_type": "binary",
639 "text": "constant expression required"
640 },
641 {
642 "type": "module",
643 "line": 306,
644 "filename": "array.12.wasm",
645 "module_type": "binary"
646 },
647 {
648 "type": "assert_trap",
649 "line": 316,
650 "action": {
651 "type": "invoke",
652 "field": "array.get-null",
653 "args": []
654 },
655 "text": "null array reference"
656 },
657 {
658 "type": "assert_trap",
659 "line": 317,
660 "action": {
661 "type": "invoke",
662 "field": "array.set-null",
663 "args": []
664 },
665 "text": "null array reference"
666 }
667 ]
668 }