diff options
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 22 | ||||
-rw-r--r-- | src/wasm/wasm-stack.cpp | 14 |
2 files changed, 0 insertions, 36 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 72f99c033..518a809fa 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -4041,12 +4041,6 @@ BinaryConsts::ASTNodes WasmBinaryBuilder::readExpression(Expression*& curr) { if (maybeVisitStringSliceIter(curr, opcode)) { break; } - if (opcode == BinaryConsts::RefIsFunc || - opcode == BinaryConsts::RefIsI31) { - visitRefIs((curr = allocator.alloc<RefTest>())->cast<RefTest>(), - opcode); - break; - } if (opcode == BinaryConsts::RefAsFunc || opcode == BinaryConsts::RefAsI31) { visitRefAsCast((curr = allocator.alloc<RefCast>())->cast<RefCast>(), @@ -6618,22 +6612,6 @@ void WasmBinaryBuilder::visitRefIsNull(RefIsNull* curr) { curr->finalize(); } -void WasmBinaryBuilder::visitRefIs(RefTest* curr, uint8_t code) { - BYN_TRACE("zz node: RefIs\n"); - switch (code) { - case BinaryConsts::RefIsFunc: - curr->castType = Type(HeapType::func, NonNullable); - break; - case BinaryConsts::RefIsI31: - curr->castType = Type(HeapType::i31, NonNullable); - break; - default: - WASM_UNREACHABLE("invalid code for ref.is_*"); - } - curr->ref = popNonVoidExpression(); - curr->finalize(); -} - void WasmBinaryBuilder::visitRefFunc(RefFunc* curr) { BYN_TRACE("zz node: RefFunc\n"); Index index = getU32LEB(); diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index b0e78c22e..d6420ed43 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -2010,20 +2010,6 @@ void BinaryInstWriter::visitCallRef(CallRef* curr) { void BinaryInstWriter::visitRefTest(RefTest* curr) { o << int8_t(BinaryConsts::GCPrefix); - // TODO: These instructions are deprecated. Remove them. - if (auto type = curr->castType.getHeapType(); - curr->castType.isNonNullable() && type.isBasic()) { - switch (type.getBasic()) { - case HeapType::func: - o << U32LEB(BinaryConsts::RefIsFunc); - return; - case HeapType::i31: - o << U32LEB(BinaryConsts::RefIsI31); - return; - default: - break; - } - } if (curr->castType.isNullable()) { o << U32LEB(BinaryConsts::RefTestNull); } else { |