Skip to content

Commit 0b1af70

Browse files
authored
Fix syntax for handlers in Explainer.md (#94)
1 parent 386269e commit 0b1af70

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

proposals/continuations/Explainer.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ abortive action" which causes the stack to be unwound.
234234

235235

236236
```wast
237-
resume_throw $ct $exn (tag $e $l)* : [tp* (ref $ct)])] -> [tr*]
237+
resume_throw $ct $exn (on $e $l)* : [tp* (ref $ct)])] -> [tr*]
238238
where:
239239
- $ct = cont [ta*] -> [tr*]
240240
- $exn : [tp*] -> []
@@ -423,7 +423,7 @@ We now define a scheduler.
423423
(loop $l
424424
(if (call $queue-empty) (then (return)))
425425
(block $on_yield (result (ref $cont))
426-
(resume $cont (tag $yield $on_yield)
426+
(resume $cont (on $yield $on_yield)
427427
(call $dequeue)
428428
)
429429
(br $l) ;; thread terminated
@@ -598,8 +598,8 @@ thread to completion without actually yielding.
598598
(if (ref.is_null (local.get $nextk)) (then (return)))
599599
(block $on_yield (result (ref $cont))
600600
(block $on_fork (result (ref $cont) (ref $cont))
601-
(resume $cont (tag $yield $on_yield)
602-
(tag $fork $on_fork)
601+
(resume $cont (on $yield $on_yield)
602+
(on $fork $on_fork)
603603
(local.get $nextk)
604604
)
605605
(local.set $nextk (call $dequeue))
@@ -673,8 +673,8 @@ schedulers.
673673
(if (ref.is_null (local.get $nextk)) (then (return)))
674674
(block $on_yield (result (ref $cont))
675675
(block $on_fork (result (ref $cont) (ref $cont))
676-
(resume $cont (tag $yield $on_yield)
677-
(tag $fork $on_fork)
676+
(resume $cont (on $yield $on_yield)
677+
(on $fork $on_fork)
678678
(local.get $nextk)
679679
)
680680
(local.set $nextk (call $dequeue))
@@ -697,8 +697,8 @@ schedulers.
697697
(if (ref.is_null (local.get $nextk)) (then (return)))
698698
(block $on_yield (result (ref $cont))
699699
(block $on_fork (result (ref $cont) (ref $cont))
700-
(resume $cont (tag $yield $on_yield)
701-
(tag $fork $on_fork)
700+
(resume $cont (on $yield $on_yield)
701+
(on $fork $on_fork)
702702
(local.get $nextk)
703703
)
704704
(local.set $nextk (call $dequeue))
@@ -721,8 +721,8 @@ schedulers.
721721
(if (ref.is_null (local.get $nextk)) (then (return)))
722722
(block $on_yield (result (ref $cont))
723723
(block $on_fork (result (ref $cont) (ref $cont))
724-
(resume $cont (tag $yield $on_yield)
725-
(tag $fork $on_fork)
724+
(resume $cont (on $yield $on_yield)
725+
(on $fork $on_fork)
726726
(local.get $nextk)
727727
)
728728
(local.set $nextk (call $dequeue))
@@ -746,8 +746,8 @@ schedulers.
746746
(if (ref.is_null (local.get $nextk)) (then (return)))
747747
(block $on_yield (result (ref $cont))
748748
(block $on_fork (result (ref $cont) (ref $cont))
749-
(resume $cont (tag $yield $on_yield)
750-
(tag $fork $on_fork)
749+
(resume $cont (on $yield $on_yield)
750+
(on $fork $on_fork)
751751
(local.get $nextk)
752752
)
753753
(local.set $nextk (call $dequeue))
@@ -933,7 +933,7 @@ First we implement control/prompt.
933933
(tag $control (export "control") (param (ref $cont-func))) ;; control : [([contref ([] -> [])] -> [])] -> []
934934
(func $prompt (export "prompt") (param $nextk (ref null $cont)) ;; prompt : [(contref ([] -> []))] -> []
935935
(block $on_control (result (ref $cont-func) (ref $cont))
936-
(resume $cont (tag $control $on_control)
936+
(resume $cont (on $control $on_control)
937937
(local.get $nextk))
938938
(return)
939939
) ;; $on_control (param (ref $cont-func) (ref $cont))

0 commit comments

Comments
 (0)