canonical-options))
',*readers-for-this-defclass*
',*writers-for-this-defclass*
- ',*slot-names-for-this-defclass*))))
+ ',*slot-names-for-this-defclass*
+ (sb-c:source-location)))))
(if defstruct-p
(progn
;; FIXME: (YUK!) Why do we do this? Because in order
;; then use CLASS-DIRECT-SLOTS. -- CSR, 2002-06-07
(eval defclass-form)
(let* ((include (or (and direct-superclasses
- (fix-super (car direct-superclasses)))
+ (find-class (car direct-superclasses) nil))
(and (not (eq name 'structure-object))
*the-class-structure-object*)))
(defstruct-form (make-structure-class-defstruct-form
(maplist (lambda (sublist)
(let ((option-name (first (pop sublist))))
(when (member option-name sublist :key #'first)
- (error "Multiple ~S options in DEFCLASS ~S."
- option-name class-name))))
+ (error 'simple-program-error
+ :format-control "Multiple ~S options in DEFCLASS ~S."
+ :format-arguments (list option-name class-name)))))
options)
(let (metaclass
default-initargs
(:metaclass
(let ((maybe-metaclass (second option)))
(unless (and maybe-metaclass (legal-class-name-p maybe-metaclass))
- (error "~@<The value of the :metaclass option (~S) ~
+ (error 'simple-program-error
+ :format-control "~@<The value of the :metaclass option (~S) ~
is not a legal class name.~:@>"
- maybe-metaclass))
+ :format-arguments (list maybe-metaclass)))
(setf metaclass maybe-metaclass)))
(:default-initargs
(let (initargs arg-names)
(error "~S is not a class in *early-class-definitions*." class-name)))
(defun make-early-class-definition
- (name source metaclass
+ (name source-location metaclass
superclass-names canonical-slots other-initargs)
(list 'early-class-definition
- name source metaclass
+ name source-location metaclass
superclass-names canonical-slots other-initargs))
(defun ecd-class-name (ecd) (nth 1 ecd))
-(defun ecd-source (ecd) (nth 2 ecd))
+(defun ecd-source-location (ecd) (nth 2 ecd))
(defun ecd-metaclass (ecd) (nth 3 ecd))
(defun ecd-superclass-names (ecd) (nth 4 ecd))
(defun ecd-canonical-slots (ecd) (nth 5 ecd))
(!bootstrap-get-slot 'class class 'name))
(defun early-class-precedence-list (class)
- (!bootstrap-get-slot 'pcl-class class 'class-precedence-list))
+ (!bootstrap-get-slot 'pcl-class class '%class-precedence-list))
(defun early-class-name-of (instance)
(early-class-name (class-of instance)))
(declaim (notinline load-defclass))
(defun load-defclass (name metaclass supers canonical-slots canonical-options
- readers writers slot-names)
+ readers writers slot-names source-location)
(%compiler-defclass name readers writers slot-names)
(setq supers (copy-tree supers)
canonical-slots (copy-tree canonical-slots)
canonical-options (copy-tree canonical-options))
(let ((ecd
(make-early-class-definition name
- *load-pathname*
+ source-location
metaclass
supers
canonical-slots