Commit 88e7b7f
committed
WIP: initial WebAssembly exception-handling support.
This PR introduces support for the [Wasm exception-handling proposal],
which introduces a conventional try/catch mechanism to WebAssembly. The
PR supports modules that use `try_table` to register handlers for a
lexical scope; and provides `throw` and `throw_ref` that allocate (in
the first case) and throw exception objects.
This PR builds on top of the work in #10510 for Cranelift-level
exception support, #10919 for an unwinder, and #11230 for exception
objects built on top of GC, in addition a bunch of smaller fix and
enabling PRs around those.
This PR does not yet provide host-boundary-crossing exceptions;
exceptions that are not caught in a given Wasm activation become traps
at the host boundary. That support will come in a subsequent PR.
Because exceptions do not yet cross the host boundary, this also does
not yet enable the `assert_exception` wast directive, and so cannot yet
support the spec-tests. That will also come in a subsequent PR.
[Wasm exception-handling proposal]: https://github.com/WebAssembly/exception-handling/1 parent 4590076 commit 88e7b7f
52 files changed
Lines changed: 1757 additions & 461 deletions
File tree
- cranelift
- codegen/src/isa/aarch64/inst
- filetests/src
- crates
- cli-flags/src
- cranelift
- src
- func_environ
- gc
- enabled
- translate
- environ/src
- compile
- gc
- unwinder/src
- wasmtime/src
- runtime
- gc/enabled
- trampoline
- vm
- gc
- enabled
- src/commands
- tests
- all
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
979 | | - | |
| 979 | + | |
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
649 | | - | |
| 648 | + | |
| 649 | + | |
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
654 | 666 | | |
655 | 667 | | |
656 | 668 | | |
657 | 669 | | |
658 | | - | |
| 670 | + | |
659 | 671 | | |
660 | 672 | | |
661 | 673 | | |
662 | | - | |
663 | 674 | | |
664 | 675 | | |
665 | 676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
396 | | - | |
397 | 395 | | |
398 | 396 | | |
399 | 397 | | |
| |||
1012 | 1010 | | |
1013 | 1011 | | |
1014 | 1012 | | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | 1013 | | |
1023 | 1014 | | |
1024 | 1015 | | |
| |||
1043 | 1034 | | |
1044 | 1035 | | |
1045 | 1036 | | |
| 1037 | + | |
1046 | 1038 | | |
1047 | 1039 | | |
1048 | 1040 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
455 | 457 | | |
456 | 458 | | |
457 | 459 | | |
| 460 | + | |
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
| |||
470 | 473 | | |
471 | 474 | | |
472 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
473 | 481 | | |
474 | 482 | | |
475 | 483 | | |
| |||
486 | 494 | | |
487 | 495 | | |
488 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
489 | 506 | | |
490 | 507 | | |
491 | 508 | | |
| |||
1101 | 1118 | | |
1102 | 1119 | | |
1103 | 1120 | | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1104 | 1136 | | |
1105 | 1137 | | |
1106 | 1138 | | |
| |||
0 commit comments