From 6b9745ef7667d8f98fd4a340dcf662bc6633fd0f Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Fri, 8 Apr 2011 13:06:38 +0000 Subject: [PATCH] 1.0.47.16: more ((LAMBDA ..) ..) and (FUNCALL (LAMBDA ..) ..) equivalence This was mostly the case already, but for consistency's sake convert ((LAMBDA ...) ...) via (%FUNCALL ...) instead of using IR1-CONVERT-COMBINATION directly. Fixes lp#720382. --- NEWS | 2 ++ src/compiler/ir1tran.lisp | 5 +---- tests/compiler.pure.lisp | 11 +++++++++++ version.lisp-expr | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 6092a89..17e3c94 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ changes relative to sbcl-1.0.47: functions. (lp#740717) * bug fix: missed optimizations for (FUNCALL (LAMBDA ...) ...) in comparison to (FUNCALL #'(LAMBDA ...) ...). + * bug fix: ((LAMBDA ...) ...) forms with invalid argument counts + resulted in a compile-time error. (lp#720382) changes in sbcl-1.0.47 relative to sbcl-1.0.46: * bug fix: fix mach port rights leaks in mach exception handling code on diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index a46f8ad..3ad34a6 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -758,10 +758,7 @@ (t ;; implicitly (LAMBDA ..) because the LAMBDA expression is ;; the CAR of an executed form. - (ir1-convert-combination - start next result form - (ir1-convert-lambda op - :debug-name (debug-name 'inline-lambda op)))))) + (ir1-convert start next result `(%funcall ,@form))))) ;;; Convert anything that looks like a global function call. (defun ir1-convert-global-functoid (start next result form fun) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 77fa813..ba8d33f 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3800,6 +3800,17 @@ (+ x (funcall (lambda (z) z) y)))) :type 'function)))) +(with-test (:name :bug-720382) + (let ((w 0)) + (let ((f + (handler-bind (((and warning (not style-warning)) + (lambda (c) (incf w)))) + (compile nil `(lambda (b) ((lambda () b) 1)))))) + (assert (= w 1)) + (assert (eq :error + (handler-case (funcall f 0) + (error () :error))))))) + ;;; This doesn't test LVAR-FUN-IS directly, but captures it ;;; pretty accurately anyways. (with-test (:name :lvar-fun-is) diff --git a/version.lisp-expr b/version.lisp-expr index 25c1fbd..a7909c4 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -20,4 +20,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.47.15" +"1.0.47.16" -- 1.7.10.4