From: Christophe Rhodes Date: Thu, 14 Nov 2002 19:03:16 +0000 (+0000) Subject: 0.7.9.49: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=742e0b2aed0e06a5ac6036c6b576088e3f91208f;p=sbcl.git 0.7.9.49: Fix bug 136 (CALL-NEXT-METHOD and lexical rebinding of arguments): entomotomy: call-next-method-lexical-args ... delete the MACROLET "optimization" path --- diff --git a/BUGS b/BUGS index d717851..7b6595f 100644 --- a/BUGS +++ b/BUGS @@ -652,15 +652,6 @@ WORKAROUND: forever, even when it is uninterned and all other references to it are lost. -136: - (reported by Arnaud Rouanet on cmucl-imp 2001-12-18) - (defmethod foo ((x integer)) - x) - (defmethod foo :around ((x integer)) - (let ((x (1+ x))) - (call-next-method))) - Now (FOO 3) should return 3, but instead it returns 4. - 141: Pretty-printing nested backquotes doesn't work right, as reported by Alexey Dejneka sbcl-devel 2002-01-13: diff --git a/NEWS b/NEWS index 8046d33..8bbf18f 100644 --- a/NEWS +++ b/NEWS @@ -1403,10 +1403,13 @@ changes in sbcl-0.7.10 relative to sbcl-0.7.9: * fixed bug 172: macro lambda lists with required arguments after &REST arguments now cause an error to be signalled. (thanks to Matthew Danish) - * fixed Entomotomy PEEK-CHAR-WRONGLY-ECHOS-TO-ECHO-STREAM bug (thanks - to Matthew Danish) - * fixed bug 225: STRING-STREAM is now a class (reported by Gilbert + * fixed Entomotomy PEEK-CHAR-WRONGLY-ECHOS-TO-ECHO-STREAM + bug. (thanks to Matthew Danish) + * fixed bug 225: STRING-STREAM is now a class. (reported by Gilbert Baumann) + * fixed bug 136: CALL-NEXT-METHOD no longer gets confused when + arguments are lexically rebound. (thanks to Gerd Moellmann and + Pierre Mai) planned incompatible changes in 0.7.x: * When the profiling interface settles down, maybe in 0.7.x, maybe diff --git a/src/pcl/boot.lisp b/src/pcl/boot.lisp index 12a81ff..c4b2bda 100644 --- a/src/pcl/boot.lisp +++ b/src/pcl/boot.lisp @@ -1093,18 +1093,6 @@ bootstrapping. (null closurep) (null applyp)) `(let () ,@body)) - ((and (null closurep) - (null applyp)) - ;; OK to use MACROLET, and all args are mandatory - ;; (else APPLYP would be true). - `(call-next-method-bind - (macrolet ((call-next-method (&rest cnm-args) - `(call-next-method-body ,',method-name-declaration - ,(when cnm-args - `(list ,@cnm-args)))) - (next-method-p () - `(next-method-p-body))) - ,@body))) (t `(call-next-method-bind (flet (,@(and call-next-method-p diff --git a/src/pcl/low.lisp b/src/pcl/low.lisp index 073228d..d4a4af5 100644 --- a/src/pcl/low.lisp +++ b/src/pcl/low.lisp @@ -285,6 +285,10 @@ (std-instance-slots instance) (fsc-instance-slots instance))) (defun get-slots-or-nil (instance) + ;; Supress a code-deletion note. FIXME: doing the FIXME above, + ;; integrating PCL more with the compiler, would remove the need for + ;; this icky stuff. + (declare (optimize (inhibit-warnings 3))) (when (pcl-instance-p instance) (get-slots instance))) diff --git a/tests/clos-ignore.interactive.lisp b/tests/clos-ignore.interactive.lisp index 1d69116..432f65d 100644 --- a/tests/clos-ignore.interactive.lisp +++ b/tests/clos-ignore.interactive.lisp @@ -18,7 +18,7 @@ (in-package :cl-user) -(defgeneric foo ((x t) (y t) &key &allow-other-keys)) +(defgeneric foo (x y &key &allow-other-keys)) ;;; should have no STYLE-WARNINGs (e.g. about unused vars) (defmethod foo ((x t) (y t)) diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index dc33bd5..bd46fa1 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -435,6 +435,15 @@ (defclass subclass-for-class-allocation (superclass-with-slot) ()) (make-instance 'subclass-for-class-allocation) +;;; bug #136: CALL-NEXT-METHOD was being a little too lexical, +;;; resulting in failure in the following: +(defmethod call-next-method-lexical-args ((x integer)) + x) +(defmethod call-next-method-lexical-args :around ((x integer)) + (let ((x (1+ x))) + (call-next-method))) +(assert (= (call-next-method-lexical-args 3) 3)) + ;;;; success (sb-ext:quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index 4c28256..ea74d17 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.9.48" +"0.7.9.49"