From 4056443a5c926ac009b455bf6774445edb6050ba Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 4 Dec 2019 13:04:57 -0800 Subject: Remove 'none' type as a branch target in ReFinalize (#2492) That was needed for super-old wasm type system, where we allowed (block $x (br_if $x (unreachable) (nop) ) ) That is, we differentiated "taken" branches from "named" ones (just referred to by name, but not actually taken as it's in unreachable code). We don't need to differentiate those any more. Remove the ReFinalize code that considered it, and also remove the named/taken distinction in other places. --- src/wasm/wasm-s-parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wasm/wasm-s-parser.cpp') diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 44b08f4a3..24a4fcb35 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -1593,7 +1593,7 @@ Expression* SExpressionWasmBuilder::makeIf(Element& s) { ret->finalize(type); nameMapper.popLabelName(label); // create a break target if we must - if (BranchUtils::BranchSeeker::hasNamed(ret, label)) { + if (BranchUtils::BranchSeeker::has(ret, label)) { auto* block = allocator.alloc(); block->name = label; block->list.push_back(ret); @@ -1798,7 +1798,7 @@ Expression* SExpressionWasmBuilder::makeTry(Element& s) { ret->finalize(type); nameMapper.popLabelName(label); // create a break target if we must - if (BranchUtils::BranchSeeker::hasNamed(ret, label)) { + if (BranchUtils::BranchSeeker::has(ret, label)) { auto* block = allocator.alloc(); block->name = label; block->list.push_back(ret); -- cgit v1.2.3