diff options
author | Alon Zakai <azakai@google.com> | 2023-05-23 10:38:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-23 10:38:00 -0700 |
commit | e8ac658a5db2fadc93c3d317d465eed253e191ed (patch) | |
tree | 29a02aa1bea161be7c25713a5ae435f708b42b87 /src/passes/Print.cpp | |
parent | 5beebc6b249c6393e0dbf69f0ec2374eca5d387b (diff) | |
download | binaryen-e8ac658a5db2fadc93c3d317d465eed253e191ed.tar.gz binaryen-e8ac658a5db2fadc93c3d317d465eed253e191ed.tar.bz2 binaryen-e8ac658a5db2fadc93c3d317d465eed253e191ed.zip |
Revert "Update br_on_cast binary and text format (#5734)" (#5740)
This reverts commit b7b1d0df29df14634d2c680d1d2c351b624b4fbb.
See comment at the end of #5734: It turns out that dropping the old opcodes causes
problems for current users, so let's revert this for now, and later we can figure out
how best to do the update.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 14 |
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"); |