summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-stack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r--src/wasm/wasm-stack.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp
index d6420ed43..1d4e28116 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -2024,20 +2024,6 @@ void BinaryInstWriter::visitRefCast(RefCast* curr) {
o << U32LEB(BinaryConsts::RefCastNop);
parent.writeHeapType(curr->type.getHeapType());
} 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:
- o << U32LEB(BinaryConsts::RefAsFunc);
- return;
- case HeapType::i31:
- o << U32LEB(BinaryConsts::RefAsI31);
- return;
- default:
- break;
- }
- }
if (curr->type.isNullable()) {
o << U32LEB(BinaryConsts::RefCastNull);
} else {
@@ -2059,22 +2045,6 @@ void BinaryInstWriter::visitBrOn(BrOn* curr) {
return;
case BrOnCast:
o << int8_t(BinaryConsts::GCPrefix);
- // 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:
- o << U32LEB(BinaryConsts::BrOnFunc);
- o << U32LEB(getBreakIndex(curr->name));
- return;
- case HeapType::i31:
- o << U32LEB(BinaryConsts::BrOnI31);
- o << U32LEB(getBreakIndex(curr->name));
- return;
- default:
- break;
- }
- }
if (curr->castType.isNullable()) {
o << U32LEB(BinaryConsts::BrOnCastNull);
} else {
@@ -2085,22 +2055,6 @@ void BinaryInstWriter::visitBrOn(BrOn* curr) {
return;
case BrOnCastFail:
o << int8_t(BinaryConsts::GCPrefix);
- // 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:
- o << U32LEB(BinaryConsts::BrOnNonFunc);
- o << U32LEB(getBreakIndex(curr->name));
- return;
- case HeapType::i31:
- o << U32LEB(BinaryConsts::BrOnNonI31);
- o << U32LEB(getBreakIndex(curr->name));
- return;
- default:
- break;
- }
- }
if (curr->castType.isNullable()) {
o << U32LEB(BinaryConsts::BrOnCastFailNull);
} else {