X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fdefclass.lisp;h=320c5aa584ad498d9c5ca7345fdb5bb5bd590811;hb=d147d512602d761a2dcdfded506dd1a8f9a140dc;hp=022f979846c2871e6d4a97bfe6003268ec3fed78;hpb=475c832b081651e66ad9446d4852c62086f5e740;p=sbcl.git diff --git a/src/pcl/defclass.lisp b/src/pcl/defclass.lisp index 022f979..320c5aa 100644 --- a/src/pcl/defclass.lisp +++ b/src/pcl/defclass.lisp @@ -88,26 +88,26 @@ (defstruct-p (and (eq *boot-state* 'complete) (let ((mclass (find-class metaclass nil))) (and mclass - (*subtypep mclass - *the-class-structure-class*)))))) + (*subtypep + mclass + *the-class-structure-class*)))))) (let ((defclass-form - (eval-when (:load-toplevel :execute) - `(progn - ,@(mapcar #'(lambda (x) - `(declaim (ftype (function (t) t) ,x))) - *readers*) - ,@(mapcar #'(lambda (x) - `(declaim (ftype (function (t t) t) ,x))) - *writers*) - (let ,(mapcar #'cdr *initfunctions*) - (load-defclass ',name - ',metaclass - ',supers - (list ,@canonical-slots) - (list ,@(apply #'append - (when defstruct-p - '(:from-defclass-p t)) - other-initargs)))))))) + `(progn + ,@(mapcar (lambda (x) + `(declaim (ftype (function (t) t) ,x))) + *readers*) + ,@(mapcar (lambda (x) + `(declaim (ftype (function (t t) t) ,x))) + *writers*) + (let ,(mapcar #'cdr *initfunctions*) + (load-defclass ',name + ',metaclass + ',supers + (list ,@canonical-slots) + (list ,@(apply #'append + (when defstruct-p + '(:from-defclass-p t)) + other-initargs))))))) (if defstruct-p (progn (eval defclass-form) ; Define the class now, so that.. @@ -121,13 +121,13 @@ (defun make-initfunction (initform) (declare (special *initfunctions*)) - (cond ((or (eq initform 't) + (cond ((or (eq initform t) (equal initform ''t)) '(function constantly-t)) - ((or (eq initform 'nil) + ((or (eq initform nil) (equal initform ''nil)) '(function constantly-nil)) - ((or (eql initform '0) + ((or (eql initform 0) (equal initform ''0)) '(function constantly-0)) (t @@ -281,8 +281,8 @@ (loop (when (null others) (return nil)) (let ((initarg (pop others))) (unless (eq initarg :direct-default-initargs) - (error "The defclass option ~S is not supported by the bootstrap~%~ - object system." + (error "~@" initarg))) (setq default-initargs (nconc default-initargs (reverse (pop others))))))) @@ -308,7 +308,8 @@ ;;; standard slots must be computed the same way in this file as it is ;;; by the full object system later. (defmacro !bootstrap-get-slot (type object slot-name) - `(instance-ref (get-slots ,object) (!bootstrap-slot-index ,type ,slot-name))) + `(clos-slots-ref (get-slots ,object) + (!bootstrap-slot-index ,type ,slot-name))) (defun !bootstrap-set-slot (type object slot-name new-value) (setf (!bootstrap-get-slot type object slot-name) new-value))