1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

with-fresh-name-state takes a cont, not a $fun

* module/language/cps.scm (with-fresh-name-state): Take a cont instead
  of a fun.

* module/language/cps/closure-conversion.scm:
* module/language/cps/constructors.scm:
* module/language/cps/elide-values.scm:
* module/language/cps/prune-bailouts.scm:
* module/language/cps/reify-primitives.scm: Adapt.
This commit is contained in:
Andy Wingo 2014-04-11 10:21:04 +02:00
parent 686a6490f4
commit d3dbf75ab3
6 changed files with 14 additions and 13 deletions

View file

@ -215,10 +215,7 @@
body ...))
(define-syntax-rule (with-fresh-name-state fun body ...)
(call-with-values (lambda ()
(match fun
(($ $fun free fun-k)
(compute-max-label-and-var fun-k))))
(call-with-values (lambda () (compute-max-label-and-var fun))
(lambda (max-label max-var)
(parameterize ((label-counter (1+ max-label))
(var-counter (1+ max-var)))