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