mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Do not attempt to memoize functions that take 0 args
This commit is contained in:
parent
7021855eca
commit
fa01202df8
2 changed files with 2 additions and 1 deletions
|
@ -450,7 +450,7 @@
|
|||
(set! globals (append globals '(Cyc-memoize)))
|
||||
(set! imported-vars (cons (lib:list->import-set '(Cyc-memoize srfi 69)) imported-vars))
|
||||
)
|
||||
TODO: this blows up compiling the tail-call-opt example program...
|
||||
|
||||
(inject-import '(scheme cyclone common))
|
||||
(inject-import '(scheme base))
|
||||
(inject-import '(scheme char))
|
||||
|
|
|
@ -107,6 +107,7 @@
|
|||
(ref? var)
|
||||
(ast:lambda? body)
|
||||
(eq? (ast:lambda-formals-type body) 'args:fixed)
|
||||
(> (length (ast:lambda-args body)) 1) ;; Need some args other than the cont
|
||||
(< (length (ast:lambda-args body)) 4) ;; Too many combinations w/more args
|
||||
(adb:get/default var #f)
|
||||
(adbv:self-rec-call? (adb:get/default var #f))
|
||||
|
|
Loading…
Add table
Reference in a new issue