| (module |
| (type $none_=>_none (func)) |
| (type $i32_=>_none (func (param i32))) |
| (type $externref_=>_none (func (param externref))) |
| (type $exnref_=>_exnref (func (param exnref) (result exnref))) |
| (event $event$0 (attr 0) (param i32)) |
| (event $event$1 (attr 0) (param externref)) |
| (func $exnref_test (param $0 exnref) (result exnref) |
| (local.get $0) |
| ) |
| (func $foo |
| (nop) |
| ) |
| (func $bar |
| (nop) |
| ) |
| (func $eh_test |
| (local $0 exnref) |
| (try |
| (do |
| (throw $event$0 |
| (i32.const 0) |
| ) |
| ) |
| (catch |
| (local.set $0 |
| (exnref.pop) |
| ) |
| (drop |
| (block $label$3 (result i32) |
| (rethrow |
| (br_on_exn $label$3 $event$0 |
| (local.get $0) |
| ) |
| ) |
| ) |
| ) |
| ) |
| ) |
| (block $label$4 |
| (try |
| (do |
| (br $label$4) |
| ) |
| (catch |
| (drop |
| (exnref.pop) |
| ) |
| (br $label$4) |
| ) |
| ) |
| ) |
| (try |
| (do |
| (nop) |
| ) |
| (catch |
| (drop |
| (exnref.pop) |
| ) |
| ) |
| ) |
| (try |
| (do |
| (call $foo) |
| (call $bar) |
| ) |
| (catch |
| (drop |
| (exnref.pop) |
| ) |
| (call $foo) |
| (call $bar) |
| ) |
| ) |
| ) |
| (func $subtype_test |
| (try |
| (do |
| (nop) |
| ) |
| (catch |
| (drop |
| (exnref.pop) |
| ) |
| (drop |
| (block $label$3 (result i32) |
| (rethrow |
| (br_on_exn $label$3 $event$0 |
| (ref.null) |
| ) |
| ) |
| ) |
| ) |
| ) |
| ) |
| (throw $event$1 |
| (ref.null) |
| ) |
| ) |
| ) |
| |