Update of /cvsroot/sbcl/sbcl/src/pcl
In directory usw-pr-cvs1:/tmp/cvs-serv8615/src/pcl
Apply Gerd Moellmann's patch for UPDATE-CLASS /
FINALIZE-INHERITANCE problems (as reported on cmucl-imp
by Kevin Rosenberg 2002-10-14)
... and add some more MOP tests
(see Entomotomy bug
RCS file: /cvsroot/sbcl/sbcl/src/pcl/std-class.lisp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- std-class.lisp 28 Sep 2002 14:39:43 -0000 1.27
+++ std-class.lisp 15 Oct 2002 09:23:21 -0000 1.28
@@ -676,9 +676,24 @@
;;; This is called by :after shared-initialize whenever a class is initialized
;;; or reinitialized. The class may or may not be finalized.
(defun update-class (class finalizep)
+ ;; Comment from Gerd Moellmann:
+ ;; Note that we can't simply delay the finalization when CLASS has
+ ;; no forward referenced superclasses because that causes bootstrap
+ ;; problems.
+ (when (and (not finalizep)
+ (not (class-finalized-p class))
+ (not (class-has-a-forward-referenced-superclass-p class)))
+ (finalize-inheritance class)
+ (return-from update-class))
(when (or finalizep (class-finalized-p class)
(not (class-has-a-forward-referenced-superclass-p 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
+ ;; is called at finalization, so that MOP programmers can hook
+ ;; into the system as described in "Class Finalization Protocol"
+ ;; (section 5.5.2 of AMOP).
(update-slots class (compute-slots class))
(update-inits class (compute-default-initargs class))
Get latest updates about Open Source Projects, Conferences and News.