summaryrefslogtreecommitdiff
path: root/test/exception-handling.wast.from-wast
blob: 7c431a89f732d50054d22bfc6f7d64a21698305c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
(module
 (type $FUNCSIG$ee (func (param exnref) (result exnref)))
 (type $FUNCSIG$v (func))
 (type $FUNCSIG$vi (func (param i32)))
 (event $e0 (attr 0) (param i32))
 (func $exnref_test (; 0 ;) (type $FUNCSIG$ee) (param $0 exnref) (result exnref)
  (local.get $0)
 )
 (func $eh_test (; 1 ;) (type $FUNCSIG$v)
  (local $exn exnref)
  (try
   (throw $e0
    (i32.const 0)
   )
   (catch
    (local.set $exn
     (exnref.pop)
    )
    (drop
     (block $l0 (result i32)
      (rethrow
       (br_on_exn $l0 $e0
        (local.get $exn)
       )
      )
     )
    )
   )
  )
  (block $l1
   (try
    (br $l1)
    (catch
     (br $l1)
    )
   )
  )
  (try
   (nop)
   (catch
    (drop
     (exnref.pop)
    )
   )
  )
 )
)