diff options
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 33d817326..7bcf23b8e 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -3064,10 +3064,10 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> { printName(curr->name, o); } incIndent(); - std::vector<HeapType> types; - std::unordered_map<HeapType, Index> indices; - ModuleUtils::collectHeapTypes(*curr, types, indices); - for (auto type : types) { + // Use the same type order as the binary output would even though there is + // no code size benefit in the text format. + auto indexedTypes = ModuleUtils::getOptimizedIndexedHeapTypes(*curr); + for (auto type : indexedTypes.types) { doIndent(o, indent); o << '('; printMedium(o, "type") << ' '; |