diff options
author | Alon Zakai <azakai@google.com> | 2021-03-01 22:08:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 14:08:35 -0800 |
commit | 101aac786ccffe3714fdcf05437b2b740135b4de (patch) | |
tree | 9d94a1148a82e73aac75c2014b1b25cf048d9398 /src/wasm/wasm-binary.cpp | |
parent | 4057747ddd1506924121a9cd3dc60496809b842d (diff) | |
download | binaryen-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.cpp | 2 |
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; } |