mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 23:07:36 +02:00
Only memoize pure functions for programs
The problem with doing this for libraries is that it adds a new dependency on (srfi 69). It would be problematic to use a library with these changes as there is no easy way to know this SRFI is also a library dependency.
This commit is contained in:
parent
ae768b0e83
commit
d0d7fae89c
1 changed files with 3 additions and 1 deletions
|
@ -461,7 +461,9 @@
|
|||
|
||||
(define (flag-set? flag)
|
||||
(cond
|
||||
((eq? flag 'memoize-pure-functions) *optimize:memoize-pure-functions*)
|
||||
((eq? flag 'memoize-pure-functions)
|
||||
(and program? ;; Only for programs, because SRFI 69 becomes a new dep
|
||||
*optimize:memoize-pure-functions*))
|
||||
(else #f)))
|
||||
|
||||
(when (> *optimization-level* 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue