diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-02-20 18:25:28 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-02-20 18:25:28 -0800 |
commit | ed77a619dc1550ce4ac4c0c420093b25e687996a (patch) | |
tree | d256f805d7a5a39e52933522d6dbddc320abb944 /src | |
parent | 8039a98d3b4b978a4aa2d8486c35596165981c3d (diff) | |
download | binaryen-ed77a619dc1550ce4ac4c0c420093b25e687996a.tar.gz binaryen-ed77a619dc1550ce4ac4c0c420093b25e687996a.tar.bz2 binaryen-ed77a619dc1550ce4ac4c0c420093b25e687996a.zip |
do not print alignment if it is the implicit default, which is the number of bytes
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Print.cpp | 4 | ||||
-rw-r--r-- | src/wasm-s-parser.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index fddae15ff..3e886074d 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -179,7 +179,7 @@ struct PrintSExpression : public WasmVisitor<PrintSExpression, void> { if (curr->offset) { o << " offset=" << curr->offset; } - if (curr->align) { + if (curr->align != curr->bytes) { o << " align=" << curr->align; } incIndent(o, indent); @@ -204,7 +204,7 @@ struct PrintSExpression : public WasmVisitor<PrintSExpression, void> { if (curr->offset) { o << " offset=" << curr->offset; } - if (curr->align) { + if (curr->align != curr->bytes) { o << " align=" << curr->align; } incIndent(o, indent); diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index c6cf1b32d..64f127b91 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -726,7 +726,7 @@ private: ret->signed_ = extra[0] && extra[1] == 's'; size_t i = 1; ret->offset = 0; - ret->align = 0; + ret->align = ret->bytes; while (!s[i]->isList()) { const char *str = s[i]->c_str(); const char *eq = strchr(str, '='); @@ -764,7 +764,7 @@ private: } size_t i = 1; ret->offset = 0; - ret->align = 0; + ret->align = ret->bytes; while (!s[i]->isList()) { const char *str = s[i]->c_str(); const char *eq = strchr(str, '='); |