blob: bca0c39b8d4bf722fd9a75500bf4868f0b71e924 [file] [log] [blame]
(module
(type $none_=>_none (func))
(type $i32_=>_none (func (param i32)))
(type $i64_=>_none (func (param i64)))
(type $i32_i64_=>_none (func (param i32 i64)))
(type $eqref_=>_none (func (param eqref)))
(tag $e-i32 (param i32))
(tag $e-i64 (param i64))
(tag $e-i32-i64 (param i32 i64))
(tag $e-eqref (param eqref))
(tag $e-empty (param))
(func $foo (type $none_=>_none)
(nop)
)
(func $bar (type $none_=>_none)
(nop)
)
(func $eh-test (type $none_=>_none)
(local $x (i32 i64))
(try $try
(do
(throw $e-i32
(i32.const 0)
)
)
(catch $e-i32
(drop
(pop i32)
)
)
)
(try $try0
(do
(throw $e-i32-i64
(i32.const 0)
(i64.const 0)
)
)
(catch $e-i32-i64
(local.set $x
(pop i32 i64)
)
(drop
(tuple.extract 0
(local.get $x)
)
)
)
)
(block $l11
(try $l1
(do
(br $l11)
)
(catch $e-i32
(drop
(pop i32)
)
(br $l11)
)
)
)
(try $try2
(do
(nop)
)
(catch $e-i32
(drop
(pop i32)
)
)
)
(try $try3
(do
(call $foo)
(call $bar)
)
(catch $e-i32
(drop
(pop i32)
)
(call $foo)
(call $bar)
)
)
(try $try4
(do
(throw $e-i32
(i32.const 0)
)
)
(catch $e-i32
(drop
(pop i32)
)
)
(catch $e-i64
(drop
(pop i64)
)
)
)
(try $try5
(do
(throw $e-i32
(i32.const 0)
)
)
(catch_all
(nop)
)
)
(try $try6
(do
(throw $e-i32
(i32.const 0)
)
)
(catch $e-i32
(drop
(pop i32)
)
)
(catch $e-i64
(drop
(pop i64)
)
)
(catch_all
(call $foo)
(call $bar)
)
)
(try $try7
(do
(try $try8
(do
(throw $e-i32
(i32.const 0)
)
)
(catch $e-i32
(drop
(pop i32)
)
)
(catch_all
(nop)
)
)
)
(catch $e-i32
(drop
(pop i32)
)
)
(catch_all
(try $try9
(do
(throw $e-i32
(i32.const 0)
)
)
(catch $e-i32
(drop
(pop i32)
)
)
(catch_all
(nop)
)
)
)
)
(try $try10
(do
(throw $e-i32
(i32.const 0)
)
)
)
)
(func $delegate-test (type $none_=>_none)
(try $l0
(do
(try $try
(do
(call $foo)
)
(delegate $l0)
)
(try $try11
(do
(call $foo)
)
(delegate $l0)
)
)
(catch_all
(nop)
)
)
(block $l015
(try $l012
(do
(try $try13
(do
(br_if $l015
(i32.const 1)
)
)
(delegate $l012)
)
(try $try14
(do
(br_if $l015
(i32.const 1)
)
)
(delegate $l012)
)
)
(catch_all
(nop)
)
)
)
(try $l016
(do
(try $try17
(do
(call $foo)
)
(delegate $l016)
)
)
(delegate 0)
)
(try $try18
(do
(nop)
)
(catch $e-empty
(nop)
)
)
)
(func $rethrow-test (type $none_=>_none)
(try $l0
(do
(call $foo)
)
(catch $e-i32
(drop
(pop i32)
)
(rethrow $l0)
)
(catch_all
(rethrow $l0)
)
)
(block $l020
(try $l019
(do
(call $foo)
)
(catch $e-i32
(drop
(pop i32)
)
(rethrow $l019)
)
(catch_all
(br $l020)
)
)
)
(try $l021
(do
(call $foo)
)
(catch_all
(try $try
(do
(call $foo)
)
(catch $e-i32
(drop
(pop i32)
)
(rethrow $l021)
)
(catch_all
(rethrow $l021)
)
)
)
)
(try $l022
(do
(call $foo)
)
(catch_all
(try $try23
(do
(call $foo)
)
(catch $e-i32
(drop
(pop i32)
)
(block $b0
(rethrow $l022)
)
)
(catch_all
(block $b1
(rethrow $l022)
)
)
)
)
)
(try $l024
(do
(call $foo)
)
(catch_all
(try $try25
(do
(rethrow $l024)
)
(catch_all
(nop)
)
)
)
)
(try $l026
(do
(call $foo)
)
(catch_all
(try $try27
(do
(rethrow $l026)
)
(catch_all
(nop)
)
)
)
)
)
(func $pop-test (type $none_=>_none)
(try $try
(do
(nop)
)
(catch $e-i32
(throw $e-i32
(if (result i32)
(pop i32)
(i32.const 0)
(i32.const 3)
)
)
)
)
(try $try28
(do
(nop)
)
(catch $e-eqref
(drop
(pop anyref)
)
)
)
)
(func $catchless-try-with-inner-delegate (type $none_=>_none)
(try $label$0
(do
(try $try
(do
(throw $e-i32
(i32.const 0)
)
)
(delegate $label$0)
)
)
)
)
(func $nested-block-and-try (type $none_=>_none)
(block $l0
(block $l1
)
(try $try
(do
(nop)
)
(delegate 1)
)
)
(nop)
)
)