0.7.9.49:
authorChristophe Rhodes <csr21@cam.ac.uk>
Thu, 14 Nov 2002 19:03:16 +0000 (19:03 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Thu, 14 Nov 2002 19:03:16 +0000 (19:03 +0000)
Fix bug 136 (CALL-NEXT-METHOD and lexical rebinding of
arguments):
entomotomy: call-next-method-lexical-args
... delete the MACROLET "optimization" path

BUGS
NEWS
src/pcl/boot.lisp
src/pcl/low.lisp
tests/clos-ignore.interactive.lisp
tests/clos.impure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index d717851..7b6595f 100644 (file)
--- 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 (file)
--- 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
index 12a81ff..c4b2bda 100644 (file)
@@ -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
index 073228d..d4a4af5 100644 (file)
       (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)))
 
index 1d69116..432f65d 100644 (file)
@@ -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))
index dc33bd5..bd46fa1 100644 (file)
 (defclass subclass-for-class-allocation (superclass-with-slot) ())
 (make-instance 'subclass-for-class-allocation)
 \f
+;;; 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))
+\f
 ;;;; success
 
 (sb-ext:quit :unix-status 104)
index 4c28256..ea74d17 100644 (file)
@@ -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"