diff options
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/wasm.h b/src/wasm.h index bea294825..ffca28f9e 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); } }; @@ -626,10 +626,10 @@ class Load : public Expression { public: Load() : Expression(LoadId) {} - unsigned bytes; + uint32_t bytes; bool signed_; uint32_t offset; - unsigned align; + uint32_t align; Expression *ptr; std::ostream& doPrint(std::ostream &o, unsigned indent) { @@ -983,6 +983,7 @@ public: size_t offset; const char* data; size_t size; + Segment() {} Segment(size_t offset, const char *data, size_t size) : offset(offset), data(data), size(size) {} }; |