mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 17:20:29 +02:00
$prompt is now its own kind of CPS term.
* module/language/cps.scm ($prompt): Rework to be its own term kind. Now $continue always continues to a single continuation. Adapt callers.
This commit is contained in:
parent
29fee39c2a
commit
ee15ca1455
22 changed files with 198 additions and 195 deletions
|
@ -46,16 +46,16 @@
|
|||
(($ $primcall name param args)
|
||||
($primcall name param ,(map subst args)))
|
||||
(($ $values args)
|
||||
($values ,(map subst args)))
|
||||
(($ $prompt escape? tag handler)
|
||||
($prompt escape? (subst tag) handler))))
|
||||
($values ,(map subst args)))))
|
||||
|
||||
(define (rename-term term)
|
||||
(rewrite-term term
|
||||
(($ $continue k src exp)
|
||||
($continue k src ,(rename-exp exp)))
|
||||
(($ $branch kf kt src op param args)
|
||||
($branch kf kt src op param ,(map subst args)))))
|
||||
($branch kf kt src op param ,(map subst args)))
|
||||
(($ $prompt k kh src escape? tag)
|
||||
($prompt k kh src escape? (subst tag)))))
|
||||
|
||||
(define (visit-label label cps)
|
||||
(match (intmap-ref cps label)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue