-
Notifications
You must be signed in to change notification settings - Fork 36
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 catchless try in explainer #168
Conversation
- Removes the sentence that catchless `try` is the same as a regular `block`, because it can be targetted by `delegate`. - Improves a few sentences - Adds examples for catchless try Closes WebAssembly#164.
@@ -258,6 +258,18 @@ end | |||
The `rethrow` here references `try $l2`, but the `rethrow` is not within its | |||
`catch` block. | |||
|
|||
Also, targetting a label of `catch`-less `try` or `try`-`delegate` is also a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't see the relevance of the "catch-less" here, I think it's misleading: the example is a validation failure regardless of whether you add a catch clause or not. Both examples are invalid simply because rethrow does not reference a catch-block, no other reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the whole added paragraph here about rethrow
is not really meaningful and also misleading as you suggested. This PR's goal was to clarify about catchless try and its relationship w/ delegate
, so I'll delete this whole paragraph and example.
@@ -258,6 +258,18 @@ end | |||
The `rethrow` here references `try $l2`, but the `rethrow` is not within its | |||
`catch` block. | |||
|
|||
Also, targetting a label of `catch`-less `try` or `try`-`delegate` is also a | |||
validation failure, because `rethrow` is not within a `catch` or `catch_all`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is confusing as well: even if there was a surrounding catch somewhere it would still be invalid. Whether a catch exists is irrelevant, it only matters whether the rethrow references a catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted.
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
try
is the same as a regularblock
, because it can be targetted bydelegate
.Closes #164.