diff options
author | Derek Schuff <dschuff@chromium.org> | 2016-09-28 17:38:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-28 17:38:44 -0700 |
commit | 2234cc7374797d188761916f6b1e82ce9ade1fa3 (patch) | |
tree | 293a9ddc5392b4a8ce7fdfaf48b9071463433c47 /src/passes/Print.cpp | |
parent | 345b04253dcf7d42dcefabdec4e4b0edc3a3ca44 (diff) | |
download | binaryen-2234cc7374797d188761916f6b1e82ce9ade1fa3.tar.gz binaryen-2234cc7374797d188761916f6b1e82ce9ade1fa3.tar.bz2 binaryen-2234cc7374797d188761916f6b1e82ce9ade1fa3.zip |
Print the name of memory along with size (#720)
Otherwise when we export it as "$0" it's an undefined name.
The spec interpreter actually rejects this, although I think it's
intended to work, given the tests in export.wast. wabt also accepts it.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index c3ca4021e..572732275 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -645,6 +645,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> { } void printMemoryHeader(Memory* curr) { printOpening(o, "memory") << ' '; + printName(curr->name) << ' '; o << curr->initial; if (curr->max && curr->max != Memory::kMaxSize) o << ' ' << curr->max; o << ")"; |