1.0.32.10: fix timer starvation caused by setting the system clock back
[sbcl.git] / src / pcl / defclass.lisp
index cbce704..638f561 100644 (file)
@@ -53,7 +53,7 @@
           ;; DEFSTRUCT-P should be true if the class is defined
           ;; with a metaclass STRUCTURE-CLASS, so that a DEFSTRUCT
           ;; is compiled for the class.
-          (defstruct-p (and (eq *boot-state* 'complete)
+          (defstruct-p (and (eq **boot-state** 'complete)
                             (let ((mclass (find-class metaclass nil)))
                               (and mclass
                                    (*subtypep
 (defun canonize-defclass-options (class-name options)
   (maplist (lambda (sublist)
              (let ((option-name (first (pop sublist))))
-               (when (member option-name sublist :key #'first)
+               (when (member option-name sublist :key #'first :test #'eq)
                  (error 'simple-program-error
                         :format-control "Multiple ~S options in DEFCLASS ~S."
                         :format-arguments (list option-name class-name)))))
           (:default-initargs
            (let (initargs arg-names)
              (doplist (key val) (cdr option)
-               (when (member key arg-names)
+               (when (member key arg-names :test #'eq)
                  (error 'simple-program-error
                         :format-control "~@<Duplicate initialization argument ~
                                            name ~S in :DEFAULT-INITARGS of ~
            (push `(:documentation ,(second option)) canonized-options))
           (otherwise
            (push `(',(car option) ',(cdr option)) canonized-options))))
+      (unless default-initargs
+        (push '(:direct-default-initargs nil) canonized-options))
       (values (or metaclass 'standard-class) (nreverse canonized-options))))
 
 (defun canonize-defclass-slots (class-name slots env)
                 (if (eq type t)
                     nil
                     `('type-check-function (lambda (value)
-                                             (declare (type ,type value))
+                                             (declare (type ,type value)
+                                                      (optimize (sb-c:store-coverage-data 0)))
                                              value))))
                (canon `(:name ',name :readers ',readers :writers ',writers
                               :initargs ',initargs
            (slot-name-illegal "a keyword"))
           ((constantp name env)
            (slot-name-illegal "a constant"))
-          ((member name *slot-names-for-this-defclass*)
+          ((member name *slot-names-for-this-defclass* :test #'eq)
            (error 'simple-program-error
                   :format-control "Multiple slots named ~S in DEFCLASS ~S."
                   :format-arguments (list name class-name))))))
            (unless entry
              (setq entry (list initform
                                (gensym)
-                               `(function (lambda () ,initform))))
+                               `(function (lambda ()
+                                  (declare (optimize
+                                            (sb-c:store-coverage-data 0)))
+                                  ,initform))))
              (push entry *initfunctions-for-this-defclass*))
            (cadr entry)))))