Debian Codegraph @

tests/snapshots/cli/stack-switching/static-lwt.wast/6.print

raw
1 (module $scheduler
2 (type $func (;0;) (func))
3 (type $cont (;1;) (cont $func))
4 (type (;2;) (func (result i32)))
5 (type (;3;) (func (result (ref null $cont))))
6 (type (;4;) (func (param (ref $cont))))
7 (import "lwt" "yield" (tag $yield (;0;) (type $func)))
8 (import "queue" "queue-empty" (func $queue-empty (;0;) (type 2)))
9 (import "queue" "dequeue" (func $dequeue (;1;) (type 3)))
10 (import "queue" "enqueue" (func $enqueue (;2;) (type 4)))
11 (export "run" (func $run))
12 (func $run (;3;) (type $func)
13 loop $l
14 call $queue-empty
15 if ;; label = @2
16 return
17 end
18 block $on_yield (result (ref $cont))
19 call $dequeue
20 resume $cont (on $yield $on_yield)
21 br $l
22 end
23 call $enqueue
24 br $l
25 end
26 )
27 )