summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorDouglas Crosher <info@jsstats.com>2016-01-16 12:32:34 +1100
committerDouglas Crosher <info@jsstats.com>2016-01-18 00:06:50 +1100
commit0c78665777e244741bfe6e2ab30fedded96354bd (patch)
tree537ca686d4a94346981e5cddad639071a420b4b5 /src/wasm.h
parent74b3798652f65fbbbe94b9aac2cb4f0fb8ccea09 (diff)
downloadbinaryen-0c78665777e244741bfe6e2ab30fedded96354bd.tar.gz
binaryen-0c78665777e244741bfe6e2ab30fedded96354bd.tar.bz2
binaryen-0c78665777e244741bfe6e2ab30fedded96354bd.zip
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);
}
};