diff options
author | Andy Wingo <wingo@pobox.com> | 2011-09-27 23:29:10 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-09-28 00:13:56 +0200 |
commit | 0353a2d817d0d5b3c563af4fa1b5c7c1fe7ce3a6 (patch) | |
tree | 416455ce94519fcecbea9fae9b79b745ee4101a0 /module/language/tree-il/optimize.scm | |
parent | 40be30c97459e1baf8a9997c1c116a67f153cfef (diff) | |
download | guile-0353a2d817d0d5b3c563af4fa1b5c7c1fe7ce3a6.tar.gz |
((lambda ...) ...) fix
* module/language/tree-il/optimize.scm (peval): If it's a lambda in the
operator position, inline without a nested counter, as it's not
possible to increase code size.
Diffstat (limited to 'module/language/tree-il/optimize.scm')
-rw-r--r-- | module/language/tree-il/optimize.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/module/language/tree-il/optimize.scm b/module/language/tree-il/optimize.scm index 6de676a4d..fee629a06 100644 --- a/module/language/tree-il/optimize.scm +++ b/module/language/tree-il/optimize.scm @@ -855,8 +855,11 @@ it does not handle <fix> and <let-values>, it should be called before ;; An error, or effecting arguments. (make-application src (for-value orig-proc) (map for-value orig-args))) - ((and=> (find-counter key counter) counter-recursive?) - ;; A recursive call. Process again in tail context. + ((or (and=> (find-counter key counter) counter-recursive?) + (lambda? orig-proc)) + ;; A recursive call, or a lambda in the operator + ;; position of the source expression. Process again in + ;; tail context. (loop (make-let src (append req (or opt '())) gensyms (append orig-args |