summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-02-08 13:33:34 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-02-08 13:33:34 -0800
commit2262204746437423211930d83d8ea336be3efac2 (patch)
tree7d85bb4d6ab8531abc074d3a5043fb00963fdb9e /src/wasm.h
parent271504de91e3f396251041f94c0f29094af92207 (diff)
parent28ac77ff3f5668d543a6c7a99f3e1b1dceff6201 (diff)
downloadbinaryen-2262204746437423211930d83d8ea336be3efac2.tar.gz
binaryen-2262204746437423211930d83d8ea336be3efac2.tar.bz2
binaryen-2262204746437423211930d83d8ea336be3efac2.zip
Merge pull request #189 from WebAssembly/br_if-changes
br_if updates
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 893c777c4..20a7b34ef 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -511,10 +511,8 @@ public:
std::ostream& doPrint(std::ostream &o, unsigned indent) {
if (condition) {
- printOpening(o, "br_if");
+ printOpening(o, "br_if ") << name;
incIndent(o, indent);
- printFullLine(o, indent, condition);
- doIndent(o, indent) << name << '\n';
} else {
printOpening(o, "br ") << name;
if (!value || value->is<Nop>()) {
@@ -525,6 +523,9 @@ public:
incIndent(o, indent);
}
if (value && !value->is<Nop>()) printFullLine(o, indent, value);
+ if (condition) {
+ printFullLine(o, indent, condition);
+ }
return decIndent(o, indent);
}
};