diff options
author | Thomas Lively <tlively@google.com> | 2023-08-02 14:33:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 11:33:07 -0700 |
commit | 1db7a94a50a4317d705568218cf0221f8cff5994 (patch) | |
tree | b71117cad1ebcd13822e1a0bf17bb58b53d6e909 /src/passes/Print.cpp | |
parent | 465ebbf470e878cac6cf7a9629c413add97f9bb9 (diff) | |
download | binaryen-1db7a94a50a4317d705568218cf0221f8cff5994.tar.gz binaryen-1db7a94a50a4317d705568218cf0221f8cff5994.tar.bz2 binaryen-1db7a94a50a4317d705568218cf0221f8cff5994.zip |
[Wasm GC] Stop printing deprecated cast etc. instructions (#5852)
Stop printing `ref.as_i31`, `br_on_func`, etc. because they have been removed
from the spec and are no longer supported by V8. #5614 already made this change
for the binary format. Like that PR, leave reading unmodified in case someone is
still using these instructions (even though they are useless). They will be
fully removed in a future PR as we finalize things ahead of standardizing
WasmGC.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index e9facd5a9..6740bc8ed 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2092,20 +2092,6 @@ struct PrintExpressionContents printHeapType(o, curr->target->type.getHeapType(), wasm); } void visitRefTest(RefTest* curr) { - // TODO: These instructions are deprecated. Remove them. - if (auto type = curr->castType.getHeapType(); - curr->castType.isNonNullable() && type.isBasic()) { - switch (type.getBasic()) { - case HeapType::func: - printMedium(o, "ref.is_func"); - return; - case HeapType::i31: - printMedium(o, "ref.is_i31"); - return; - default: - break; - } - } printMedium(o, "ref.test "); if (curr->castType.isNullable()) { printMedium(o, "null "); @@ -2119,20 +2105,6 @@ struct PrintExpressionContents if (curr->safety == RefCast::Unsafe) { printMedium(o, "ref.cast_nop "); } else { - // TODO: These instructions are deprecated. Remove them. - if (auto type = curr->type.getHeapType(); - type.isBasic() && curr->type.isNonNullable()) { - switch (type.getBasic()) { - case HeapType::func: - printMedium(o, "ref.as_func"); - return; - case HeapType::i31: - printMedium(o, "ref.as_i31"); - return; - default: - break; - } - } if (curr->type.isNullable()) { printMedium(o, "ref.cast null "); } else { @@ -2153,22 +2125,6 @@ struct PrintExpressionContents printName(curr->name, o); return; case BrOnCast: - // TODO: These instructions are deprecated, so stop emitting them. - if (auto type = curr->castType.getHeapType(); - type.isBasic() && curr->castType.isNonNullable()) { - switch (type.getBasic()) { - case HeapType::func: - printMedium(o, "br_on_func "); - printName(curr->name, o); - return; - case HeapType::i31: - printMedium(o, "br_on_i31 "); - printName(curr->name, o); - return; - default: - break; - } - } printMedium(o, "br_on_cast "); printName(curr->name, o); o << ' '; @@ -2177,22 +2133,6 @@ struct PrintExpressionContents printType(o, curr->castType, wasm); return; case BrOnCastFail: - // TODO: These instructions are deprecated, so stop emitting them. - if (auto type = curr->castType.getHeapType(); - type.isBasic() && curr->castType.isNonNullable()) { - switch (type.getBasic()) { - case HeapType::func: - printMedium(o, "br_on_non_func "); - printName(curr->name, o); - return; - case HeapType::i31: - printMedium(o, "br_on_non_i31 "); - printName(curr->name, o); - return; - default: - break; - } - } printMedium(o, "br_on_cast_fail "); printName(curr->name, o); o << ' '; |