diff options
author | Abbas Mashayekh <martianboy2005@gmail.com> | 2021-04-07 00:03:35 +0430 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 12:33:35 -0700 |
commit | e9fcf44bdab39e1768e4fbd0cc6164eb4094901e (patch) | |
tree | 292df2586de9de459f9700b5038828218ceb884a /src/passes/Print.cpp | |
parent | 0c8c062f5ec2f11e5b6e17e692aeae0ef97cab89 (diff) | |
download | binaryen-e9fcf44bdab39e1768e4fbd0cc6164eb4094901e.tar.gz binaryen-e9fcf44bdab39e1768e4fbd0cc6164eb4094901e.tar.bz2 binaryen-e9fcf44bdab39e1768e4fbd0cc6164eb4094901e.zip |
[RT] Add type to tables and element segments (#3763)
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 5f8c9f163..929822309 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2619,7 +2619,8 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> { if (curr->hasMax()) { o << ' ' << curr->max; } - o << " funcref)"; + o << ' '; + printType(o, curr->type, currModule) << ')'; } void visitTable(Table* curr) { if (curr->imported()) { @@ -2656,9 +2657,9 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> { }); auto printElemType = [&]() { if (allElementsRefFunc) { - TypeNamePrinter(o, currModule).print(HeapType::func); + o << "func"; } else { - TypeNamePrinter(o, currModule).print(Type::funcref); + printType(o, curr->type, currModule); } }; @@ -2671,7 +2672,6 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> { } if (curr->table.is()) { - // TODO(reference-types): check for old-style based on the complete spec if (!allElementsRefFunc || currModule->tables.size() > 1) { // tableuse o << " (table "; |