summaryrefslogtreecommitdiff
path: root/src/cfg/Relooper.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-02-16 14:27:23 -0800
committerGitHub <noreply@github.com>2017-02-16 14:27:23 -0800
commit5e29a613bb8bf059f5f7b9ec2f166f8d2e413ac5 (patch)
tree64eb41cbef50830367255672091c62fd10724ce2 /src/cfg/Relooper.cpp
parent97077693a6458d51bd5b3dc85187d5a4bd16c3ee (diff)
downloadbinaryen-5e29a613bb8bf059f5f7b9ec2f166f8d2e413ac5.tar.gz
binaryen-5e29a613bb8bf059f5f7b9ec2f166f8d2e413ac5.tar.bz2
binaryen-5e29a613bb8bf059f5f7b9ec2f166f8d2e413ac5.zip
Fix emitting of unreachable block/if/loop (#911)
* an unreachable block is one with an unreachable child, plus no breaks * document new difference between binaryen IR and wasm * fix relooper missing finalize * add a bunch of tests * don't assume that test/*.wast files print to themselves exactly; print to from.wast. this allows wast tests with comments in them * emit unreachable blocks as (block .. unreachable) unreachable * if without else and unreachable ifTrue is still not unreachable, it should be none * update wasm.js * cleanups * empty blocks have none type
Diffstat (limited to 'src/cfg/Relooper.cpp')
-rw-r--r--src/cfg/Relooper.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cfg/Relooper.cpp b/src/cfg/Relooper.cpp
index d412c7b31..f6250b888 100644
--- a/src/cfg/Relooper.cpp
+++ b/src/cfg/Relooper.cpp
@@ -90,6 +90,7 @@ static wasm::Expression* HandleFollowupMultiples(wasm::Expression* Ret, Shape* P
}
}
}
+ Curr->finalize();
return Curr;
}