mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 01:07:34 +02:00
Be more careful about optimizing-out functions
This commit is contained in:
parent
b809dcb908
commit
dbf77ce999
1 changed files with 7 additions and 1 deletions
|
@ -1503,7 +1503,13 @@
|
|||
(equal? (app->args body)
|
||||
;(lambda->formals (car body))
|
||||
(lambda->formals exp)
|
||||
))
|
||||
)
|
||||
;; TODO: don't do it if args are used in the body
|
||||
;; this won't work if we have any num other than 1 arg
|
||||
(not (member
|
||||
(car (lambda->formals exp))
|
||||
(free-vars (car body))))
|
||||
)
|
||||
(cps-optimize-01 (car body)))
|
||||
(else
|
||||
`(lambda ,(lambda->formals exp)
|
||||
|
|
Loading…
Add table
Reference in a new issue