Add TagType support for WebAssembly exception-handling proposal#197
Add TagType support for WebAssembly exception-handling proposal#197bacek wants to merge 3 commits intoWebAssembly:mainfrom
Conversation
- Add `WASM_EXTERN_TAG` to `wasm_externkind_enum` - Add `WASM_DECLARE_TYPE(tagtype)` with constructor and functype accessor - Add cast functions: `wasm_tagtype_as_externtype*` and `wasm_externtype_as_tagtype*` - Add `TAG` to `ExternKind` enum in C++ API - Add `TagType` class extending `ExternType` with `make(own<FuncType>&&)` and `functype()` accessor - Add `tag()` accessors on `ExternType` Tags are described by an associated function type whose parameters are the exception payload types (per the WebAssembly exception-handling proposal). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks, this is great! But it seems to need a couple of adjustments to the V8 wrapper as well, in order to unbreak CI - mostly adding a bunch of straightforward new switch cases for tag types (see the CI failures). |
Add TagTypeImpl and implement TagType::make/copy/destroy/functype. Add ExternType::tag() accessors. Handle ExternKind::TAG in all four switch statements that previously caused -Werror,-Wswitch failures: - ExternType::copy() - ExternType::destroy() - Extern::type() - Instance exports construction Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Updated. I didn't actually implement Tag in v8 wrapper. Can try to do it in a separate PR. |
|
https://github.com/WebAssembly/wasm-c-api/actions/runs/23210241938/job/67461420459?pr=197#step:6:211 Is it just timed out building v8? All checks are passing locally for me. |
|
Good question, I triggered a rerun. |
Yep. It helped. |
Tests passed. Can it be merged? |
WASM_EXTERN_TAGtowasm_externkind_enumWASM_DECLARE_TYPE(tagtype)with constructor and functype accessorwasm_tagtype_as_externtype*andwasm_externtype_as_tagtype*TAGtoExternKindenum in C++ APITagTypeclass extendingExternTypewithmake(own<FuncType>&&)andfunctype()accessortag()accessors onExternTypeTags are described by an associated function type whose parameters are
the exception payload types (per the WebAssembly exception-handling proposal).