diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-02-16 14:27:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-16 14:27:23 -0800 |
commit | 5e29a613bb8bf059f5f7b9ec2f166f8d2e413ac5 (patch) | |
tree | 64eb41cbef50830367255672091c62fd10724ce2 /test/example/c-api-unused-mem.txt | |
parent | 97077693a6458d51bd5b3dc85187d5a4bd16c3ee (diff) | |
download | binaryen-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 'test/example/c-api-unused-mem.txt')
-rw-r--r-- | test/example/c-api-unused-mem.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/example/c-api-unused-mem.txt b/test/example/c-api-unused-mem.txt index cae196ea7..52742f476 100644 --- a/test/example/c-api-unused-mem.txt +++ b/test/example/c-api-unused-mem.txt @@ -46,7 +46,7 @@ (call $main) ) ) -195 +207 (module (type $0 (func)) (type $1 (func)) @@ -67,7 +67,9 @@ ) (block $label$2 (br $label$1) + (unreachable) ) + (unreachable) ) (block $label$3 (block $label$4 @@ -75,7 +77,9 @@ ) (block $label$6 (br $label$4) + (unreachable) ) + (unreachable) ) (block $label$7 (block $label$8 @@ -84,10 +88,18 @@ (get_local $var$0) ) (return) + (unreachable) ) + (unreachable) + (unreachable) ) + (unreachable) + (unreachable) ) + (unreachable) + (unreachable) ) + (unreachable) ) (func $__wasm_start (type $1) (block $label$0 |