Skip to content

Implement tableswitch and flexible control flow#153

Closed
rossberg wants to merge 13 commits intomasterfrom
switch
Closed

Implement tableswitch and flexible control flow#153
rossberg wants to merge 13 commits intomasterfrom
switch

Conversation

@rossberg
Copy link
Member

Bikeshedding:

- Currently still named switch, but we can rename it to be super-explicit if preferred.
- For consistency, new jumps are named if_break, case_break, default_break, but we can change that to *_branch or something if we decide to rename the existing break operator as well.

Copy link
Member

Choose a reason for hiding this comment

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

The proposed name in the design repo is br_if; if you don't like it, let's discuss this in the design repo, instead of having you just arbitrarily edit things according to your fancy.

Copy link
Member Author

Choose a reason for hiding this comment

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

Relax, I was about to do that. But then saw your latest reply. ;)

@rossberg
Copy link
Member Author

Updated to match WebAssembly/design#427 more closely.

Copy link
Member

Choose a reason for hiding this comment

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

For direct correspondence with AstSemantics.md, could you rename to br_if?

@lukewagner
Copy link
Member

Generally lgtm with nits addressed. The ast.ml doesn't match what we'd probably want in the binary encoding (a table of indices), but that seems fine since that's already the case for many other nodes (we'll have to define "concrete" AST nodes when we get to binary encoding For Real) and the behavior seems to be equivalent to the table.

@rossberg
Copy link
Member Author

Nits addressed, plus a few other internal naming inconsistencies.

@lukewagner
Copy link
Member

Thanks! I think README.md also needs updating of names. I'd wait to here what @sunfishcode thinks before merging though :)

@rossberg rossberg changed the title Implement tableswitch; add if_break Implement tableswitch and flexible control flow Oct 29, 2015
@rossberg
Copy link
Member Author

Closing; superseded by #163.

@rossberg rossberg closed this Nov 13, 2015
@rossberg rossberg deleted the switch branch May 18, 2017 11:15
Connicpu pushed a commit to Connicpu/wasm-spec that referenced this pull request May 11, 2020
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