(module (type (;0;) (func)) (type (;1;) (func (param i32) (result i32))) (type (;2;) (func (param exnref))) (tag $e0 (;0;) (type 0)) (tag $e1 (;1;) (type 0)) (export "catch-throw_ref-0" (func 0)) (export "catch-throw_ref-1" (func 1)) (export "catchall-throw_ref-0" (func 2)) (export "catchall-throw_ref-1" (func 3)) (export "throw_ref-nested" (func 4)) (export "throw_ref-recatch" (func 5)) (export "throw_ref-stack-polymorphism" (func 6)) (func (;0;) (type 0) block $h (result exnref) try_table (catch_ref $e0 $h) ;; label = @2 throw $e0 end unreachable end throw_ref ) (func (;1;) (type 1) (param i32) (result i32) block $h (result exnref) try_table (result i32) (catch_ref $e0 $h) ;; label = @2 throw $e0 end return end local.get 0 i32.eqz if (type 2) (param exnref) ;; label = @1 throw_ref else drop end i32.const 23 ) (func (;2;) (type 0) block $h (result exnref) try_table (result exnref) (catch_all_ref $h) ;; label = @2 throw $e0 end end throw_ref ) (func (;3;) (type 1) (param i32) (result i32) block $h (result exnref) try_table (result i32) (catch_all_ref $h) ;; label = @2 throw $e0 end return end local.get 0 i32.eqz if (type 2) (param exnref) ;; label = @1 throw_ref else drop end i32.const 23 ) (func (;4;) (type 1) (param i32) (result i32) (local $exn1 exnref) (local $exn2 exnref) block $h1 (result exnref) try_table (result i32) (catch_ref $e1 $h1) ;; label = @2 throw $e1 end return end local.set $exn1 block $h2 (result exnref) try_table (result i32) (catch_ref $e0 $h2) ;; label = @2 throw $e0 end return end local.set $exn2 local.get 0 i32.const 0 i32.eq if ;; label = @1 local.get $exn1 throw_ref end local.get 0 i32.const 1 i32.eq if ;; label = @1 local.get $exn2 throw_ref end i32.const 23 ) (func (;5;) (type 1) (param i32) (result i32) (local $e exnref) block $h1 (result exnref) try_table (result i32) (catch_ref $e0 $h1) ;; label = @2 throw $e0 end return end local.set $e block $h2 (result exnref) try_table (result i32) (catch_ref $e0 $h2) ;; label = @2 local.get 0 i32.eqz if ;; label = @3 local.get $e throw_ref end i32.const 42 end return end drop i32.const 23 ) (func (;6;) (type 0) (local $e exnref) block $h (result exnref) try_table (result f64) (catch_ref $e0 $h) ;; label = @2 throw $e0 end unreachable end local.set $e i32.const 1 local.get $e throw_ref ) )