diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-10-09 13:40:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-09 13:40:06 -0700 |
commit | 13725e54f845ec84947130aaa888b4c11e53f9af (patch) | |
tree | 37284c425c6e2bf62d112b3fb299c03e3e7f73e2 /test/exception-handling.wast.fromBinary | |
parent | d0f538ef24853e88d97f9f1aee3baa6414ac2b13 (diff) | |
download | binaryen-13725e54f845ec84947130aaa888b4c11e53f9af.tar.gz binaryen-13725e54f845ec84947130aaa888b4c11e53f9af.tar.bz2 binaryen-13725e54f845ec84947130aaa888b4c11e53f9af.zip |
Make try body with multiple instructions roundtrip (#2374)
Previously we didn't print an additional block when there are multiple
instructions within a `try` body, so those wast files cannot be parsed
correctly, because the wast parser assumes there are two bodies within a
`try` scope: a try body and a catch body.
We don't need to print an additional block for a `catch` body because
`(catch ...)` itself serves as a scope.
Diffstat (limited to 'test/exception-handling.wast.fromBinary')
-rw-r--r-- | test/exception-handling.wast.fromBinary | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary index 1cff3d215..3151d1ea8 100644 --- a/test/exception-handling.wast.fromBinary +++ b/test/exception-handling.wast.fromBinary @@ -6,7 +6,13 @@ (func $exnref_test (; 0 ;) (type $0) (param $0 exnref) (result exnref) (local.get $0) ) - (func $eh_test (; 1 ;) (type $1) + (func $foo (; 1 ;) (type $1) + (nop) + ) + (func $bar (; 2 ;) (type $1) + (nop) + ) + (func $eh_test (; 3 ;) (type $1) (local $0 exnref) (try (throw $event$0 |