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:
parent
9b3cc65965
commit
57086a19d0
1 changed files with 4 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue