diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-02-08 15:16:08 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-02-08 15:16:08 -0800 |
commit | d3bbf5a4ddd70940d22eb3f1690c2637d725e43e (patch) | |
tree | 80c4b64d3e2e605f5d062c8b52065b728f4c0c0c /src/s2wasm.h | |
parent | 2262204746437423211930d83d8ea336be3efac2 (diff) | |
parent | e9df05441f31bca550cc7f89935f10bf052b1464 (diff) | |
download | binaryen-d3bbf5a4ddd70940d22eb3f1690c2637d725e43e.tar.gz binaryen-d3bbf5a4ddd70940d22eb3f1690c2637d725e43e.tar.bz2 binaryen-d3bbf5a4ddd70940d22eb3f1690c2637d725e43e.zip |
Merge pull request #190 from WebAssembly/br_if-operand-order
Update binaryen and several tests for the new br_if operand order.
Diffstat (limited to 'src/s2wasm.h')
-rw-r--r-- | src/s2wasm.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index 31b28f1e2..649b32196 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -952,12 +952,16 @@ class S2WasmBuilder { bstack.pop_back(); } else if (match("br")) { auto curr = allocator.alloc<Break>(); + bool hasCondition = false; if (*s == '_') { mustMatch("_if"); - curr->condition = getInput(); - skipComma(); + hasCondition = true; } curr->name = getBranchLabel(getInt()); + if (hasCondition) { + skipComma(); + curr->condition = getInput(); + } addToBlock(curr); } else if (match("call")) { makeCall(none); |