From 101aac786ccffe3714fdcf05437b2b740135b4de Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 1 Mar 2021 22:08:35 +0000 Subject: [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. --- src/wasm/wasm-binary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wasm/wasm-binary.cpp') 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; } -- cgit v1.2.3