summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 4bcc042a1..0d74d43f1 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2172,9 +2172,10 @@ struct PrintExpressionContents
printMedium(o, "br_on_cast ");
printName(curr->name, o);
o << ' ';
- printType(o, curr->ref->type, wasm);
- o << ' ';
- printType(o, curr->castType, wasm);
+ if (curr->castType.isNullable()) {
+ printMedium(o, "null ");
+ }
+ printHeapType(o, curr->castType.getHeapType(), wasm);
return;
case BrOnCastFail:
// TODO: These instructions are deprecated, so stop emitting them.
@@ -2196,9 +2197,10 @@ struct PrintExpressionContents
printMedium(o, "br_on_cast_fail ");
printName(curr->name, o);
o << ' ';
- printType(o, curr->ref->type, wasm);
- o << ' ';
- printType(o, curr->castType, wasm);
+ if (curr->castType.isNullable()) {
+ printMedium(o, "null ");
+ }
+ printHeapType(o, curr->castType.getHeapType(), wasm);
return;
}
WASM_UNREACHABLE("Unexpected br_on* op");