summaryrefslogtreecommitdiff
path: root/src/wasm-stack.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-12-04 13:04:57 -0800
committerGitHub <noreply@github.com>2019-12-04 13:04:57 -0800
commit4056443a5c926ac009b455bf6774445edb6050ba (patch)
tree4b6c17d538bcfc1637289fc78bfb296da4aab482 /src/wasm-stack.h
parenta2f1a6375a596b3dea6fa615f6ff544c368c3991 (diff)
downloadbinaryen-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-stack.h')
-rw-r--r--src/wasm-stack.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-stack.h b/src/wasm-stack.h
index 26105ccdc..7564fbcdb 100644
--- a/src/wasm-stack.h
+++ b/src/wasm-stack.h
@@ -237,7 +237,7 @@ template<typename SubType> void BinaryenIRWriter<SubType>::write() {
template<typename SubType>
void BinaryenIRWriter<SubType>::visitPossibleBlockContents(Expression* curr) {
auto* block = curr->dynCast<Block>();
- if (!block || BranchUtils::BranchSeeker::hasNamed(block, block->name)) {
+ if (!block || BranchUtils::BranchSeeker::has(block, block->name)) {
visit(curr);
return;
}