{"action":"created","comment":{"url":"https://api.github.com/repos/WebAssembly/design/pulls/comments/46510719","id":46510719,"diff_hunk":"@@ -232,48 +232,58 @@ Since all AST nodes are expressions in WebAssembly, control constructs may yield\n a value and may appear as children of other expressions.\n \n  * `nop`: an empty operator that does not yield a value \n- * `block`: a fixed-length sequence of expressions with a label at the end\n+ * `block`: a sequence of expressions with a label at the end\n  * `loop`: a block with an additional label at the beginning which may be used to form loops\n+ * `multiblock`: a mixed sequence of expressions and `label` nodes, with a label at the end\n+ * `label`: a node which defines a label and must be an immediate child of `multiblock`\n  * `if`: if expression with a *then* expression\n  * `if_else`: if expression with *then* and *else* expressions\n- * `br`: branch to a given label in an enclosing construct\n- * `br_if`: conditionally branch to a given label in an enclosing construct\n- * `tableswitch`: a jump table which may jump either to an immediate `case`\n-                  child or to a label in an enclosing construct\n- * `case`: a case which must be an immediate child of `tableswitch`\n+ * `br`: branch to a given label\n+ * `br_if`: conditionally branch to a given label\n+ * `tableswitch`: branch using a \"jump table\" of labels\n  * `return`: return zero or more values from this function\n \n ### Branches and nesting\n \n-The `br` and `br_if` constructs express low-level branching.\n-Branches that exit a `block`, `loop`, or `tableswitch` may take a subexpression\n-that yields a value for the exited construct.\n-Branches may only reference labels defined by an outer *enclosing construct*.\n-This means that, for example, references to a `block`'s label can only occur \n-within the `block`'s body. In practice, outer `block`s can be used to place labels for any\n-given branching pattern, except for one restriction: one can't branch into the middle of a\n-loop from outside it. This restriction ensures all control flow graphs are well-structured.\n+The `br`, `br_if`, and `tableswitch` constructs express low-level branching. The\n+`block`, `loop`, and `multiblock` constructs provide labels that may be branched\n+to.\n+\n+Branches may only reference *visible* labels. The labels in `block` and `loop`\n+nodes are visible only from within their subtrees. The labels in `multiblock`\n+nodes are only visible from within their subtrees, and only from above their\n+definition.\n+\n+In practice, `block`s, `loop`s, and `multiblocks` can be used to place labels","path":"AstSemantics.md","position":40,"original_position":40,"commit_id":"e7454221152d53b585b0843740ded6a398fd5806","original_commit_id":"e7454221152d53b585b0843740ded6a398fd5806","user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"body":"this change weakens your point substantially, doesn't it? you don't need `multiblocks` to achieve that property. having this text suggests that you do.","created_at":"2015-12-03T04:04:08Z","updated_at":"2015-12-03T04:04:08Z","html_url":"https://github.com/WebAssembly/design/pull/490#discussion_r46510719","pull_request_url":"https://api.github.com/repos/WebAssembly/design/pulls/490","_links":{"self":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/comments/46510719"},"html":{"href":"https://github.com/WebAssembly/design/pull/490#discussion_r46510719"},"pull_request":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/490"}}},"pull_request":{"url":"https://api.github.com/repos/WebAssembly/design/pulls/490","id":52488980,"html_url":"https://github.com/WebAssembly/design/pull/490","diff_url":"https://github.com/WebAssembly/design/pull/490.diff","patch_url":"https://github.com/WebAssembly/design/pull/490.patch","issue_url":"https://api.github.com/repos/WebAssembly/design/issues/490","number":490,"state":"open","locked":false,"title":"Factor a `multiblock` node out of `tableswitch`.","user":{"login":"sunfishcode","id":4503403,"avatar_url":"https://avatars.githubusercontent.com/u/4503403?v=3","gravatar_id":"","url":"https://api.github.com/users/sunfishcode","html_url":"https://github.com/sunfishcode","followers_url":"https://api.github.com/users/sunfishcode/followers","following_url":"https://api.github.com/users/sunfishcode/following{/other_user}","gists_url":"https://api.github.com/users/sunfishcode/gists{/gist_id}","starred_url":"https://api.github.com/users/sunfishcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunfishcode/subscriptions","organizations_url":"https://api.github.com/users/sunfishcode/orgs","repos_url":"https://api.github.com/users/sunfishcode/repos","events_url":"https://api.github.com/users/sunfishcode/events{/privacy}","received_events_url":"https://api.github.com/users/sunfishcode/received_events","type":"User","site_admin":false},"body":"As discussed in https://github.com/WebAssembly/design/issues/480, this introduces `multiblock`, and simplifies `tableswitch` accordingly.\r\n\r\nThis also updates the wording around control flow operators in several areas.","created_at":"2015-12-03T03:53:05Z","updated_at":"2015-12-03T04:04:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"daa3fa0ffacfe62d5f9523e5ce13a0ca0959e348","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WebAssembly/design/pulls/490/commits","review_comments_url":"https://api.github.com/repos/WebAssembly/design/pulls/490/comments","review_comment_url":"https://api.github.com/repos/WebAssembly/design/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WebAssembly/design/issues/490/comments","statuses_url":"https://api.github.com/repos/WebAssembly/design/statuses/e7454221152d53b585b0843740ded6a398fd5806","head":{"label":"WebAssembly:multiblock","ref":"multiblock","sha":"e7454221152d53b585b0843740ded6a398fd5806","user":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"repo":{"id":34808241,"name":"design","full_name":"WebAssembly/design","owner":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WebAssembly/design","description":"WebAssembly Design Documents","fork":false,"url":"https://api.github.com/repos/WebAssembly/design","forks_url":"https://api.github.com/repos/WebAssembly/design/forks","keys_url":"https://api.github.com/repos/WebAssembly/design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WebAssembly/design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WebAssembly/design/teams","hooks_url":"https://api.github.com/repos/WebAssembly/design/hooks","issue_events_url":"https://api.github.com/repos/WebAssembly/design/issues/events{/number}","events_url":"https://api.github.com/repos/WebAssembly/design/events","assignees_url":"https://api.github.com/repos/WebAssembly/design/assignees{/user}","branches_url":"https://api.github.com/repos/WebAssembly/design/branches{/branch}","tags_url":"https://api.github.com/repos/WebAssembly/design/tags","blobs_url":"https://api.github.com/repos/WebAssembly/design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WebAssembly/design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WebAssembly/design/git/refs{/sha}","trees_url":"https://api.github.com/repos/WebAssembly/design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WebAssembly/design/statuses/{sha}","languages_url":"https://api.github.com/repos/WebAssembly/design/languages","stargazers_url":"https://api.github.com/repos/WebAssembly/design/stargazers","contributors_url":"https://api.github.com/repos/WebAssembly/design/contributors","subscribers_url":"https://api.github.com/repos/WebAssembly/design/subscribers","subscription_url":"https://api.github.com/repos/WebAssembly/design/subscription","commits_url":"https://api.github.com/repos/WebAssembly/design/commits{/sha}","git_commits_url":"https://api.github.com/repos/WebAssembly/design/git/commits{/sha}","comments_url":"https://api.github.com/repos/WebAssembly/design/comments{/number}","issue_comment_url":"https://api.github.com/repos/WebAssembly/design/issues/comments{/number}","contents_url":"https://api.github.com/repos/WebAssembly/design/contents/{+path}","compare_url":"https://api.github.com/repos/WebAssembly/design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WebAssembly/design/merges","archive_url":"https://api.github.com/repos/WebAssembly/design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WebAssembly/design/downloads","issues_url":"https://api.github.com/repos/WebAssembly/design/issues{/number}","pulls_url":"https://api.github.com/repos/WebAssembly/design/pulls{/number}","milestones_url":"https://api.github.com/repos/WebAssembly/design/milestones{/number}","notifications_url":"https://api.github.com/repos/WebAssembly/design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WebAssembly/design/labels{/name}","releases_url":"https://api.github.com/repos/WebAssembly/design/releases{/id}","created_at":"2015-04-29T17:36:05Z","updated_at":"2015-12-03T02:33:25Z","pushed_at":"2015-12-03T03:53:05Z","git_url":"git://github.com/WebAssembly/design.git","ssh_url":"git@github.com:WebAssembly/design.git","clone_url":"https://github.com/WebAssembly/design.git","svn_url":"https://github.com/WebAssembly/design","homepage":"","size":1765,"stargazers_count":4742,"watchers_count":4742,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":240,"mirror_url":null,"open_issues_count":68,"forks":240,"open_issues":68,"watchers":4742,"default_branch":"master"}},"base":{"label":"WebAssembly:master","ref":"master","sha":"b621477e213c9ad8e276239e1f7c44aea85fe55b","user":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"repo":{"id":34808241,"name":"design","full_name":"WebAssembly/design","owner":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WebAssembly/design","description":"WebAssembly Design Documents","fork":false,"url":"https://api.github.com/repos/WebAssembly/design","forks_url":"https://api.github.com/repos/WebAssembly/design/forks","keys_url":"https://api.github.com/repos/WebAssembly/design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WebAssembly/design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WebAssembly/design/teams","hooks_url":"https://api.github.com/repos/WebAssembly/design/hooks","issue_events_url":"https://api.github.com/repos/WebAssembly/design/issues/events{/number}","events_url":"https://api.github.com/repos/WebAssembly/design/events","assignees_url":"https://api.github.com/repos/WebAssembly/design/assignees{/user}","branches_url":"https://api.github.com/repos/WebAssembly/design/branches{/branch}","tags_url":"https://api.github.com/repos/WebAssembly/design/tags","blobs_url":"https://api.github.com/repos/WebAssembly/design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WebAssembly/design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WebAssembly/design/git/refs{/sha}","trees_url":"https://api.github.com/repos/WebAssembly/design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WebAssembly/design/statuses/{sha}","languages_url":"https://api.github.com/repos/WebAssembly/design/languages","stargazers_url":"https://api.github.com/repos/WebAssembly/design/stargazers","contributors_url":"https://api.github.com/repos/WebAssembly/design/contributors","subscribers_url":"https://api.github.com/repos/WebAssembly/design/subscribers","subscription_url":"https://api.github.com/repos/WebAssembly/design/subscription","commits_url":"https://api.github.com/repos/WebAssembly/design/commits{/sha}","git_commits_url":"https://api.github.com/repos/WebAssembly/design/git/commits{/sha}","comments_url":"https://api.github.com/repos/WebAssembly/design/comments{/number}","issue_comment_url":"https://api.github.com/repos/WebAssembly/design/issues/comments{/number}","contents_url":"https://api.github.com/repos/WebAssembly/design/contents/{+path}","compare_url":"https://api.github.com/repos/WebAssembly/design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WebAssembly/design/merges","archive_url":"https://api.github.com/repos/WebAssembly/design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WebAssembly/design/downloads","issues_url":"https://api.github.com/repos/WebAssembly/design/issues{/number}","pulls_url":"https://api.github.com/repos/WebAssembly/design/pulls{/number}","milestones_url":"https://api.github.com/repos/WebAssembly/design/milestones{/number}","notifications_url":"https://api.github.com/repos/WebAssembly/design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WebAssembly/design/labels{/name}","releases_url":"https://api.github.com/repos/WebAssembly/design/releases{/id}","created_at":"2015-04-29T17:36:05Z","updated_at":"2015-12-03T02:33:25Z","pushed_at":"2015-12-03T03:53:05Z","git_url":"git://github.com/WebAssembly/design.git","ssh_url":"git@github.com:WebAssembly/design.git","clone_url":"https://github.com/WebAssembly/design.git","svn_url":"https://github.com/WebAssembly/design","homepage":"","size":1765,"stargazers_count":4742,"watchers_count":4742,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":240,"mirror_url":null,"open_issues_count":68,"forks":240,"open_issues":68,"watchers":4742,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/490"},"html":{"href":"https://github.com/WebAssembly/design/pull/490"},"issue":{"href":"https://api.github.com/repos/WebAssembly/design/issues/490"},"comments":{"href":"https://api.github.com/repos/WebAssembly/design/issues/490/comments"},"review_comments":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/490/comments"},"review_comment":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/490/commits"},"statuses":{"href":"https://api.github.com/repos/WebAssembly/design/statuses/e7454221152d53b585b0843740ded6a398fd5806"}}}}