mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 18:20:22 +02:00
$throw is a new kind of CPS term
* module/language/cps.scm ($throw): New term type that doesn't have a continuation. Adapt all callers. Remove now-unneeded "prune-bailouts" pass.
This commit is contained in:
parent
de5c81b1d1
commit
ad55ee83c3
26 changed files with 145 additions and 148 deletions
|
@ -76,7 +76,9 @@
|
|||
(($ $branch kf kt src op param args)
|
||||
(add-uses use-counts args))
|
||||
(($ $prompt k kh src escape? tag)
|
||||
(add-use use-counts tag))))
|
||||
(add-use use-counts tag))
|
||||
(($ $throw src op param args)
|
||||
(add-uses use-counts args))))
|
||||
(_ use-counts)))
|
||||
cps
|
||||
(transient-intmap))))
|
||||
|
@ -116,10 +118,7 @@ the trace should be referenced outside of it."
|
|||
vars))))
|
||||
(define (bailout? k)
|
||||
(match (intmap-ref cps k)
|
||||
(($ $kargs _ _
|
||||
($ $continue _ _
|
||||
($ $primcall (or 'throw 'throw/value 'throw/value+data))))
|
||||
#t)
|
||||
(($ $kargs _ _ ($ $throw)) #t)
|
||||
(_ #f)))
|
||||
(match (intmap-ref cps label)
|
||||
;; We know the initial label is a $kargs, and we won't follow the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue