summaryrefslogtreecommitdiff
path: root/test/exception-handling.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/exception-handling.wast')
-rw-r--r--test/exception-handling.wast18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/exception-handling.wast b/test/exception-handling.wast
index d37cc322b..1a484f9ac 100644
--- a/test/exception-handling.wast
+++ b/test/exception-handling.wast
@@ -8,6 +8,9 @@
(func $foo)
(func $bar)
+ ;; ---------------------------------------------------------------------------
+ ;; Old Phase 3 exception handling
+
(func $eh-test (local $x (i32 i64))
;; Simple try-catch
(try
@@ -365,4 +368,19 @@
)
(nop)
)
+
+ ;; ---------------------------------------------------------------------------
+ ;; New exception handling
+
+ (func $exnref-test (result exnref) (local $exn exnref) (local $null-exn nullexnref)
+ (if (result exnref)
+ (i32.const 1)
+ (if (result nullexnref)
+ (i32.const 1)
+ (local.get $null-exn)
+ (ref.null noexn)
+ )
+ (local.get $exn)
+ )
+ )
)