Add support for Wasm EH#5162
Conversation
|
Some IR comparisons for reference C++/Clang: https://godbolt.org/z/heMqqGvbb |
|
Maybe @rainers? It works, but maybe one of you has a better idea on how to organize the modifications to Wasm EH follows MSVC style Right now I'm treating it more like MSVC, and just dumping everything in |
|
Sorry, it's been so long since I worked on the EH, I don't remember any details. I doubt I can be of any help here. |
That's unfortunate... Do you know of anyone else who might be more familiar with the EH code at this point (MSVC especially)? |
|
I suspect that would only be @kinke. |
|
Cool, thanks for tackling this! - Unfortunately I'm not really familiar with the MSVC EH stuff either, as Rainer thankfully did all the work. ;) It has just come up again though, as related #3504 becomes more pressing, being a blocker for the D v2.113 merge in #5113 (comment). I really hate that LLVM doesn't take care of this for us (accepting the generic Itanium EH IR representation for all targets and lowering it appropriately as needed). |
Okay, then I guess we just have to consider what we have, and ignore prior rationale. On one hand, doing what I did works, and makes it fairly easy to keep it inline with any fixes to MSVC EH (which will most likely impact Wasm EH as well). On the other hand, it's kind of ugly from a code cleanliness point of view, cause I'm jamming what should probably go into I mean, technically we could always refactor it later, right? But when's "later"? I guess I'll just mark this "Ready for review" and we'll go from there. |
Adds codegen and DRuntime support for WebAssembly exception handling.