Debian Codegraph @

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

raw
1 {
2 "source_filename": "tests/cli/folding/return_call_indirect.wast",
3 "commands": [
4 {
5 "type": "module",
6 "line": 5,
7 "filename": "return_call_indirect.0.wasm",
8 "module_type": "binary"
9 },
10 {
11 "type": "assert_return",
12 "line": 215,
13 "action": {
14 "type": "invoke",
15 "field": "type-i32",
16 "args": []
17 },
18 "expected": [
19 {
20 "type": "i32",
21 "value": "306"
22 }
23 ]
24 },
25 {
26 "type": "assert_return",
27 "line": 216,
28 "action": {
29 "type": "invoke",
30 "field": "type-i64",
31 "args": []
32 },
33 "expected": [
34 {
35 "type": "i64",
36 "value": "356"
37 }
38 ]
39 },
40 {
41 "type": "assert_return",
42 "line": 217,
43 "action": {
44 "type": "invoke",
45 "field": "type-f32",
46 "args": []
47 },
48 "expected": [
49 {
50 "type": "f32",
51 "value": "1165172736"
52 }
53 ]
54 },
55 {
56 "type": "assert_return",
57 "line": 218,
58 "action": {
59 "type": "invoke",
60 "field": "type-f64",
61 "args": []
62 },
63 "expected": [
64 {
65 "type": "f64",
66 "value": "4660882566700597248"
67 }
68 ]
69 },
70 {
71 "type": "assert_return",
72 "line": 220,
73 "action": {
74 "type": "invoke",
75 "field": "type-index",
76 "args": []
77 },
78 "expected": [
79 {
80 "type": "i64",
81 "value": "100"
82 }
83 ]
84 },
85 {
86 "type": "assert_return",
87 "line": 222,
88 "action": {
89 "type": "invoke",
90 "field": "type-first-i32",
91 "args": []
92 },
93 "expected": [
94 {
95 "type": "i32",
96 "value": "32"
97 }
98 ]
99 },
100 {
101 "type": "assert_return",
102 "line": 223,
103 "action": {
104 "type": "invoke",
105 "field": "type-first-i64",
106 "args": []
107 },
108 "expected": [
109 {
110 "type": "i64",
111 "value": "64"
112 }
113 ]
114 },
115 {
116 "type": "assert_return",
117 "line": 224,
118 "action": {
119 "type": "invoke",
120 "field": "type-first-f32",
121 "args": []
122 },
123 "expected": [
124 {
125 "type": "f32",
126 "value": "1068037571"
127 }
128 ]
129 },
130 {
131 "type": "assert_return",
132 "line": 225,
133 "action": {
134 "type": "invoke",
135 "field": "type-first-f64",
136 "args": []
137 },
138 "expected": [
139 {
140 "type": "f64",
141 "value": "4610064722561534525"
142 }
143 ]
144 },
145 {
146 "type": "assert_return",
147 "line": 227,
148 "action": {
149 "type": "invoke",
150 "field": "type-second-i32",
151 "args": []
152 },
153 "expected": [
154 {
155 "type": "i32",
156 "value": "32"
157 }
158 ]
159 },
160 {
161 "type": "assert_return",
162 "line": 228,
163 "action": {
164 "type": "invoke",
165 "field": "type-second-i64",
166 "args": []
167 },
168 "expected": [
169 {
170 "type": "i64",
171 "value": "64"
172 }
173 ]
174 },
175 {
176 "type": "assert_return",
177 "line": 229,
178 "action": {
179 "type": "invoke",
180 "field": "type-second-f32",
181 "args": []
182 },
183 "expected": [
184 {
185 "type": "f32",
186 "value": "1107296256"
187 }
188 ]
189 },
190 {
191 "type": "assert_return",
192 "line": 230,
193 "action": {
194 "type": "invoke",
195 "field": "type-second-f64",
196 "args": []
197 },
198 "expected": [
199 {
200 "type": "f64",
201 "value": "4634211053438658150"
202 }
203 ]
204 },
205 {
206 "type": "assert_return",
207 "line": 232,
208 "action": {
209 "type": "invoke",
210 "field": "dispatch",
211 "args": [
212 {
213 "type": "i32",
214 "value": "5"
215 },
216 {
217 "type": "i64",
218 "value": "2"
219 }
220 ]
221 },
222 "expected": [
223 {
224 "type": "i64",
225 "value": "2"
226 }
227 ]
228 },
229 {
230 "type": "assert_return",
231 "line": 233,
232 "action": {
233 "type": "invoke",
234 "field": "dispatch",
235 "args": [
236 {
237 "type": "i32",
238 "value": "5"
239 },
240 {
241 "type": "i64",
242 "value": "5"
243 }
244 ]
245 },
246 "expected": [
247 {
248 "type": "i64",
249 "value": "5"
250 }
251 ]
252 },
253 {
254 "type": "assert_return",
255 "line": 234,
256 "action": {
257 "type": "invoke",
258 "field": "dispatch",
259 "args": [
260 {
261 "type": "i32",
262 "value": "12"
263 },
264 {
265 "type": "i64",
266 "value": "5"
267 }
268 ]
269 },
270 "expected": [
271 {
272 "type": "i64",
273 "value": "120"
274 }
275 ]
276 },
277 {
278 "type": "assert_return",
279 "line": 235,
280 "action": {
281 "type": "invoke",
282 "field": "dispatch",
283 "args": [
284 {
285 "type": "i32",
286 "value": "17"
287 },
288 {
289 "type": "i64",
290 "value": "2"
291 }
292 ]
293 },
294 "expected": [
295 {
296 "type": "i64",
297 "value": "2"
298 }
299 ]
300 },
301 {
302 "type": "assert_trap",
303 "line": 236,
304 "action": {
305 "type": "invoke",
306 "field": "dispatch",
307 "args": [
308 {
309 "type": "i32",
310 "value": "0"
311 },
312 {
313 "type": "i64",
314 "value": "2"
315 }
316 ]
317 },
318 "text": "indirect call type mismatch"
319 },
320 {
321 "type": "assert_trap",
322 "line": 237,
323 "action": {
324 "type": "invoke",
325 "field": "dispatch",
326 "args": [
327 {
328 "type": "i32",
329 "value": "15"
330 },
331 {
332 "type": "i64",
333 "value": "2"
334 }
335 ]
336 },
337 "text": "indirect call type mismatch"
338 },
339 {
340 "type": "assert_trap",
341 "line": 238,
342 "action": {
343 "type": "invoke",
344 "field": "dispatch",
345 "args": [
346 {
347 "type": "i32",
348 "value": "20"
349 },
350 {
351 "type": "i64",
352 "value": "2"
353 }
354 ]
355 },
356 "text": "undefined element"
357 },
358 {
359 "type": "assert_trap",
360 "line": 239,
361 "action": {
362 "type": "invoke",
363 "field": "dispatch",
364 "args": [
365 {
366 "type": "i32",
367 "value": "-1"
368 },
369 {
370 "type": "i64",
371 "value": "2"
372 }
373 ]
374 },
375 "text": "undefined element"
376 },
377 {
378 "type": "assert_trap",
379 "line": 240,
380 "action": {
381 "type": "invoke",
382 "field": "dispatch",
383 "args": [
384 {
385 "type": "i32",
386 "value": "1213432423"
387 },
388 {
389 "type": "i64",
390 "value": "2"
391 }
392 ]
393 },
394 "text": "undefined element"
395 },
396 {
397 "type": "assert_return",
398 "line": 242,
399 "action": {
400 "type": "invoke",
401 "field": "dispatch-structural",
402 "args": [
403 {
404 "type": "i32",
405 "value": "5"
406 }
407 ]
408 },
409 "expected": [
410 {
411 "type": "i64",
412 "value": "9"
413 }
414 ]
415 },
416 {
417 "type": "assert_return",
418 "line": 243,
419 "action": {
420 "type": "invoke",
421 "field": "dispatch-structural",
422 "args": [
423 {
424 "type": "i32",
425 "value": "5"
426 }
427 ]
428 },
429 "expected": [
430 {
431 "type": "i64",
432 "value": "9"
433 }
434 ]
435 },
436 {
437 "type": "assert_return",
438 "line": 244,
439 "action": {
440 "type": "invoke",
441 "field": "dispatch-structural",
442 "args": [
443 {
444 "type": "i32",
445 "value": "12"
446 }
447 ]
448 },
449 "expected": [
450 {
451 "type": "i64",
452 "value": "362880"
453 }
454 ]
455 },
456 {
457 "type": "assert_return",
458 "line": 245,
459 "action": {
460 "type": "invoke",
461 "field": "dispatch-structural",
462 "args": [
463 {
464 "type": "i32",
465 "value": "17"
466 }
467 ]
468 },
469 "expected": [
470 {
471 "type": "i64",
472 "value": "9"
473 }
474 ]
475 },
476 {
477 "type": "assert_trap",
478 "line": 246,
479 "action": {
480 "type": "invoke",
481 "field": "dispatch-structural",
482 "args": [
483 {
484 "type": "i32",
485 "value": "11"
486 }
487 ]
488 },
489 "text": "indirect call type mismatch"
490 },
491 {
492 "type": "assert_trap",
493 "line": 247,
494 "action": {
495 "type": "invoke",
496 "field": "dispatch-structural",
497 "args": [
498 {
499 "type": "i32",
500 "value": "16"
501 }
502 ]
503 },
504 "text": "indirect call type mismatch"
505 },
506 {
507 "type": "assert_return",
508 "line": 249,
509 "action": {
510 "type": "invoke",
511 "field": "call-tab",
512 "args": [
513 {
514 "type": "i32",
515 "value": "0"
516 }
517 ]
518 },
519 "expected": [
520 {
521 "type": "i32",
522 "value": "306"
523 }
524 ]
525 },
526 {
527 "type": "assert_return",
528 "line": 250,
529 "action": {
530 "type": "invoke",
531 "field": "call-tab",
532 "args": [
533 {
534 "type": "i32",
535 "value": "1"
536 }
537 ]
538 },
539 "expected": [
540 {
541 "type": "i32",
542 "value": "307"
543 }
544 ]
545 },
546 {
547 "type": "assert_return",
548 "line": 251,
549 "action": {
550 "type": "invoke",
551 "field": "call-tab",
552 "args": [
553 {
554 "type": "i32",
555 "value": "2"
556 }
557 ]
558 },
559 "expected": [
560 {
561 "type": "i32",
562 "value": "308"
563 }
564 ]
565 },
566 {
567 "type": "assert_return",
568 "line": 253,
569 "action": {
570 "type": "invoke",
571 "field": "fac",
572 "args": [
573 {
574 "type": "i64",
575 "value": "0"
576 }
577 ]
578 },
579 "expected": [
580 {
581 "type": "i64",
582 "value": "1"
583 }
584 ]
585 },
586 {
587 "type": "assert_return",
588 "line": 254,
589 "action": {
590 "type": "invoke",
591 "field": "fac",
592 "args": [
593 {
594 "type": "i64",
595 "value": "1"
596 }
597 ]
598 },
599 "expected": [
600 {
601 "type": "i64",
602 "value": "1"
603 }
604 ]
605 },
606 {
607 "type": "assert_return",
608 "line": 255,
609 "action": {
610 "type": "invoke",
611 "field": "fac",
612 "args": [
613 {
614 "type": "i64",
615 "value": "5"
616 }
617 ]
618 },
619 "expected": [
620 {
621 "type": "i64",
622 "value": "120"
623 }
624 ]
625 },
626 {
627 "type": "assert_return",
628 "line": 256,
629 "action": {
630 "type": "invoke",
631 "field": "fac",
632 "args": [
633 {
634 "type": "i64",
635 "value": "25"
636 }
637 ]
638 },
639 "expected": [
640 {
641 "type": "i64",
642 "value": "7034535277573963776"
643 }
644 ]
645 },
646 {
647 "type": "assert_return",
648 "line": 258,
649 "action": {
650 "type": "invoke",
651 "field": "even",
652 "args": [
653 {
654 "type": "i32",
655 "value": "0"
656 }
657 ]
658 },
659 "expected": [
660 {
661 "type": "i32",
662 "value": "44"
663 }
664 ]
665 },
666 {
667 "type": "assert_return",
668 "line": 259,
669 "action": {
670 "type": "invoke",
671 "field": "even",
672 "args": [
673 {
674 "type": "i32",
675 "value": "1"
676 }
677 ]
678 },
679 "expected": [
680 {
681 "type": "i32",
682 "value": "99"
683 }
684 ]
685 },
686 {
687 "type": "assert_return",
688 "line": 260,
689 "action": {
690 "type": "invoke",
691 "field": "even",
692 "args": [
693 {
694 "type": "i32",
695 "value": "100"
696 }
697 ]
698 },
699 "expected": [
700 {
701 "type": "i32",
702 "value": "44"
703 }
704 ]
705 },
706 {
707 "type": "assert_return",
708 "line": 261,
709 "action": {
710 "type": "invoke",
711 "field": "even",
712 "args": [
713 {
714 "type": "i32",
715 "value": "77"
716 }
717 ]
718 },
719 "expected": [
720 {
721 "type": "i32",
722 "value": "99"
723 }
724 ]
725 },
726 {
727 "type": "assert_return",
728 "line": 262,
729 "action": {
730 "type": "invoke",
731 "field": "even",
732 "args": [
733 {
734 "type": "i32",
735 "value": "100000"
736 }
737 ]
738 },
739 "expected": [
740 {
741 "type": "i32",
742 "value": "44"
743 }
744 ]
745 },
746 {
747 "type": "assert_return",
748 "line": 263,
749 "action": {
750 "type": "invoke",
751 "field": "even",
752 "args": [
753 {
754 "type": "i32",
755 "value": "111111"
756 }
757 ]
758 },
759 "expected": [
760 {
761 "type": "i32",
762 "value": "99"
763 }
764 ]
765 },
766 {
767 "type": "assert_return",
768 "line": 264,
769 "action": {
770 "type": "invoke",
771 "field": "odd",
772 "args": [
773 {
774 "type": "i32",
775 "value": "0"
776 }
777 ]
778 },
779 "expected": [
780 {
781 "type": "i32",
782 "value": "99"
783 }
784 ]
785 },
786 {
787 "type": "assert_return",
788 "line": 265,
789 "action": {
790 "type": "invoke",
791 "field": "odd",
792 "args": [
793 {
794 "type": "i32",
795 "value": "1"
796 }
797 ]
798 },
799 "expected": [
800 {
801 "type": "i32",
802 "value": "44"
803 }
804 ]
805 },
806 {
807 "type": "assert_return",
808 "line": 266,
809 "action": {
810 "type": "invoke",
811 "field": "odd",
812 "args": [
813 {
814 "type": "i32",
815 "value": "200"
816 }
817 ]
818 },
819 "expected": [
820 {
821 "type": "i32",
822 "value": "99"
823 }
824 ]
825 },
826 {
827 "type": "assert_return",
828 "line": 267,
829 "action": {
830 "type": "invoke",
831 "field": "odd",
832 "args": [
833 {
834 "type": "i32",
835 "value": "77"
836 }
837 ]
838 },
839 "expected": [
840 {
841 "type": "i32",
842 "value": "44"
843 }
844 ]
845 },
846 {
847 "type": "assert_return",
848 "line": 268,
849 "action": {
850 "type": "invoke",
851 "field": "odd",
852 "args": [
853 {
854 "type": "i32",
855 "value": "200002"
856 }
857 ]
858 },
859 "expected": [
860 {
861 "type": "i32",
862 "value": "99"
863 }
864 ]
865 },
866 {
867 "type": "assert_return",
868 "line": 269,
869 "action": {
870 "type": "invoke",
871 "field": "odd",
872 "args": [
873 {
874 "type": "i32",
875 "value": "300003"
876 }
877 ]
878 },
879 "expected": [
880 {
881 "type": "i32",
882 "value": "44"
883 }
884 ]
885 },
886 {
887 "type": "assert_malformed",
888 "line": 275,
889 "filename": "return_call_indirect.1.wat",
890 "module_type": "text",
891 "text": "unexpected token"
892 },
893 {
894 "type": "assert_malformed",
895 "line": 287,
896 "filename": "return_call_indirect.2.wat",
897 "module_type": "text",
898 "text": "unexpected token"
899 },
900 {
901 "type": "assert_malformed",
902 "line": 299,
903 "filename": "return_call_indirect.3.wat",
904 "module_type": "text",
905 "text": "unexpected token"
906 },
907 {
908 "type": "assert_malformed",
909 "line": 311,
910 "filename": "return_call_indirect.4.wat",
911 "module_type": "text",
912 "text": "unexpected token"
913 },
914 {
915 "type": "assert_malformed",
916 "line": 323,
917 "filename": "return_call_indirect.5.wat",
918 "module_type": "text",
919 "text": "unexpected token"
920 },
921 {
922 "type": "assert_malformed",
923 "line": 335,
924 "filename": "return_call_indirect.6.wat",
925 "module_type": "text",
926 "text": "unexpected token"
927 },
928 {
929 "type": "assert_malformed",
930 "line": 347,
931 "filename": "return_call_indirect.7.wat",
932 "module_type": "text",
933 "text": "unexpected token"
934 },
935 {
936 "type": "assert_malformed",
937 "line": 354,
938 "filename": "return_call_indirect.8.wat",
939 "module_type": "text",
940 "text": "inline function type"
941 },
942 {
943 "type": "assert_malformed",
944 "line": 364,
945 "filename": "return_call_indirect.9.wat",
946 "module_type": "text",
947 "text": "inline function type"
948 },
949 {
950 "type": "assert_malformed",
951 "line": 374,
952 "filename": "return_call_indirect.10.wat",
953 "module_type": "text",
954 "text": "inline function type"
955 },
956 {
957 "type": "assert_malformed",
958 "line": 386,
959 "filename": "return_call_indirect.11.wat",
960 "module_type": "text",
961 "text": "inline function type"
962 },
963 {
964 "type": "assert_invalid",
965 "line": 401,
966 "filename": "return_call_indirect.12.wasm",
967 "module_type": "binary",
968 "text": "unknown table"
969 },
970 {
971 "type": "assert_invalid",
972 "line": 409,
973 "filename": "return_call_indirect.13.wasm",
974 "module_type": "binary",
975 "text": "type mismatch"
976 },
977 {
978 "type": "assert_invalid",
979 "line": 417,
980 "filename": "return_call_indirect.14.wasm",
981 "module_type": "binary",
982 "text": "type mismatch"
983 },
984 {
985 "type": "assert_invalid",
986 "line": 426,
987 "filename": "return_call_indirect.15.wasm",
988 "module_type": "binary",
989 "text": "type mismatch"
990 },
991 {
992 "type": "assert_invalid",
993 "line": 434,
994 "filename": "return_call_indirect.16.wasm",
995 "module_type": "binary",
996 "text": "type mismatch"
997 },
998 {
999 "type": "module",
1000 "line": 442,
1001 "filename": "return_call_indirect.17.wasm",
1002 "module_type": "binary"
1003 },
1004 {
1005 "type": "module",
1006 "line": 448,
1007 "filename": "return_call_indirect.18.wasm",
1008 "module_type": "binary"
1009 },
1010 {
1011 "type": "assert_invalid",
1012 "line": 457,
1013 "filename": "return_call_indirect.19.wasm",
1014 "module_type": "binary",
1015 "text": "type mismatch"
1016 },
1017 {
1018 "type": "assert_invalid",
1019 "line": 465,
1020 "filename": "return_call_indirect.20.wasm",
1021 "module_type": "binary",
1022 "text": "type mismatch"
1023 },
1024 {
1025 "type": "assert_invalid",
1026 "line": 474,
1027 "filename": "return_call_indirect.21.wasm",
1028 "module_type": "binary",
1029 "text": "type mismatch"
1030 },
1031 {
1032 "type": "assert_invalid",
1033 "line": 484,
1034 "filename": "return_call_indirect.22.wasm",
1035 "module_type": "binary",
1036 "text": "type mismatch"
1037 },
1038 {
1039 "type": "assert_invalid",
1040 "line": 494,
1041 "filename": "return_call_indirect.23.wasm",
1042 "module_type": "binary",
1043 "text": "type mismatch"
1044 },
1045 {
1046 "type": "assert_invalid",
1047 "line": 504,
1048 "filename": "return_call_indirect.24.wasm",
1049 "module_type": "binary",
1050 "text": "type mismatch"
1051 },
1052 {
1053 "type": "assert_invalid",
1054 "line": 514,
1055 "filename": "return_call_indirect.25.wasm",
1056 "module_type": "binary",
1057 "text": "type mismatch"
1058 },
1059 {
1060 "type": "assert_invalid",
1061 "line": 528,
1062 "filename": "return_call_indirect.26.wasm",
1063 "module_type": "binary",
1064 "text": "unknown type"
1065 },
1066 {
1067 "type": "assert_invalid",
1068 "line": 535,
1069 "filename": "return_call_indirect.27.wasm",
1070 "module_type": "binary",
1071 "text": "unknown type"
1072 },
1073 {
1074 "type": "assert_invalid",
1075 "line": 546,
1076 "filename": "return_call_indirect.28.wasm",
1077 "module_type": "binary",
1078 "text": "unknown function 0"
1079 }
1080 ]
1081 }