Skip to content

Expose try_table and throw_ref in C and JS API - #9057

Open
ospencer wants to merge 1 commit into
WebAssembly:mainfrom
ospencer:oscar/expose-new-exceptions
Open

Expose try_table and throw_ref in C and JS API#9057
ospencer wants to merge 1 commit into
WebAssembly:mainfrom
ospencer:oscar/expose-new-exceptions

Conversation

@ospencer

Copy link
Copy Markdown
Contributor

Adding these because I really want to use them. Let me know if there was a reason why these weren't there (I figure no one needed it yet).

@ospencer
ospencer requested a review from a team as a code owner August 28, 2026 19:38
@ospencer
ospencer requested review from aheejin and removed request for a team August 28, 2026 19:38

@chharvey chharvey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JS side looks good; I'd just suggest moving the TryTableId: 55 test in order

Comment thread src/binaryen-c.cpp
assert(expression->is<TryTable>());
assert(index < static_cast<TryTable*>(expression)->catchTags.size());
static_cast<TryTable*>(expression)->catchTags[index] =
catchTag ? Name(catchTag) : Name();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aheejin do we need to call refinalize() here so that sentTypes is repopulated?

@ospencer
ospencer force-pushed the oscar/expose-new-exceptions branch from b15fd5c to b0d708b Compare August 29, 2026 05:04
@ospencer

Copy link
Copy Markdown
Contributor Author

Realized I had the ordering wrong everywhere; should be good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants