name class slots
standard-effective-slot-definition-wrapper t))
+ (setf (layout-slot-table wrapper) (make-slot-table class slots t))
+
(case meta
((standard-class funcallable-standard-class)
(!bootstrap-initialize-class
structure-class condition-class
slot-class))
(set-slot 'direct-slots direct-slots)
- (set-slot 'slots slots))
+ (set-slot 'slots slots)
+ (setf (layout-slot-table wrapper)
+ (make-slot-table class slots
+ (member metaclass-name
+ '(standard-class funcallable-standard-class)))))
;; For all direct superclasses SUPER of CLASS, make sure CLASS is
;; a direct subclass of SUPER. Note that METACLASS-NAME doesn't
(cons name cpl)
wrapper prototype))))))
\f
-(defmacro wrapper-of-macro (x)
- `(layout-of ,x))
-
-(defun class-of (x)
- (wrapper-class* (wrapper-of-macro x)))
-
-;;; FIXME: We probably don't need both WRAPPER-OF and WRAPPER-OF-MACRO.
#-sb-fluid (declaim (inline wrapper-of))
(defun wrapper-of (x)
- (wrapper-of-macro x))
+ (layout-of x))
+
+(defun class-of (x)
+ (wrapper-class* (wrapper-of x)))
(defun eval-form (form)
(lambda () (eval form)))
(!bootstrap-class-predicates nil)
(!bootstrap-built-in-classes)
-(dohash (name x *find-class*)
- (let* ((class (find-class-from-cell name x))
- (layout (class-wrapper class))
- (lclass (layout-classoid layout))
- (lclass-pcl-class (classoid-pcl-class lclass))
- (olclass (find-classoid name nil)))
- (if lclass-pcl-class
- (aver (eq class lclass-pcl-class))
- (setf (classoid-pcl-class lclass) class))
+(dohash ((name x) *find-class*)
+ (let* ((class (find-class-from-cell name x))
+ (layout (class-wrapper class))
+ (lclass (layout-classoid layout))
+ (lclass-pcl-class (classoid-pcl-class lclass))
+ (olclass (find-classoid name nil)))
+ (if lclass-pcl-class
+ (aver (eq class lclass-pcl-class))
+ (setf (classoid-pcl-class lclass) class))
- (update-lisp-class-layout class layout)
+ (update-lisp-class-layout class layout)
- (cond (olclass
- (aver (eq lclass olclass)))
- (t
- (setf (find-classoid name) lclass)))
+ (cond (olclass
+ (aver (eq lclass olclass)))
+ (t
+ (setf (find-classoid name) lclass)))
- (set-class-type-translation class name)))
+ (set-class-type-translation class name)))
(setq *boot-state* 'braid)
;;; :BEFORE method, it would seem that going through
;;; NO-APPLICABLE-METHOD is prohibited, as in fact there is an
;;; applicable method. -- CSR, 2002-11-15
+(define-condition no-primary-method (reference-condition error)
+ ((generic-function :initarg :generic-function :reader no-primary-method-generic-function)
+ (args :initarg :args :reader no-primary-method-args))
+ (:report
+ (lambda (c s)
+ (format s "~@<There is no primary method for the generic function ~2I~_~S~
+ ~I~_when called with arguments ~2I~_~S.~:>"
+ (no-primary-method-generic-function c)
+ (no-primary-method-args c))))
+ (:default-initargs :references (list '(:ansi-cl :section (7 6 6 2)))))
(defmethod no-primary-method (generic-function &rest args)
- (error "~@<There is no primary method for the generic function ~2I~_~S~
- ~I~_when called with arguments ~2I~_~S.~:>"
- generic-function
- args))
+ (error 'no-primary-method :generic-function generic-function :args args))
(defmethod invalid-qualifiers ((gf generic-function)
combin