| (module |
| (type $0 (func)) |
| (type $1 (func (param i32))) |
| (type $2 (func (param exnref) (result exnref))) |
| (event $event$0 (attr 0) (param i32)) |
| (func $exnref_test (; 0 ;) (type $2) (param $0 exnref) (result exnref) |
| (local.get $0) |
| ) |
| (func $foo (; 1 ;) (type $0) |
| (nop) |
| ) |
| (func $bar (; 2 ;) (type $0) |
| (nop) |
| ) |
| (func $eh_test (; 3 ;) (type $0) |
| (local $0 exnref) |
| (try |
| (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 |
| (br $label$4) |
| (catch |
| (drop |
| (exnref.pop) |
| ) |
| (br $label$4) |
| ) |
| ) |
| ) |
| (try |
| (nop) |
| (catch |
| (drop |
| (exnref.pop) |
| ) |
| ) |
| ) |
| (try |
| (block |
| (call $foo) |
| (call $bar) |
| ) |
| (catch |
| (drop |
| (exnref.pop) |
| ) |
| (call $foo) |
| (call $bar) |
| ) |
| ) |
| ) |
| ) |
| |