1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

tree-il->scheme renders fix as letrec*

* module/language/tree-il.scm (tree-il->scheme): Expand out to letrec*,
  as it doesn't matter, and this avoids a let when running through the
  evaluator.
This commit is contained in:
Andy Wingo 2010-06-17 13:34:48 +02:00
parent 9b3cc65965
commit 57086a19d0

View file

@ -444,8 +444,10 @@
,(map list gensyms (map tree-il->scheme vals)) ,(tree-il->scheme body)))
((<fix> gensyms vals body)
;; not a typo, we really do translate back to letrec
`(letrec ,(map list gensyms (map tree-il->scheme vals)) ,(tree-il->scheme body)))
;; not a typo, we really do translate back to letrec. use letrec* since it
;; doesn't matter, and the naive letrec* transformation does not require an
;; inner let.
`(letrec* ,(map list gensyms (map tree-il->scheme vals)) ,(tree-il->scheme body)))
((<let-values> exp body)
`(call-with-values (lambda () ,(tree-il->scheme exp))