{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/spec/issues/249","repository_url":"https://api.github.com/repos/WebAssembly/spec","labels_url":"https://api.github.com/repos/WebAssembly/spec/issues/249/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/spec/issues/249/comments","events_url":"https://api.github.com/repos/WebAssembly/spec/issues/249/events","html_url":"https://github.com/WebAssembly/spec/pull/249","id":136057606,"number":249,"title":"Implement br_table; drop tableswitch","user":{"login":"rossberg-chromium","id":4247099,"avatar_url":"https://avatars.githubusercontent.com/u/4247099?v=3","gravatar_id":"","url":"https://api.github.com/users/rossberg-chromium","html_url":"https://github.com/rossberg-chromium","followers_url":"https://api.github.com/users/rossberg-chromium/followers","following_url":"https://api.github.com/users/rossberg-chromium/following{/other_user}","gists_url":"https://api.github.com/users/rossberg-chromium/gists{/gist_id}","starred_url":"https://api.github.com/users/rossberg-chromium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossberg-chromium/subscriptions","organizations_url":"https://api.github.com/users/rossberg-chromium/orgs","repos_url":"https://api.github.com/users/rossberg-chromium/repos","events_url":"https://api.github.com/users/rossberg-chromium/events{/privacy}","received_events_url":"https://api.github.com/users/rossberg-chromium/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-24T13:10:10Z","updated_at":"2016-02-26T18:50:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/WebAssembly/spec/pulls/249","html_url":"https://github.com/WebAssembly/spec/pull/249","diff_url":"https://github.com/WebAssembly/spec/pull/249.diff","patch_url":"https://github.com/WebAssembly/spec/pull/249.patch"},"body":"...as decided yesterday.\r\n\r\nThe syntax I propose here is trying to maximise simplicity and symmetry with `br_if`:\r\n```\r\n(br_table <var>* <expr>? <expr>)\r\n```\r\nThe first expression is the (optional) argument transferred to the label, the second is the index.\r\n\r\nTo maximise simplicity, I propose that there is no default. Analogous to `br_if`, the operator simply falls through if the index does not apply (i.e., is out of bounds). A default jump can trivially be implemented by a consecutive `br`.\r\n\r\nWDYT?"},"comment":{"url":"https://api.github.com/repos/WebAssembly/spec/issues/comments/189421144","html_url":"https://github.com/WebAssembly/spec/pull/249#issuecomment-189421144","issue_url":"https://api.github.com/repos/WebAssembly/spec/issues/249","id":189421144,"user":{"login":"lukewagner","id":9660325,"avatar_url":"https://avatars.githubusercontent.com/u/9660325?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewagner","html_url":"https://github.com/lukewagner","followers_url":"https://api.github.com/users/lukewagner/followers","following_url":"https://api.github.com/users/lukewagner/following{/other_user}","gists_url":"https://api.github.com/users/lukewagner/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewagner/subscriptions","organizations_url":"https://api.github.com/users/lukewagner/orgs","repos_url":"https://api.github.com/users/lukewagner/repos","events_url":"https://api.github.com/users/lukewagner/events{/privacy}","received_events_url":"https://api.github.com/users/lukewagner/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T18:50:16Z","updated_at":"2016-02-26T18:50:16Z","body":"Oops, I hadn't considered the jump-to-jump implied by having default fallthrough.  An explicit default target makes sense since this is basically the target of the bounds-check-branch in the machine code.   So +1 to adding a `var` preceding the `var list` in `Br_table`."}}