| 1 |
;; RUN: wast --assert default --snapshot tests/snapshots % -f stack-switching |
| 2 |
|
| 3 |
(module |
| 4 |
|
| 5 |
(type $int_to_int (func (param i32) (result i32))) |
| 6 |
(type $ft (func (param i32) (result i32))) |
| 7 |
(type $res_int_to_int (cont $int_to_int)) |
| 8 |
(type $f3_t (func (param i32) (result i32))) |
| 9 |
(type $f3_ct (cont $f3_t)) |
| 10 |
|
| 11 |
(tag $e3_int_to_int (param i32) (result i32)) |
| 12 |
|
| 13 |
(func $test_case_4 (export "test_case_4") (result i32) |
| 14 |
|
| 15 |
(block $on_e3 (result i32 (ref $res_int_to_int)) |
| 16 |
(resume $f3_ct (on $e3_int_to_int $on_e3) (i32.const 49) (ref.null $f3_ct)) |
| 17 |
(unreachable)) |
| 18 |
;; after on_e3, expected stack: [50 resumption] |
| 19 |
(unreachable) |
| 20 |
) |
| 21 |
) |