summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-03-01 22:08:35 +0000
committerGitHub <noreply@github.com>2021-03-01 14:08:35 -0800
commit101aac786ccffe3714fdcf05437b2b740135b4de (patch)
tree9d94a1148a82e73aac75c2014b1b25cf048d9398 /src/wasm/wasm-binary.cpp
parent4057747ddd1506924121a9cd3dc60496809b842d (diff)
downloadbinaryen-101aac786ccffe3714fdcf05437b2b740135b4de.tar.gz
binaryen-101aac786ccffe3714fdcf05437b2b740135b4de.tar.bz2
binaryen-101aac786ccffe3714fdcf05437b2b740135b4de.zip
[Wasm GC] Add test/spec/br_on_null.wast and validation fixes for it (#3623)
This adds ValidationBuilder which can allow sharing of builder code that also validates, between the text and binary parsers. In general we share that code in the validator, but the validator can only run once IR exists, and in some cases we can't even emit valid IR structure at all.
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index ebc5888a0..c0d7ab36e 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -6193,7 +6193,7 @@ bool WasmBinaryBuilder::maybeVisitBrOn(Expression*& out, uint32_t code) {
rtt = popNonVoidExpression();
}
auto* ref = popNonVoidExpression();
- out = Builder(wasm).makeBrOn(op, name, ref, rtt);
+ out = ValidatingBuilder(wasm, pos).validateAndMakeBrOn(op, name, ref, rtt);
return true;
}