From 591914d8de144cf76432e6fec7dbfb510366cabb Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 6 Jan 2020 13:04:11 -0800 Subject: Allow subtype in throw instruction (#2568) This allows subtype for arguments of `throw`. This also renames `shouldBeSubTypeOrUnreachable` to `shouldBeSubTypeOrFirstIsUnreachable`, to be consistent with `shouldBeEqualOrFirstIsUnreachable`. --- test/exception-handling.wast.fromBinary | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/exception-handling.wast.fromBinary') diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary index 369b17dd9..b5aba7e15 100644 --- a/test/exception-handling.wast.fromBinary +++ b/test/exception-handling.wast.fromBinary @@ -1,8 +1,10 @@ (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $anyref_=>_none (func (param anyref))) (type $exnref_=>_exnref (func (param exnref) (result exnref))) (event $event$0 (attr 0) (param i32)) + (event $event$1 (attr 0) (param anyref)) (func $exnref_test (; 0 ;) (param $0 exnref) (result exnref) (local.get $0) ) @@ -84,6 +86,9 @@ ) ) ) + (throw $event$1 + (ref.null) + ) ) ) -- cgit v1.2.3