diff options
author | Alon Zakai <azakai@google.com> | 2019-12-04 13:04:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-04 13:04:57 -0800 |
commit | 4056443a5c926ac009b455bf6774445edb6050ba (patch) | |
tree | 4b6c17d538bcfc1637289fc78bfb296da4aab482 /src/wasm/wasm-s-parser.cpp | |
parent | a2f1a6375a596b3dea6fa615f6ff544c368c3991 (diff) | |
download | binaryen-4056443a5c926ac009b455bf6774445edb6050ba.tar.gz binaryen-4056443a5c926ac009b455bf6774445edb6050ba.tar.bz2 binaryen-4056443a5c926ac009b455bf6774445edb6050ba.zip |
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.
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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>(); 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>(); block->name = label; block->list.push_back(ret); |