From 63ddbc04cf75a45a05a2b1f11564563915ebdbec Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 11 Nov 2019 14:27:53 -0800 Subject: Fix catch parsing (#2428) - When a catch body is a block, call its `finalize` function with the correct type - Don't create a block when there's one instruction in a catch body - Remove `makeCatch` from gen-s-parser.py; it's not necessary - Fix a test case that has a `catch` without `try` --- test/exception-handling.wast.fromBinary | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'test/exception-handling.wast.fromBinary') diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary index 3151d1ea8..2317f4c42 100644 --- a/test/exception-handling.wast.fromBinary +++ b/test/exception-handling.wast.fromBinary @@ -44,7 +44,27 @@ ) ) ) - (unreachable) + (try + (nop) + (catch + (drop + (exnref.pop) + ) + ) + ) + (try + (block + (call $foo) + (call $bar) + ) + (catch + (drop + (exnref.pop) + ) + (call $foo) + (call $bar) + ) + ) ) ) -- cgit v1.2.3