Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions test/core/stack-switching/cont.wast
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,33 @@
(type $c2 (cont $f2))
)

;; Test resume_throw used on the very first execution of a continuation (so the
;; code in the continuation function is never reached).
(module
(tag $exn)

(type $f (func))
(type $k (cont $f))

(func $never
(unreachable)
)

(func (export "resume_throw-never")
(block $handle
(try_table (catch $exn $handle)
(resume_throw $k $exn
(cont.new $k (ref.func $never))
)
)
)
)

(elem declare func $never)
)

(assert_return (invoke "resume_throw-never"))

;; Simple state example

(module $state
Expand Down