summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-17 09:54:03 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-17 09:54:03 -0800
commitd59d14ffa46bcf9d061a6f3d1e941ac8a70d5bda (patch)
treec319f1ce3787f9f21ea93ffad293f3b7ac543bce /src/wasm.h
parent5cbf5020590d61a5d9dbfcc77d7eb7cc144694c7 (diff)
parent0c78665777e244741bfe6e2ab30fedded96354bd (diff)
downloadbinaryen-d59d14ffa46bcf9d061a6f3d1e941ac8a70d5bda.tar.gz
binaryen-d59d14ffa46bcf9d061a6f3d1e941ac8a70d5bda.tar.bz2
binaryen-d59d14ffa46bcf9d061a6f3d1e941ac8a70d5bda.zip
Merge pull request #116 from JSStats/br-value
The break operation may have a value, and must with the v8 encoding.
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 8a3ceac7c..9edd7645e 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -432,14 +432,14 @@ public:
doIndent(o, indent) << name << '\n';
} else {
printOpening(o, "br ") << name;
- if (!value) {
+ if (!value || value->is<Nop>()) {
// avoid a new line just for the parens
o << ")";
return o;
}
incIndent(o, indent);
}
- if (value) printFullLine(o, indent, value);
+ if (value && !value->is<Nop>()) printFullLine(o, indent, value);
return decIndent(o, indent);
}
};