Debian Codegraph @

tests/snapshots/testsuite/table_grow.wast.json

raw
1 {
2 "source_filename": "tests/testsuite/table_grow.wast",
3 "commands": [
4 {
5 "type": "module",
6 "line": 1,
7 "filename": "table_grow.0.wasm",
8 "module_type": "binary"
9 },
10 {
11 "type": "assert_return",
12 "line": 16,
13 "action": {
14 "type": "invoke",
15 "field": "size",
16 "args": []
17 },
18 "expected": [
19 {
20 "type": "i32",
21 "value": "0"
22 }
23 ]
24 },
25 {
26 "type": "assert_trap",
27 "line": 17,
28 "action": {
29 "type": "invoke",
30 "field": "set",
31 "args": [
32 {
33 "type": "i32",
34 "value": "0"
35 },
36 {
37 "type": "externref",
38 "value": "2"
39 }
40 ]
41 },
42 "text": "out of bounds table access"
43 },
44 {
45 "type": "assert_trap",
46 "line": 18,
47 "action": {
48 "type": "invoke",
49 "field": "get",
50 "args": [
51 {
52 "type": "i32",
53 "value": "0"
54 }
55 ]
56 },
57 "text": "out of bounds table access"
58 },
59 {
60 "type": "assert_return",
61 "line": 20,
62 "action": {
63 "type": "invoke",
64 "field": "grow",
65 "args": [
66 {
67 "type": "i32",
68 "value": "1"
69 },
70 {
71 "type": "externref",
72 "value": "null"
73 }
74 ]
75 },
76 "expected": [
77 {
78 "type": "i32",
79 "value": "0"
80 }
81 ]
82 },
83 {
84 "type": "assert_return",
85 "line": 21,
86 "action": {
87 "type": "invoke",
88 "field": "size",
89 "args": []
90 },
91 "expected": [
92 {
93 "type": "i32",
94 "value": "1"
95 }
96 ]
97 },
98 {
99 "type": "assert_return",
100 "line": 22,
101 "action": {
102 "type": "invoke",
103 "field": "get",
104 "args": [
105 {
106 "type": "i32",
107 "value": "0"
108 }
109 ]
110 },
111 "expected": [
112 {
113 "type": "externref",
114 "value": "null"
115 }
116 ]
117 },
118 {
119 "type": "assert_return",
120 "line": 23,
121 "action": {
122 "type": "invoke",
123 "field": "set",
124 "args": [
125 {
126 "type": "i32",
127 "value": "0"
128 },
129 {
130 "type": "externref",
131 "value": "2"
132 }
133 ]
134 },
135 "expected": []
136 },
137 {
138 "type": "assert_return",
139 "line": 24,
140 "action": {
141 "type": "invoke",
142 "field": "get",
143 "args": [
144 {
145 "type": "i32",
146 "value": "0"
147 }
148 ]
149 },
150 "expected": [
151 {
152 "type": "externref",
153 "value": "2"
154 }
155 ]
156 },
157 {
158 "type": "assert_trap",
159 "line": 25,
160 "action": {
161 "type": "invoke",
162 "field": "set",
163 "args": [
164 {
165 "type": "i32",
166 "value": "1"
167 },
168 {
169 "type": "externref",
170 "value": "2"
171 }
172 ]
173 },
174 "text": "out of bounds table access"
175 },
176 {
177 "type": "assert_trap",
178 "line": 26,
179 "action": {
180 "type": "invoke",
181 "field": "get",
182 "args": [
183 {
184 "type": "i32",
185 "value": "1"
186 }
187 ]
188 },
189 "text": "out of bounds table access"
190 },
191 {
192 "type": "assert_return",
193 "line": 28,
194 "action": {
195 "type": "invoke",
196 "field": "grow-abbrev",
197 "args": [
198 {
199 "type": "i32",
200 "value": "4"
201 },
202 {
203 "type": "externref",
204 "value": "3"
205 }
206 ]
207 },
208 "expected": [
209 {
210 "type": "i32",
211 "value": "1"
212 }
213 ]
214 },
215 {
216 "type": "assert_return",
217 "line": 29,
218 "action": {
219 "type": "invoke",
220 "field": "size",
221 "args": []
222 },
223 "expected": [
224 {
225 "type": "i32",
226 "value": "5"
227 }
228 ]
229 },
230 {
231 "type": "assert_return",
232 "line": 30,
233 "action": {
234 "type": "invoke",
235 "field": "get",
236 "args": [
237 {
238 "type": "i32",
239 "value": "0"
240 }
241 ]
242 },
243 "expected": [
244 {
245 "type": "externref",
246 "value": "2"
247 }
248 ]
249 },
250 {
251 "type": "assert_return",
252 "line": 31,
253 "action": {
254 "type": "invoke",
255 "field": "set",
256 "args": [
257 {
258 "type": "i32",
259 "value": "0"
260 },
261 {
262 "type": "externref",
263 "value": "2"
264 }
265 ]
266 },
267 "expected": []
268 },
269 {
270 "type": "assert_return",
271 "line": 32,
272 "action": {
273 "type": "invoke",
274 "field": "get",
275 "args": [
276 {
277 "type": "i32",
278 "value": "0"
279 }
280 ]
281 },
282 "expected": [
283 {
284 "type": "externref",
285 "value": "2"
286 }
287 ]
288 },
289 {
290 "type": "assert_return",
291 "line": 33,
292 "action": {
293 "type": "invoke",
294 "field": "get",
295 "args": [
296 {
297 "type": "i32",
298 "value": "1"
299 }
300 ]
301 },
302 "expected": [
303 {
304 "type": "externref",
305 "value": "3"
306 }
307 ]
308 },
309 {
310 "type": "assert_return",
311 "line": 34,
312 "action": {
313 "type": "invoke",
314 "field": "get",
315 "args": [
316 {
317 "type": "i32",
318 "value": "4"
319 }
320 ]
321 },
322 "expected": [
323 {
324 "type": "externref",
325 "value": "3"
326 }
327 ]
328 },
329 {
330 "type": "assert_return",
331 "line": 35,
332 "action": {
333 "type": "invoke",
334 "field": "set",
335 "args": [
336 {
337 "type": "i32",
338 "value": "4"
339 },
340 {
341 "type": "externref",
342 "value": "4"
343 }
344 ]
345 },
346 "expected": []
347 },
348 {
349 "type": "assert_return",
350 "line": 36,
351 "action": {
352 "type": "invoke",
353 "field": "get",
354 "args": [
355 {
356 "type": "i32",
357 "value": "4"
358 }
359 ]
360 },
361 "expected": [
362 {
363 "type": "externref",
364 "value": "4"
365 }
366 ]
367 },
368 {
369 "type": "assert_trap",
370 "line": 37,
371 "action": {
372 "type": "invoke",
373 "field": "set",
374 "args": [
375 {
376 "type": "i32",
377 "value": "5"
378 },
379 {
380 "type": "externref",
381 "value": "2"
382 }
383 ]
384 },
385 "text": "out of bounds table access"
386 },
387 {
388 "type": "assert_trap",
389 "line": 38,
390 "action": {
391 "type": "invoke",
392 "field": "get",
393 "args": [
394 {
395 "type": "i32",
396 "value": "5"
397 }
398 ]
399 },
400 "text": "out of bounds table access"
401 },
402 {
403 "type": "module",
404 "line": 42,
405 "filename": "table_grow.1.wasm",
406 "module_type": "binary"
407 },
408 {
409 "type": "assert_return",
410 "line": 50,
411 "action": {
412 "type": "invoke",
413 "field": "grow",
414 "args": []
415 },
416 "expected": [
417 {
418 "type": "i32",
419 "value": "-1"
420 }
421 ]
422 },
423 {
424 "type": "module",
425 "line": 53,
426 "filename": "table_grow.2.wasm",
427 "module_type": "binary"
428 },
429 {
430 "type": "assert_return",
431 "line": 60,
432 "action": {
433 "type": "invoke",
434 "field": "grow",
435 "args": [
436 {
437 "type": "i32",
438 "value": "0"
439 }
440 ]
441 },
442 "expected": [
443 {
444 "type": "i32",
445 "value": "0"
446 }
447 ]
448 },
449 {
450 "type": "assert_return",
451 "line": 61,
452 "action": {
453 "type": "invoke",
454 "field": "grow",
455 "args": [
456 {
457 "type": "i32",
458 "value": "1"
459 }
460 ]
461 },
462 "expected": [
463 {
464 "type": "i32",
465 "value": "0"
466 }
467 ]
468 },
469 {
470 "type": "assert_return",
471 "line": 62,
472 "action": {
473 "type": "invoke",
474 "field": "grow",
475 "args": [
476 {
477 "type": "i32",
478 "value": "0"
479 }
480 ]
481 },
482 "expected": [
483 {
484 "type": "i32",
485 "value": "1"
486 }
487 ]
488 },
489 {
490 "type": "assert_return",
491 "line": 63,
492 "action": {
493 "type": "invoke",
494 "field": "grow",
495 "args": [
496 {
497 "type": "i32",
498 "value": "2"
499 }
500 ]
501 },
502 "expected": [
503 {
504 "type": "i32",
505 "value": "1"
506 }
507 ]
508 },
509 {
510 "type": "assert_return",
511 "line": 64,
512 "action": {
513 "type": "invoke",
514 "field": "grow",
515 "args": [
516 {
517 "type": "i32",
518 "value": "800"
519 }
520 ]
521 },
522 "expected": [
523 {
524 "type": "i32",
525 "value": "3"
526 }
527 ]
528 },
529 {
530 "type": "module",
531 "line": 67,
532 "filename": "table_grow.3.wasm",
533 "module_type": "binary"
534 },
535 {
536 "type": "assert_return",
537 "line": 74,
538 "action": {
539 "type": "invoke",
540 "field": "grow",
541 "args": [
542 {
543 "type": "i32",
544 "value": "0"
545 }
546 ]
547 },
548 "expected": [
549 {
550 "type": "i32",
551 "value": "0"
552 }
553 ]
554 },
555 {
556 "type": "assert_return",
557 "line": 75,
558 "action": {
559 "type": "invoke",
560 "field": "grow",
561 "args": [
562 {
563 "type": "i32",
564 "value": "1"
565 }
566 ]
567 },
568 "expected": [
569 {
570 "type": "i32",
571 "value": "0"
572 }
573 ]
574 },
575 {
576 "type": "assert_return",
577 "line": 76,
578 "action": {
579 "type": "invoke",
580 "field": "grow",
581 "args": [
582 {
583 "type": "i32",
584 "value": "1"
585 }
586 ]
587 },
588 "expected": [
589 {
590 "type": "i32",
591 "value": "1"
592 }
593 ]
594 },
595 {
596 "type": "assert_return",
597 "line": 77,
598 "action": {
599 "type": "invoke",
600 "field": "grow",
601 "args": [
602 {
603 "type": "i32",
604 "value": "2"
605 }
606 ]
607 },
608 "expected": [
609 {
610 "type": "i32",
611 "value": "2"
612 }
613 ]
614 },
615 {
616 "type": "assert_return",
617 "line": 78,
618 "action": {
619 "type": "invoke",
620 "field": "grow",
621 "args": [
622 {
623 "type": "i32",
624 "value": "6"
625 }
626 ]
627 },
628 "expected": [
629 {
630 "type": "i32",
631 "value": "4"
632 }
633 ]
634 },
635 {
636 "type": "assert_return",
637 "line": 79,
638 "action": {
639 "type": "invoke",
640 "field": "grow",
641 "args": [
642 {
643 "type": "i32",
644 "value": "0"
645 }
646 ]
647 },
648 "expected": [
649 {
650 "type": "i32",
651 "value": "10"
652 }
653 ]
654 },
655 {
656 "type": "assert_return",
657 "line": 80,
658 "action": {
659 "type": "invoke",
660 "field": "grow",
661 "args": [
662 {
663 "type": "i32",
664 "value": "1"
665 }
666 ]
667 },
668 "expected": [
669 {
670 "type": "i32",
671 "value": "-1"
672 }
673 ]
674 },
675 {
676 "type": "assert_return",
677 "line": 81,
678 "action": {
679 "type": "invoke",
680 "field": "grow",
681 "args": [
682 {
683 "type": "i32",
684 "value": "65536"
685 }
686 ]
687 },
688 "expected": [
689 {
690 "type": "i32",
691 "value": "-1"
692 }
693 ]
694 },
695 {
696 "type": "module",
697 "line": 84,
698 "filename": "table_grow.4.wasm",
699 "module_type": "binary"
700 },
701 {
702 "type": "assert_return",
703 "line": 106,
704 "action": {
705 "type": "invoke",
706 "field": "check-table-null",
707 "args": [
708 {
709 "type": "i32",
710 "value": "0"
711 },
712 {
713 "type": "i32",
714 "value": "9"
715 }
716 ]
717 },
718 "expected": [
719 {
720 "type": "funcref",
721 "value": "null"
722 }
723 ]
724 },
725 {
726 "type": "assert_return",
727 "line": 107,
728 "action": {
729 "type": "invoke",
730 "field": "grow",
731 "args": [
732 {
733 "type": "i32",
734 "value": "10"
735 }
736 ]
737 },
738 "expected": [
739 {
740 "type": "i32",
741 "value": "10"
742 }
743 ]
744 },
745 {
746 "type": "assert_return",
747 "line": 108,
748 "action": {
749 "type": "invoke",
750 "field": "check-table-null",
751 "args": [
752 {
753 "type": "i32",
754 "value": "0"
755 },
756 {
757 "type": "i32",
758 "value": "19"
759 }
760 ]
761 },
762 "expected": [
763 {
764 "type": "funcref",
765 "value": "null"
766 }
767 ]
768 },
769 {
770 "type": "module",
771 "line": 111,
772 "name": "Tgt",
773 "filename": "table_grow.5.wasm",
774 "module_type": "binary"
775 },
776 {
777 "type": "register",
778 "line": 115,
779 "name": "Tgt",
780 "as": "grown-table"
781 },
782 {
783 "type": "assert_return",
784 "line": 116,
785 "action": {
786 "type": "invoke",
787 "module": "Tgt",
788 "field": "grow",
789 "args": []
790 },
791 "expected": [
792 {
793 "type": "i32",
794 "value": "1"
795 }
796 ]
797 },
798 {
799 "type": "module",
800 "line": 117,
801 "name": "Tgit1",
802 "filename": "table_grow.6.wasm",
803 "module_type": "binary"
804 },
805 {
806 "type": "register",
807 "line": 122,
808 "name": "Tgit1",
809 "as": "grown-imported-table"
810 },
811 {
812 "type": "assert_return",
813 "line": 123,
814 "action": {
815 "type": "invoke",
816 "module": "Tgit1",
817 "field": "grow",
818 "args": []
819 },
820 "expected": [
821 {
822 "type": "i32",
823 "value": "2"
824 }
825 ]
826 },
827 {
828 "type": "module",
829 "line": 124,
830 "name": "Tgit2",
831 "filename": "table_grow.7.wasm",
832 "module_type": "binary"
833 },
834 {
835 "type": "assert_return",
836 "line": 129,
837 "action": {
838 "type": "invoke",
839 "module": "Tgit2",
840 "field": "size",
841 "args": []
842 },
843 "expected": [
844 {
845 "type": "i32",
846 "value": "3"
847 }
848 ]
849 },
850 {
851 "type": "assert_invalid",
852 "line": 135,
853 "filename": "table_grow.8.wasm",
854 "module_type": "binary",
855 "text": "type mismatch"
856 },
857 {
858 "type": "assert_invalid",
859 "line": 144,
860 "filename": "table_grow.9.wasm",
861 "module_type": "binary",
862 "text": "type mismatch"
863 },
864 {
865 "type": "assert_invalid",
866 "line": 153,
867 "filename": "table_grow.10.wasm",
868 "module_type": "binary",
869 "text": "type mismatch"
870 },
871 {
872 "type": "assert_invalid",
873 "line": 162,
874 "filename": "table_grow.11.wasm",
875 "module_type": "binary",
876 "text": "type mismatch"
877 },
878 {
879 "type": "assert_invalid",
880 "line": 171,
881 "filename": "table_grow.12.wasm",
882 "module_type": "binary",
883 "text": "type mismatch"
884 },
885 {
886 "type": "assert_invalid",
887 "line": 181,
888 "filename": "table_grow.13.wasm",
889 "module_type": "binary",
890 "text": "type mismatch"
891 },
892 {
893 "type": "assert_invalid",
894 "line": 190,
895 "filename": "table_grow.14.wasm",
896 "module_type": "binary",
897 "text": "type mismatch"
898 }
899 ]
900 }