summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-04-27 10:43:21 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-04-27 16:59:17 -0700
commit127f9688cc26ab362dabadac5494af23cd78ac8b (patch)
tree14d88e021164cb784a7bb9d66bf9d0974c94c2cd /src/passes/Print.cpp
parent46f99e692014e714ffeed7f3db870ffd12bf077c (diff)
downloadbinaryen-127f9688cc26ab362dabadac5494af23cd78ac8b.tar.gz
binaryen-127f9688cc26ab362dabadac5494af23cd78ac8b.tar.bz2
binaryen-127f9688cc26ab362dabadac5494af23cd78ac8b.zip
allocate only expressions in arenas - functions, imports, exports, function types, can more simply be held by unique_ptrs on the owning module. this avoids need to coordinate arena allocation for their elements, and only the far more plentiful expression nodes are a perf factor anyhow
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index eb0a6d33b..256968bb7 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -522,17 +522,17 @@ struct PrintSExpression : public Visitor<PrintSExpression> {
}
for (auto& child : curr->functionTypes) {
doIndent(o, indent);
- visitFunctionType(child, true);
+ visitFunctionType(child.get(), true);
o << maybeNewLine;
}
for (auto& child : curr->imports) {
doIndent(o, indent);
- visitImport(child);
+ visitImport(child.get());
o << maybeNewLine;
}
for (auto& child : curr->exports) {
doIndent(o, indent);
- visitExport(child);
+ visitExport(child.get());
o << maybeNewLine;
}
if (curr->table.names.size() > 0) {
@@ -542,7 +542,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> {
}
for (auto& child : curr->functions) {
doIndent(o, indent);
- visitFunction(child);
+ visitFunction(child.get());
o << maybeNewLine;
}
decIndent();