Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify descriptions of control flow operators #340

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

Liedtke
Copy link
Contributor

@Liedtke Liedtke commented Nov 21, 2024

I stumbled upon the exnref mentioning in the rethrow.
I also slightly adapted the description for the delegate as it sounds like the delegate was opening a new block while it finishes / ends the current try block.

| `delegate` | `0x18` | relative_depth : `varuint32` | begins the delegate block of the try block |
| `throw` | `0x08` | index : `varint32` | Creates an exception defined by the tag and then throws it |
| `rethrow` | `0x09` | relative_depth : `varuint32` | Pops the `exnref` on top of the stack and throws it |
| `delegate` | `0x18` | relative_depth : `varuint32` | ends the current try block and delegates any exceptions to the block at `relative_depth` |
Copy link
Member

Choose a reason for hiding this comment

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

Thanks! It looks the old text is a copy-pasta of catch description...

| `rethrow` | `0x09` | relative_depth : `varuint32` | Pops the `exnref` on top of the stack and throws it |
| `delegate` | `0x18` | relative_depth : `varuint32` | ends the current try block and delegates any exceptions to the block at `relative_depth` |
| `throw` | `0x08` | index : `varint32` | creates an exception defined by the tag and then throws it |
| `rethrow` | `0x09` | relative_depth : `varuint32` | throws the exception caught by the catch block at `relative_depth` |
Copy link
Member

Choose a reason for hiding this comment

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

Hmm it looks like the remnants of the pre-legacy proposal that preceded the legacy proposal. Thanks for the catch.

@aheejin aheejin merged commit e7c7c31 into WebAssembly:main Nov 21, 2024
@Liedtke Liedtke deleted the clarify_control_flow_operators branch November 21, 2024 21:45
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.

2 participants