We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c7c0cb commit 74c1ef6Copy full SHA for 74c1ef6
test/core/stack-switching/cont.wast
@@ -235,6 +235,33 @@
235
(type $c2 (cont $f2))
236
)
237
238
+;; Test resume_throw used on the very first execution of a continuation (so the
239
+;; code in the continuation function is never reached).
240
+(module
241
+ (tag $exn)
242
+
243
+ (type $f (func))
244
+ (type $k (cont $f))
245
246
+ (func $never
247
+ (unreachable)
248
+ )
249
250
+ (func (export "resume_throw-never")
251
+ (block $handle
252
+ (try_table (catch $exn $handle)
253
+ (resume_throw $k $exn
254
+ (cont.new $k (ref.func $never))
255
256
257
258
259
260
+ (elem declare func $never)
261
+)
262
263
+(assert_return (invoke "resume_throw-never"))
264
265
;; Simple state example
266
267
(module $state
0 commit comments