| 1 |
(module |
| 2 |
(type $t (;0;) (func)) |
| 3 |
(type (;1;) (func (param (ref $t)))) |
| 4 |
(type (;2;) (func (result (ref null $t)))) |
| 5 |
(type (;3;) (func (result (ref null $t) (ref exn)))) |
| 6 |
(type (;4;) (func (result (ref null $t) exnref))) |
| 7 |
(tag $e (;0;) (type 1) (param (ref $t))) |
| 8 |
(export "catch" (func 2)) |
| 9 |
(export "catch_ref1" (func 3)) |
| 10 |
(export "catch_ref2" (func 4)) |
| 11 |
(export "catch_all_ref1" (func 5)) |
| 12 |
(export "catch_all_ref2" (func 6)) |
| 13 |
(elem (;0;) declare func $dummy) |
| 14 |
(func $dummy (;0;) (type $t)) |
| 15 |
(func $throw (;1;) (type $t) |
| 16 |
ref.func $dummy |
| 17 |
throw $e |
| 18 |
) |
| 19 |
(func (;2;) (type 2) (result (ref null $t)) |
| 20 |
block $l (result (ref null $t)) |
| 21 |
try_table (catch $e $l) ;; label = @2 |
| 22 |
call $throw |
| 23 |
end |
| 24 |
unreachable |
| 25 |
end |
| 26 |
) |
| 27 |
(func (;3;) (type 2) (result (ref null $t)) |
| 28 |
block $l (type 3) (result (ref null $t) (ref exn)) |
| 29 |
try_table (catch_ref $e $l) ;; label = @2 |
| 30 |
call $throw |
| 31 |
end |
| 32 |
unreachable |
| 33 |
end |
| 34 |
drop |
| 35 |
) |
| 36 |
(func (;4;) (type 2) (result (ref null $t)) |
| 37 |
block $l (type 4) (result (ref null $t) exnref) |
| 38 |
try_table (catch_ref $e $l) ;; label = @2 |
| 39 |
call $throw |
| 40 |
end |
| 41 |
unreachable |
| 42 |
end |
| 43 |
drop |
| 44 |
) |
| 45 |
(func (;5;) (type $t) |
| 46 |
block $l (result (ref exn)) |
| 47 |
try_table (catch_all_ref $l) ;; label = @2 |
| 48 |
call $throw |
| 49 |
end |
| 50 |
unreachable |
| 51 |
end |
| 52 |
drop |
| 53 |
) |
| 54 |
(func (;6;) (type $t) |
| 55 |
block $l (result exnref) |
| 56 |
try_table (catch_all_ref $l) ;; label = @2 |
| 57 |
call $throw |
| 58 |
end |
| 59 |
unreachable |
| 60 |
end |
| 61 |
drop |
| 62 |
) |
| 63 |
) |