Add Wasm select
Created attachment 294771 [details] Patch
Created attachment 294773 [details] Patch
Comment on attachment 294773 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=294773&action=review > Source/JavaScriptCore/wasm/WasmFunctionParser.h:202 > + if (!popExpressionStack(condition)) This is last: select: a ternary operator with two operands, which have the same type as each other, plus a boolean (i32) condition. select returns the first operand if the condition operand is non-zero, or the second otherwise. I think the values are inverted as well.
Changed here: https://github.com/WebAssembly/design/pull/489 Spec: https://github.com/WebAssembly/spec/commit/43c87e32262d00aad59d771711b32145396fb0b1
(In reply to comment #4) > Changed here: https://github.com/WebAssembly/design/pull/489 > Spec: > https://github.com/WebAssembly/spec/commit/ > 43c87e32262d00aad59d771711b32145396fb0b1 Ignore me, I can't do stack growth directions.
(In reply to comment #3) > Comment on attachment 294773 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=294773&action=review > > > Source/JavaScriptCore/wasm/WasmFunctionParser.h:202 > > + if (!popExpressionStack(condition)) > > This is last: > > select: a ternary operator with two operands, which have the same type as > each other, plus a boolean (i32) condition. select returns the first operand > if the condition operand is non-zero, or the second otherwise. > > I think the values are inverted as well. I think it's right the condition is the last thing pushed to the stack and so it's the first thing popped off the stack in select.
Comment on attachment 294773 [details] Patch Clearing flags on attachment: 294773 Committed r208719: <http://trac.webkit.org/changeset/208719>
All reviewed patches have been landed. Closing bug.