0.7.9.15:
authorChristophe Rhodes <csr21@cam.ac.uk>
Wed, 30 Oct 2002 12:54:47 +0000 (12:54 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Wed, 30 Oct 2002 12:54:47 +0000 (12:54 +0000)
        Implement GENERIC-FUNCTION-DECLARATIONS, more-or-less as in
                Gerd's implementation on cmucl-imp
                86fzvadsgr.fsf@gerd.free-bsd.org
        ... only for STANDARD-GENERIC-FUNCTIONS, but as an :ACCESSOR
                not a :READER (following the other slots of a S-G-F)

NEWS
src/pcl/boot.lisp
src/pcl/defs.lisp
src/pcl/generic-functions.lisp
tests/mop.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 7076991..3abef44 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1351,8 +1351,13 @@ changes in sbcl-0.7.9 relative to sbcl-0.7.8:
     truename.
   * more systematization and improvement of CLOS and MOP conformance
     in PCL (thanks to Gerd Moellman and Pierre Mai):
-    ** NO-NEXT-METHOD is now implemented;
-
+    ** the standard ANSI CL generic function NO-NEXT-METHOD is now
+       implemented;
+    ** DEFINE-METHOD-COMBINATION no longer signals an error for
+       primary methods with no specializers;
+    ** the MOP generic function GENERIC-FUNCTION-DECLARATIONS is now
+       implemented;
+    
 planned incompatible changes in 0.7.x:
 * When the profiling interface settles down, maybe in 0.7.x, maybe
   later, it might impact TRACE. They both encapsulate functions, and
index 559b3ea..1ccb0ae 100644 (file)
@@ -189,7 +189,7 @@ bootstrapping.
                        :format-control "The declaration specifier ~S ~
                                          is not allowed inside DEFGENERIC."
                        :format-arguments (list (cadr option))))
-              (push (cdr option) (initarg :declarations)))
+              (push (cadr option) (initarg :declarations)))
              ((:argument-precedence-order :method-combination)
               (if (initarg car-option)
                   (duplicate-option car-option)
index ba5ccd4..ebf2eff 100644 (file)
    (method-combination
     :initarg :method-combination
     :accessor generic-function-method-combination)
+   (declarations
+    :initarg :declarations
+    :initform ()
+    :accessor generic-function-declarations)
    (arg-info
     :initform (make-arg-info)
     :reader gf-arg-info)
index 7dac4bc..0a2a808 100644 (file)
@@ -84,6 +84,8 @@
 
 (defgeneric eql-specializer-object (eql-specializer))
 
+(defgeneric generic-function-declarations (standard-generic-function))
+
 (defgeneric generic-function-method-class (standard-generic-function))
 
 (defgeneric generic-function-method-combination (standard-generic-function))
 (defgeneric (setf generic-function-method-combination)
   (new-value standard-generic-function))
 
+(defgeneric (setf generic-function-declarations) (new-value
+                                                 standard-generic-function))
+
 (defgeneric (setf generic-function-methods) (new-value
                                             standard-generic-function))
 
index 9e09e31..84a7e32 100644 (file)
         (sb-pcl:generic-function-argument-precedence-order #'documentation)
         (let ((ll (sb-pcl:generic-function-lambda-list #'documentation)))
           (list (nth 1 ll) (nth 0 ll)))))
+
+(assert (null
+        (sb-pcl:generic-function-declarations #'fn-with-odd-arg-precedence)))
+(defgeneric gf-with-declarations (x)
+  (declare (optimize (speed 3)))
+  (declare (optimize (safety 0))))
+(let ((decls (sb-pcl:generic-function-declarations #'gf-with-declarations)))
+  (assert (= (length decls) 2))
+  (assert (member '(optimize (speed 3)) decls :test #'equal))
+  (assert (member '(optimize (safety 0)) decls :test #'equal)))
 \f
 ;;; Readers for Slot Definition Metaobjects (pp. 221--224 of AMOP)
 
index 3ee10d7..20ec6fd 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.14"
+"0.7.9.15"