From 6ef051b23f4b54081aaf119ba8be523c4e014b80 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Fri, 21 Mar 2003 09:56:11 +0000 Subject: [PATCH] 0.7.13.pcl-class.3: (CLASS-PROTOTYPE (FIND-CLASS 'NULL)) now returns NIL ... defer fix for other built-in-classes (e.g. BIGNUM) for mainline post 0.7.14 --- TODO.pcl-class | 8 ++------ src/pcl/braid.lisp | 6 ++++-- tests/mop.impure.lisp | 7 +++++++ version.lisp-expr | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/TODO.pcl-class b/TODO.pcl-class index d3c90a1..146f8f6 100644 --- a/TODO.pcl-class +++ b/TODO.pcl-class @@ -8,12 +8,8 @@ CONDITION-CLASS analogously to STRUCTURE-CLASS. ** CLASS-PROTOTYPE -(sb-pcl:class-prototype (find-class 'null)) yields something decidedly -weird -- it has allocated a NULL thingy. This is easy to solve -[&optional (proto nil protop)]; probably harder are the issues for -e.g. BIGNUM, some strange array classes, and so on, particularly in -their interaction with the cross-compiler dumper, should PCL ever be -moved to the main build. +[ fixed the (CLASS-PROTOTYPE (FIND-CLASS 'NULL)) issue; more general + fix for other built-in-classes can be done in mainline post-merge ] ** SB-MOP diff --git a/src/pcl/braid.lisp b/src/pcl/braid.lisp index 25bc778..60946a5 100644 --- a/src/pcl/braid.lisp +++ b/src/pcl/braid.lisp @@ -255,7 +255,8 @@ (metaclass-name class name class-eq-wrapper source direct-supers direct-subclasses cpl wrapper &optional - proto direct-slots slots direct-default-initargs default-initargs) + (proto nil proto-p) + direct-slots slots direct-default-initargs default-initargs) (flet ((classes (names) (mapcar #'find-class names)) (set-slot (slot-name value) (!bootstrap-set-slot metaclass-name class slot-name value))) @@ -323,7 +324,8 @@ (set-slot 'from-defclass-p t) (set-slot 'plist nil) (set-slot 'prototype (funcall constructor-sym))) - (set-slot 'prototype (or proto (allocate-standard-instance wrapper)))) + (set-slot 'prototype + (if proto-p proto (allocate-standard-instance wrapper)))) class)) (defun !bootstrap-make-slot-definitions (name class slots wrapper effective-p) diff --git a/tests/mop.impure.lisp b/tests/mop.impure.lisp index 24a9e9c..f78e6bb 100644 --- a/tests/mop.impure.lisp +++ b/tests/mop.impure.lisp @@ -104,5 +104,12 @@ (assert (member (find-class x) (sb-pcl:class-direct-subclasses (find-class t))))) +;;; the class-prototype of the NULL class used to be some weird +;;; standard-instance-like thing. Make sure it's actually NIL. +;;; +;;; (and FIXME: eventually turn this into asserting that the prototype +;;; of all built-in-classes is of the relevant type) +(assert (null (sb-pcl:class-prototype (find-class 'null)))) + ;;;; success (sb-ext:quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index a87d90f..d3a20e9 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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.13.pcl-class.2" +"0.7.13.pcl-class.3" -- 1.7.10.4