summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-08-09 17:18:13 -0400
committerGitHub <noreply@github.com>2023-08-09 21:18:13 +0000
commitc003a01aa855bfa1377237eb2ce788b9fa96e839 (patch)
tree454d2b6de36ea56de5d3e310d81f02155aa73db1 /src/passes/Print.cpp
parentd0bdf202463323a0b9f3be95fe2c64765a84a4b7 (diff)
downloadbinaryen-c003a01aa855bfa1377237eb2ce788b9fa96e839.tar.gz
binaryen-c003a01aa855bfa1377237eb2ce788b9fa96e839.tar.bz2
binaryen-c003a01aa855bfa1377237eb2ce788b9fa96e839.zip
Remove legacy WasmGC instructions (#5861)
Remove old, experimental instructions and type encodings that will not be shipped as part of WasmGC. Updating the encodings and text format to match the final spec is left as future work.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 6740bc8ed..dee23d67d 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2102,14 +2102,10 @@ struct PrintExpressionContents
if (printUnreachableReplacement(curr)) {
return;
}
- if (curr->safety == RefCast::Unsafe) {
- printMedium(o, "ref.cast_nop ");
+ if (curr->type.isNullable()) {
+ printMedium(o, "ref.cast null ");
} else {
- if (curr->type.isNullable()) {
- printMedium(o, "ref.cast null ");
- } else {
- printMedium(o, "ref.cast ");
- }
+ printMedium(o, "ref.cast ");
}
printHeapType(o, curr->type.getHeapType(), wasm);
}