| 1 |
(module |
| 2 |
(type (;0;) (func)) |
| 3 |
(type (;1;) (func (param i32))) |
| 4 |
(type (;2;) (func (param f32))) |
| 5 |
(type (;3;) (func (param i64))) |
| 6 |
(type (;4;) (func (param f64))) |
| 7 |
(type (;5;) (func (param i32 i32))) |
| 8 |
(type (;6;) (func (param i32) (result i32))) |
| 9 |
(type (;7;) (func (result i32 i32))) |
| 10 |
(tag $e0 (;0;) (type 0)) |
| 11 |
(tag $e-i32 (;1;) (type 1) (param i32)) |
| 12 |
(tag $e-f32 (;2;) (type 2) (param f32)) |
| 13 |
(tag $e-i64 (;3;) (type 3) (param i64)) |
| 14 |
(tag $e-f64 (;4;) (type 4) (param f64)) |
| 15 |
(tag $e-i32-i32 (;5;) (type 5) (param i32 i32)) |
| 16 |
(export "throw-if" (func $throw-if)) |
| 17 |
(export "throw-param-f32" (func 1)) |
| 18 |
(export "throw-param-i64" (func 2)) |
| 19 |
(export "throw-param-f64" (func 3)) |
| 20 |
(export "throw-polymorphic" (func 4)) |
| 21 |
(export "throw-polymorphic-block" (func 5)) |
| 22 |
(export "test-throw-1-2" (func 7)) |
| 23 |
(func $throw-if (;0;) (type 6) (param i32) (result i32) |
| 24 |
local.get 0 |
| 25 |
i32.const 0 |
| 26 |
i32.ne |
| 27 |
if ;; label = @1 |
| 28 |
throw $e0 |
| 29 |
end |
| 30 |
i32.const 0 |
| 31 |
) |
| 32 |
(func (;1;) (type 2) (param f32) |
| 33 |
local.get 0 |
| 34 |
throw $e-f32 |
| 35 |
) |
| 36 |
(func (;2;) (type 3) (param i64) |
| 37 |
local.get 0 |
| 38 |
throw $e-i64 |
| 39 |
) |
| 40 |
(func (;3;) (type 4) (param f64) |
| 41 |
local.get 0 |
| 42 |
throw $e-f64 |
| 43 |
) |
| 44 |
(func (;4;) (type 0) |
| 45 |
throw $e0 |
| 46 |
throw $e-i32 |
| 47 |
) |
| 48 |
(func (;5;) (type 0) |
| 49 |
block (result i32) ;; label = @1 |
| 50 |
throw $e0 |
| 51 |
end |
| 52 |
throw $e-i32 |
| 53 |
) |
| 54 |
(func $throw-1-2 (;6;) (type 0) |
| 55 |
i32.const 1 |
| 56 |
i32.const 2 |
| 57 |
throw $e-i32-i32 |
| 58 |
) |
| 59 |
(func (;7;) (type 0) |
| 60 |
block $h (type 7) (result i32 i32) |
| 61 |
try_table (catch $e-i32-i32 $h) ;; label = @2 |
| 62 |
call $throw-1-2 |
| 63 |
end |
| 64 |
return |
| 65 |
end |
| 66 |
i32.const 2 |
| 67 |
i32.ne |
| 68 |
if ;; label = @1 |
| 69 |
unreachable |
| 70 |
end |
| 71 |
i32.const 1 |
| 72 |
i32.ne |
| 73 |
if ;; label = @1 |
| 74 |
unreachable |
| 75 |
end |
| 76 |
) |
| 77 |
) |