From 7156be15b4088322b6183ef642d18cb86f5225df Mon Sep 17 00:00:00 2001
From: gerd <gerd>
Date: Fri, 6 Jun 2003 14:00:05 +0000
Subject: [PATCH] 	Problems with class precedence lists found by Paul
 Dietz.

	* src/pcl/defs.lisp (toplevel): Don't compute the cpl of built-in
	classes from the kernel's layout-inherits because that gives wrong
	results, for instance for null.
	(standard-method): Make method the first superclass.

	* src/pcl/braid.lisp (bootstrap-built-in-classes): Use
	kernel:std-compute-class-precedence-list.
---
 general-info/release-19a.txt |  3 +++
 pcl/braid.lisp               | 17 +++++++++--------
 pcl/defs.lisp                |  8 +-------
 3 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/general-info/release-19a.txt b/general-info/release-19a.txt
index 717325706..69fbaf5b3 100644
--- a/general-info/release-19a.txt
+++ b/general-info/release-19a.txt
@@ -103,6 +103,9 @@ New in this release:
        standard characters, BOOLEAN for T, (INTEGER <N> <N>) for
        integers N, non-list types for functions, and CLOS classes for
        instances whose class doesn't have a proper name.
+     - Class precedence list of NULL not having SYMBOL before LIST,
+       precedence list of STANDARD-METHOD not having METHOD before
+       STANDARD-OBJECT.
 
   * Numerous bugfixes:
      - NSET-EXCLUSIVE-OR returns the same results as SET-EXCLUSIVE-OR
diff --git a/pcl/braid.lisp b/pcl/braid.lisp
index c3c664d8d..596d91ba9 100644
--- a/pcl/braid.lisp
+++ b/pcl/braid.lisp
@@ -25,7 +25,7 @@
 ;;; *************************************************************************
 
 (file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/braid.lisp,v 1.43 2003/05/25 14:33:50 gerd Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/braid.lisp,v 1.44 2003/06/06 14:00:05 gerd Exp $")
 
 ;;;
 ;;; Bootstrapping the meta-braid.
@@ -469,19 +469,20 @@
   ;; In the second pass, we initialize the class objects.
   (let ((class-eq-wrapper (class-wrapper (find-class 'class-eq-specializer))))
     (dolist (e *built-in-classes*)
-      (destructuring-bind (name supers subs cpl prototype) e
+      (destructuring-bind (name supers subs prototype) e
 	(let* ((class (find-class name))
 	       (lclass (kernel::find-class name))
 	       (wrapper (kernel:%class-layout lclass)))
 	  (set (get-built-in-class-symbol name) class)
 	  (set (get-built-in-wrapper-symbol name) wrapper)
 	  (setf (kernel:%class-pcl-class lclass) class)
-
-	  (bootstrap-initialize-class 'built-in-class class
-				      name class-eq-wrapper nil
-				      supers subs
-				      (cons name cpl)
-				      wrapper prototype)))))
+	  (let* ((kernel-class (kernel::find-class name))
+		 (cpl (kernel:std-compute-class-precedence-list kernel-class))
+		 (cpl-class-names (mapcar #'kernel:%class-name cpl)))
+	    (bootstrap-initialize-class 'built-in-class class
+					name class-eq-wrapper nil
+					supers subs cpl-class-names
+					wrapper prototype))))))
   ;;
   (dolist (e *built-in-classes*)
     (let* ((name (car e))
diff --git a/pcl/defs.lisp b/pcl/defs.lisp
index 05b440de3..834f89c80 100644
--- a/pcl/defs.lisp
+++ b/pcl/defs.lisp
@@ -370,11 +370,6 @@
 	  (res `(,name
 		 ,(mapcar #'kernel:%class-name (direct-supers class))
 		 ,(mapcar #'kernel:%class-name (direct-subs class))
-		 ,(map 'list (lambda (x)
-			       (kernel:%class-name (kernel:layout-class x)))
-		       (reverse
-			(kernel:layout-inherits
-			 (kernel:%class-layout class))))
 		 ,(let ((found (assoc name *built-in-classes*)))
 		    (if found (fifth found) 42)))))))
     (setq *built-in-classes* (res))))
@@ -698,8 +693,7 @@ was inherited."
 
 (defclass method (metaobject) ())
 
-(defclass standard-method (definition-source-mixin documentation-mixin
-			      method)
+(defclass standard-method (method definition-source-mixin documentation-mixin)
   ((generic-function
     :initform nil	
     :accessor method-generic-function)
-- 
GitLab