X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fbraid.lisp;h=ed76500b43edb34c339c0fb6e3de870fcc0e2df1;hb=c01ff86b012283af04641a02e45f066aa7cdb10c;hp=9e65da9e73fd24a075b72c047a03c73c03990e53;hpb=a53deb94a224bc903d00a5075acf562488cab06a;p=sbcl.git diff --git a/src/pcl/braid.lisp b/src/pcl/braid.lisp index 9e65da9..ed76500 100644 --- a/src/pcl/braid.lisp +++ b/src/pcl/braid.lisp @@ -97,8 +97,7 @@ (defmacro !initial-classes-and-wrappers (&rest classes) `(progn ,@(mapcar (lambda (class) - (let ((wr (intern (format nil "~A-WRAPPER" class) - *pcl-package*))) + (let ((wr (format-symbol *pcl-package* "~A-WRAPPER" class))) `(setf ,wr ,(if (eq class 'standard-generic-function) '*sgf-wrapper* `(boot-make-wrapper @@ -189,9 +188,7 @@ (boot-make-wrapper (length slots) name)))) (proto nil)) (when (eq name t) (setq *the-wrapper-of-t* wrapper)) - (set (intern (format nil "*THE-CLASS-~A*" (symbol-name name)) - *pcl-package*) - class) + (set (make-class-symbol name) class) (dolist (slot slots) (unless (eq (getf slot :allocation :instance) :instance) (error "Slot allocation ~S is not supported in bootstrap." @@ -288,6 +285,7 @@ class) spec)) (set-slot 'class-precedence-list (classes cpl)) + (set-slot 'cpl-available-p t) (set-slot 'can-precede-list (classes (cdr cpl))) (set-slot 'incompatible-superclass-list nil) (set-slot 'direct-superclasses (classes direct-supers)) @@ -376,11 +374,11 @@ (set-val 'location index) (let ((fsc-p nil)) (set-val 'reader-function (make-optimized-std-reader-method-function - fsc-p slot-name index)) + fsc-p nil slot-name index)) (set-val 'writer-function (make-optimized-std-writer-method-function - fsc-p slot-name index)) + fsc-p nil slot-name index)) (set-val 'boundp-function (make-optimized-std-boundp-method-function - fsc-p slot-name index))) + fsc-p nil slot-name index))) (set-val 'accessor-flags 7) (let ((table (or (gethash slot-name *name->class->slotd-table*) (setf (gethash slot-name *name->class->slotd-table*) @@ -581,8 +579,8 @@ `(:initfunction ,form-or-fun) `(:initform ,form-or-fun :initfunction ,(lambda () form-or-fun))))) - :allocation (condition-slot-allocation slot) - :documentation (condition-slot-documentation slot)))) + :allocation ,(condition-slot-allocation slot) + :documentation ,(condition-slot-documentation slot)))) (cond ((structure-type-p name) (ensure 'structure-class (mapcar #'slot-initargs-from-structure-slotd @@ -594,12 +592,14 @@ (t (error "~@<~S is not the name of a class.~@:>" name))))) -(defun maybe-reinitialize-structure-class (classoid) +(defun ensure-defstruct-class (classoid) (let ((class (classoid-pcl-class classoid))) - (when class - (ensure-non-standard-class (class-name class) class)))) + (cond (class + (ensure-non-standard-class (class-name class) class)) + ((eq 'complete *boot-state*) + (ensure-non-standard-class (classoid-name classoid)))))) -(pushnew 'maybe-reinitialize-structure-class sb-kernel::*defstruct-hooks*) +(pushnew 'ensure-defstruct-class sb-kernel::*defstruct-hooks*) (defun make-class-predicate (class name) (let* ((gf (ensure-generic-function name :lambda-list '(object)))