0.pre8.21:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 31 Mar 2003 15:20:41 +0000 (15:20 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 31 Mar 2003 15:20:41 +0000 (15:20 +0000)
Merge patch from Gerd Moellmann (sbcl-devel 2003-03-29) to make
FIND-CLASS (SB-PCL:FIND-CLASS as was) available earlier
in the MOP methods (requested by KMR sbcl-devel
2003-03-28)
... (SETF FIND-CLASS) in UPDATE-CLASS.

src/pcl/std-class.lisp
tests/mop.impure.lisp
version.lisp-expr

index 558d920..12d3ecb 100644 (file)
                                     (make-class-predicate-name (class-name
                                                                 class))))))
   (add-direct-subclasses class direct-superclasses)
-  (update-class class nil)
   (make-class-predicate class predicate-name)
+  (update-class class nil)
   (add-slot-accessors class direct-slots))
 
 (defmethod shared-initialize :before ((class class) slot-names &key name)
     (return-from update-class))
   (when (or finalizep (class-finalized-p class)
            (not (class-has-a-forward-referenced-superclass-p class)))
+    (setf (find-class (class-name class)) class)
     (update-cpl class (compute-class-precedence-list class))
     ;; This invocation of UPDATE-SLOTS, in practice, finalizes the
     ;; class.  The hoops above are to ensure that FINALIZE-INHERITANCE
index b70ca1a..9f2e9e5 100644 (file)
 (assert (null *e-c-u-c-arg-order*))
 (defclass e-c-u-c-arg-order () ())
 (assert (eq *e-c-u-c-arg-order* t))
+\f
+;;; verify that FIND-CLASS works after FINALIZE-INHERITANCE
+(defclass automethod-class (standard-class) ())
+(defmethod validate-superclass ((c1 automethod-class) (c2 standard-class))
+  t)
+(defmethod finalize-inheritance :after ((x automethod-class))
+  (format t "~&~S ~S~%" x (find-class (class-name x))))
+(defclass automethod-object () ()
+  (:metaclass automethod-class))
+(defvar *automethod-object* (make-instance 'automethod-object))
+(assert (typep *automethod-object* 'automethod-object))
+\f
 ;;;; success
 (sb-ext:quit :unix-status 104)
index 1c26faa..4f2e262 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.pre8.20"
+"0.pre8.21"