summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm-binary.cpp12
-rw-r--r--src/wasm/wasm-stack.cpp4
2 files changed, 0 insertions, 16 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index a61d47102..5a78bfc42 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -5772,12 +5772,8 @@ bool WasmBinaryBuilder::maybeVisitRefTest(Expression*& out, uint32_t code) {
if (code != BinaryConsts::RefTest) {
return false;
}
- auto heapType1 = getHeapType();
- auto heapType2 = getHeapType();
auto* rtt = popNonVoidExpression();
- validateHeapTypeUsingChild(rtt, heapType2);
auto* ref = popNonVoidExpression();
- validateHeapTypeUsingChild(ref, heapType1);
out = Builder(wasm).makeRefTest(ref, rtt);
return true;
}
@@ -5786,12 +5782,8 @@ bool WasmBinaryBuilder::maybeVisitRefCast(Expression*& out, uint32_t code) {
if (code != BinaryConsts::RefCast) {
return false;
}
- auto heapType1 = getHeapType();
- auto heapType2 = getHeapType();
auto* rtt = popNonVoidExpression();
- validateHeapTypeUsingChild(rtt, heapType2);
auto* ref = popNonVoidExpression();
- validateHeapTypeUsingChild(ref, heapType1);
out = Builder(wasm).makeRefCast(ref, rtt);
return true;
}
@@ -5801,8 +5793,6 @@ bool WasmBinaryBuilder::maybeVisitBrOnCast(Expression*& out, uint32_t code) {
return false;
}
auto name = getBreakTarget(getU32LEB()).name;
- // TODO the spec has two heaptype immediates, but the V8 prototype does not;
- // match V8 for now.
auto* rtt = popNonVoidExpression();
if (!rtt->type.isRtt()) {
throwError("bad rtt for br_on_cast");
@@ -5825,8 +5815,6 @@ bool WasmBinaryBuilder::maybeVisitRttSub(Expression*& out, uint32_t code) {
if (code != BinaryConsts::RttSub) {
return false;
}
- // TODO the spec has two heaptype immediates, but the V8 prototype does not;
- // match that for now.
auto targetHeapType = getHeapType();
auto* parent = popNonVoidExpression();
out = Builder(wasm).makeRttSub(targetHeapType, parent);
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp
index 81858d003..8a5726f1f 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -1968,14 +1968,10 @@ void BinaryInstWriter::visitCallRef(CallRef* curr) {
void BinaryInstWriter::visitRefTest(RefTest* curr) {
o << int8_t(BinaryConsts::GCPrefix) << U32LEB(BinaryConsts::RefTest);
- parent.writeHeapType(curr->ref->type.getHeapType());
- parent.writeHeapType(curr->getCastType().getHeapType());
}
void BinaryInstWriter::visitRefCast(RefCast* curr) {
o << int8_t(BinaryConsts::GCPrefix) << U32LEB(BinaryConsts::RefCast);
- parent.writeHeapType(curr->ref->type.getHeapType());
- parent.writeHeapType(curr->getCastType().getHeapType());
}
void BinaryInstWriter::visitBrOnCast(BrOnCast* curr) {