summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorDan Gohman <sunfish@mozilla.com>2016-02-08 11:58:32 -0800
committerDan Gohman <sunfish@mozilla.com>2016-02-08 14:45:47 -0800
commita9158298ebd8fcf2fe369a46635a458ce9f9f5d4 (patch)
treed104f82cb05805a5fc9c87e332fd10511f5e12f5 /src/wasm-binary.h
parent2262204746437423211930d83d8ea336be3efac2 (diff)
downloadbinaryen-a9158298ebd8fcf2fe369a46635a458ce9f9f5d4.tar.gz
binaryen-a9158298ebd8fcf2fe369a46635a458ce9f9f5d4.tar.bz2
binaryen-a9158298ebd8fcf2fe369a46635a458ce9f9f5d4.zip
Update binaryen and several tests for the new br_if operand order.
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 440689ea0..2c884a4f5 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -663,12 +663,12 @@ assert(0);
o << int8_t(curr->condition ? BinaryConsts::BrIf : BinaryConsts::Br);
int offset = getBreakIndex(curr->name);
o << int8_t(offset);
- if (curr->condition) recurse(curr->condition);
if (curr->value) {
recurse(curr->value);
} else {
visitNop(nullptr);
}
+ if (curr->condition) recurse(curr->condition);
}
void visitSwitch(Switch *curr) {
if (debug) std::cerr << "zz node: Switch" << std::endl;
@@ -1356,8 +1356,8 @@ public:
if (debug) std::cerr << "zz node: Break" << std::endl;
auto offset = getInt8();
curr->name = getBreakName(offset);
- if (code == BinaryConsts::BrIf) readExpression(curr->condition);
readExpression(curr->value);
+ if (code == BinaryConsts::BrIf) readExpression(curr->condition);
}
void visitSwitch(Switch *curr) {
if (debug) std::cerr << "zz node: Switch" << std::endl;