summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-01-22 15:53:53 +0000
committerGitHub <noreply@github.com>2021-01-22 07:53:53 -0800
commitd5fc674859ccd035c03b1085901dceb1c58cf911 (patch)
tree19be57f1d47b8095122e070ff18c6c5b963f5eee /src/wasm/wasm-binary.cpp
parent6d62e3c4be466888239a89c2e98713f60074aaea (diff)
downloadbinaryen-d5fc674859ccd035c03b1085901dceb1c58cf911.tar.gz
binaryen-d5fc674859ccd035c03b1085901dceb1c58cf911.tar.bz2
binaryen-d5fc674859ccd035c03b1085901dceb1c58cf911.zip
[GC] Update GC binary format for prototype v3 (#3507)
Some fields were removed, see https://docs.google.com/document/d/1yAWU3dbs8kUa_wcnnirDxUu9nEBsNfq0Xo90OWx6yuo/edit#
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp12
1 files changed, 0 insertions, 12 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);