summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/DeadCodeElimination.cpp2
-rw-r--r--src/passes/MergeBlocks.cpp2
-rw-r--r--src/passes/Print.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/passes/DeadCodeElimination.cpp b/src/passes/DeadCodeElimination.cpp
index af06439c0..209180e23 100644
--- a/src/passes/DeadCodeElimination.cpp
+++ b/src/passes/DeadCodeElimination.cpp
@@ -68,7 +68,7 @@ struct DeadCodeElimination : public WalkerPass<PostWalker<DeadCodeElimination>>
// we normally have already reduced unreachable code into (unreachable)
// nodes, so we would not get to this function at all anyhow, the breaking
// instruction itself would be removed. However, an exception are things
- // like (block i32 (call $x) (unreachable)) , which has type i32
+ // like (block (result i32) (call $x) (unreachable)) , which has type i32
// despite not being exited.
// TODO: optimize such cases
if (reachable) {
diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp
index 48101e295..1ec8843d6 100644
--- a/src/passes/MergeBlocks.cpp
+++ b/src/passes/MergeBlocks.cpp
@@ -225,7 +225,7 @@ struct MergeBlocks : public WalkerPass<PostWalker<MergeBlocks>> {
if (!block->name.is() && block->list.size() >= 2) {
child = block->list.back();
// we modified child (which is a reference to a pointer), which modifies curr, which might change its type
- // (e.g. (drop (block i32 .. (unreachable)))
+ // (e.g. (drop (block (result i32) .. (unreachable)))
// the child was a block of i32, and is being replaced with an unreachable, so the
// parent will likely need to be unreachable too
auto oldType = curr->type;
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 95f60e5e2..340266fcf 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -134,7 +134,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> {
printName(curr->name);
}
if (isConcreteWasmType(curr->type)) {
- o << ' ' << printWasmType(curr->type);
+ o << " (result " << printWasmType(curr->type) << ')';
}
incIndent();
if (curr->list.size() > 0 && curr->list[0]->is<Block>()) {
@@ -165,7 +165,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> {
void visitIf(If *curr) {
printOpening(o, "if");
if (isConcreteWasmType(curr->type)) {
- o << ' ' << printWasmType(curr->type);
+ o << " (result " << printWasmType(curr->type) << ')';
}
incIndent();
printFullLine(curr->condition);
@@ -190,7 +190,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> {
o << ' ' << curr->name;
}
if (isConcreteWasmType(curr->type)) {
- o << ' ' << printWasmType(curr->type);
+ o << " (result " << printWasmType(curr->type) << ')';
}
incIndent();
auto block = curr->body->dynCast<Block>();