konsoletyper / teavm

Compiles Java bytecode to JavaScript, WebAssembly and C
https://teavm.org
Apache License 2.0
2.62k stars 262 forks source link

Implement exception handling in WebAssembly using built-in mechanism #801

Open konsoletyper opened 11 months ago

konsoletyper commented 11 months ago

Currently exception handling is implemented using old-fashioned return status check. Since Wasm EH is supported in all major browsers, it should be used to implement exceptions in TeaVM as well. This should be implemnted behind a switch, since some WASI runtimes still don't support Wasm EH.