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/reference-types.wast.fromBinary | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'test/reference-types.wast.fromBinary') diff --git a/test/reference-types.wast.fromBinary b/test/reference-types.wast.fromBinary index 534dceff5..82ade2c15 100644 --- a/test/reference-types.wast.fromBinary +++ b/test/reference-types.wast.fromBinary @@ -309,7 +309,9 @@ ) (drop (try (result anyref) - (local.get $1) + (do + (local.get $1) + ) (catch (exnref.pop) ) @@ -317,7 +319,9 @@ ) (drop (try (result anyref) - (ref.func $foo) + (do + (ref.func $foo) + ) (catch (drop (exnref.pop) @@ -328,7 +332,9 @@ ) (drop (try (result funcref) - (ref.func $foo) + (do + (ref.func $foo) + ) (catch (drop (exnref.pop) @@ -339,7 +345,9 @@ ) (drop (try (result exnref) - (ref.null) + (do + (ref.null) + ) (catch (exnref.pop) ) @@ -347,7 +355,9 @@ ) (drop (try (result nullref) - (ref.null) + (do + (ref.null) + ) (catch (drop (exnref.pop) -- cgit v1.2.3