From 3de8c98b682e1347e5c50c58eaddc4b01f3e26ab Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 11 May 2020 10:51:07 -0700 Subject: Make try body start with 'do' (#2846) In WebAssembly/exception-handling#52, We decided to put `try` bodies in a `do` clause to be more consistent with `catch`. - Before ```wast (try ... (catch ... ) ) ``` - After ```wast (try (do ... ) (catch ... ) ) ``` Another upside of this change is when there are multiple instructions within a `try` body, we no longer need to wrap them in a `block`. --- test/exception-handling.wast.fromBinary.noDebugInfo | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'test/exception-handling.wast.fromBinary.noDebugInfo') diff --git a/test/exception-handling.wast.fromBinary.noDebugInfo b/test/exception-handling.wast.fromBinary.noDebugInfo index 2c6f83c4d..97bda57c4 100644 --- a/test/exception-handling.wast.fromBinary.noDebugInfo +++ b/test/exception-handling.wast.fromBinary.noDebugInfo @@ -17,8 +17,10 @@ (func $3 (local $0 exnref) (try - (throw $event$0 - (i32.const 0) + (do + (throw $event$0 + (i32.const 0) + ) ) (catch (local.set $0 @@ -37,7 +39,9 @@ ) (block $label$4 (try - (br $label$4) + (do + (br $label$4) + ) (catch (drop (exnref.pop) @@ -47,7 +51,9 @@ ) ) (try - (nop) + (do + (nop) + ) (catch (drop (exnref.pop) @@ -55,7 +61,7 @@ ) ) (try - (block + (do (call $1) (call $2) ) @@ -70,7 +76,9 @@ ) (func $4 (try - (nop) + (do + (nop) + ) (catch (drop (exnref.pop) -- cgit v1.2.3