You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
br_table binary format differs from AstSemantics and spec #658
The br_table operator is specified in AstSemantics as taking one expression that yields a value for the exited construct. This matches the spec as implemented ml-proto.
But BinaryEncoding says that br_table takes just one expression as input (the key), and doesn't mention this additional expression for the break value. AFIAK all the browser implementations match this, or they wouldn't be able to run the AngryBots wasm file.
Oh sorry, I misunderstood. Thanks for the clarification. Yes, there are no branch return values in asm2wasm output currently, so none in AngryBots.
I am experimenting with block/branch return values in the block-return branch of binaryen currently. I don't have things fully working yet, but it looks promising, can remove a few % of set_locals.
Activity
rossberg commentedon Apr 19, 2016
I think BinaryEncoding needs updating. This should probably be part of Binary 11. I'll prepare a PR.
lukewagner commentedon Apr 20, 2016
I don't think the AngryBots wasm file includes a
br_tablevalue; we haven't implemented that yet in SM.kripken commentedon Apr 21, 2016
I do see
br_tablein AngryBots. Most switches would turn intobr_tables.kripken commentedon Apr 21, 2016
Oh sorry, I misunderstood. Thanks for the clarification. Yes, there are no branch return values in asm2wasm output currently, so none in AngryBots.
I am experimenting with block/branch return values in the
block-returnbranch of binaryen currently. I don't have things fully working yet, but it looks promising, can remove a few % of set_locals.jfbastien commentedon Dec 15, 2016
Has this been resolved?
binji commentedon Dec 16, 2016
Yes, I think this is both resolved and stale. :)