Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix return representation in Ast #256

Merged
merged 6 commits into from
Mar 2, 2016
Merged

Fix return representation in Ast #256

merged 6 commits into from
Mar 2, 2016

Conversation

rossberg
Copy link
Member

Ast.Return improperly had a label argument to support its desugaring. That is now removed, and the logic properly encapsulated in desugaring.

@lukewagner
Copy link
Member

Ah, nice, I hadn't even noticed that var straggler.

@rossberg
Copy link
Member Author

rossberg commented Mar 2, 2016

@lukewagner, is that an LGTM? :)

Btw, I screwed up my branching, so that #257 is included in this branch. Sorry about that, just look at the first commit.

@lukewagner
Copy link
Member

oops, yes :)

rossberg added a commit that referenced this pull request Mar 2, 2016
Fix `return` representation in Ast
@rossberg rossberg merged commit 8fa4dce into master Mar 2, 2016
@rossberg
Copy link
Member Author

rossberg commented Mar 2, 2016

Thanks :)

@rossberg rossberg deleted the return branch March 2, 2016 17:57
@@ -95,7 +95,7 @@
(loop
(if
(i32.eq (get_local 0) (i32.const 0))
(br 1)
(br 2)
Copy link
Member

Choose a reason for hiding this comment

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

This pull is for return - why did these brs change?

And where does 2 go? the only blocks or loops above this br are the one loop, which would take indexes 0 and 1?

Copy link
Member

Choose a reason for hiding this comment

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

if has an implicit label now too. Change was here: 0568800. Not sure why it didn't break then.

edit: oh, it got added in to this merge accidentally.

Copy link
Member

Choose a reason for hiding this comment

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

thanks! now i see

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry for this, I messed up the branching, and accidentally merged the if changes into the return branch instead of master. This line is part of the if changes (if now has an implicit block).

Copy link
Member

Choose a reason for hiding this comment

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

is it the if that has an implicit block, or the then and else branches that do? because I see they can have a label name on them now? must it be the same for both of them if there is?

Copy link
Member Author

Choose a reason for hiding this comment

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

The branches have implicit blocks, so the labels go there (also, that makes it clear that they are not in scope in the condition). They can be named differently, see the examples in test/labels.wast.

Copy link
Member

Choose a reason for hiding this comment

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

got it, thanks!

dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
This makes some cosmetic changes to the identity-preserving `rethrow`
test added in WebAssembly#253. This is to prepare for adding the same set of tests
for a Wasm-defined-and-exported tag, as requrested in
WebAssembly/exception-handling#253 (comment).
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants