Changeset 12411


Ignore:
Timestamp:
01/31/10 20:13:07 (11 years ago)
Author:
astalla
Message:

Lambda call inlining: fixed nasty bug that made the compiler go into
infinite recursion when compiling an invalid lambda call.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp

    r12409 r12411  
    12391239       ,@body)))
    12401240    (lambda-list-mismatch (x)
    1241       (warn "Invalid function call: ~S (mismatch type: ~A)"
    1242       form (lambda-list-mismatch-type x))
     1241      (compiler-warn "Invalid function call: ~S (mismatch type: ~A)"
     1242         form (lambda-list-mismatch-type x))
    12431243      form))
    12441244  (if (unsafe-p args)
     
    13021302             (setf (compiland-%single-valued-p *current-compiland*) nil)))))
    13031303  (p1-default form))
     1304
     1305(defun %funcall (fn &rest args)
     1306  "Dummy FUNCALL wrapper to force p1 not to optimize the call."
     1307  (apply fn args))
    13041308
    13051309(defknown p1 (t) t)
     
    13701374                         (p1-function-call form))))
    13711375                 ((and (consp op) (eq (%car op) 'LAMBDA))
    1372                   (p1 (rewrite-function-call form)))
     1376      (let ((maybe-optimized-call (rewrite-function-call form)))
     1377        (if (eq maybe-optimized-call form)
     1378      (p1 `(%funcall (function ,op) ,@(cdr form)))
     1379      (p1 maybe-optimized-call))))
    13731380                 (t
    13741381                  form))))))
Note: See TracChangeset for help on using the changeset viewer.