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
WIthout br_unless, reversing a branch without reorganizing basic blocks requires adding two instructions, an i32.const 0 and an i32.eq operator. This is a very common pattern which adds clutter. A unary not operator would be trivial to implement, make pattern-matching of branching easier, and reduce clutter for a common pattern.
Activity
titzer commentedon Feb 25, 2016
It appears in the binary format, and we've implemented in V8. Also in favor of
br_unless, but we haven't implemented that.sunfishcode commentedon Feb 25, 2016
Ok, great. I'll submit PRs adding unary not to ml-proto and AstSemantics.md then so that we're all in sync.
sunfishcode commentedon Feb 25, 2016
Design PR: #555
[-]Unary `not` operator[/-][+]Unary `eqz` operator[/+]sunfishcode commentedon Mar 11, 2016
Design is done; spec PR: WebAssembly/spec#259
rossberg commentedon Mar 12, 2016
Spec landed as well, closing.