Debian Codegraph @

tests/snapshots/cli/legacy-exceptions/try_catch.wast.json

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