[clang] [llvm] Add __builtin_wasm_js_catch (PR #153767)
Hood Chatham via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 16 03:13:10 PDT 2025
hoodmane wrote:
@aheejin I will give a more detailed response about why this is necessary on Monday but the problem is that the `SuspendError` is generated inside the import wrapper:
https://github.com/v8/v8/blob/3c61391b55f06f880c7431c231f15014db34dfcc/src/wasm/wrappers.cc#L540-L568
So no JS code runs in between the call site to the wasm import and where the exception is raised. Thus, the error has to be caught in Wasm. See this issue:
https://github.com/WebAssembly/js-promise-integration/issues/29
particularly this comment:
https://github.com/WebAssembly/js-promise-integration/issues/29#issuecomment-3135713355
https://github.com/llvm/llvm-project/pull/153767
More information about the llvm-commits
mailing list