1 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; This software is derived from software originally released by Xerox
5 ;;;; Corporation. Copyright and release statements follow. Later modifications
6 ;;;; to the software are in the public domain and are provided with
7 ;;;; absolutely no warranty. See the COPYING and CREDITS files for more
10 ;;;; copyright information from original PCL sources:
12 ;;;; Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 Xerox Corporation.
13 ;;;; All rights reserved.
15 ;;;; Use and copying of this software and preparation of derivative works based
16 ;;;; upon this software are permitted. Any distribution of this software or
17 ;;;; derivative works must comply with all applicable United States export
20 ;;;; This software is made available AS IS, and Xerox Corporation makes no
21 ;;;; warranty about the software, its performance or its conformity to any
26 (eval-when (:compile-toplevel :load-toplevel :execute)
28 ;;; FIXME: These are non-ANSI hacks which it would be nice to get rid of.
29 (defvar *defclass-times* '(:load-toplevel :execute)) ; You probably have
30 ; to change this if you use
32 (defvar *defmethod-times* '(:load-toplevel :execute))
33 (defvar *defgeneric-times* '(:load-toplevel :execute))
37 (eval-when (:load-toplevel :execute)
38 (when (eq *boot-state* 'complete)
39 (error "Trying to load (or compile) PCL in an environment in which it~%~
40 has already been loaded. This doesn't work, you will have to~%~
41 get a fresh lisp (reboot) and then load PCL."))
43 (cerror "Try loading (or compiling) PCL anyways."
44 "Trying to load (or compile) PCL in an environment in which it~%~
45 has already been partially loaded. This may not work, you may~%~
46 need to get a fresh lisp (reboot) and then load PCL."))
49 ;;; comments from CMU CL version of PCL:
50 ;;; This is like fdefinition on the Lispm. If Common Lisp had
51 ;;; something like function specs I wouldn't need this. On the other
52 ;;; hand, I don't like the way this really works so maybe function
53 ;;; specs aren't really right either?
54 ;;; I also don't understand the real implications of a Lisp-1 on this
55 ;;; sort of thing. Certainly some of the lossage in all of this is
56 ;;; because these SPECs name global definitions.
57 ;;; Note that this implementation is set up so that an implementation
58 ;;; which has a 'real' function spec mechanism can use that instead
59 ;;; and in that way get rid of setf generic function names.
60 (defmacro parse-gspec (spec
61 (non-setf-var . non-setf-case)
62 (setf-var . setf-case))
63 #+setf (declare (ignore setf-var setf-case))
65 `(cond (#-setf (symbolp ,spec) #+setf t
66 (let ((,non-setf-var ,spec)) ,@non-setf-case))
69 (eq (car ,spec) 'setf)
70 (symbolp (cadr ,spec)))
71 (let ((,setf-var (cadr ,spec))) ,@setf-case))
75 "Can't understand ~S as a generic function specifier.~%~
76 It must be either a symbol which can name a function or~%~
77 a list like ~S, where the car is the symbol ~S and the cadr~%~
78 is a symbol which can name a generic function."
79 ,spec '(setf <foo>) 'setf)))))
81 ;;; If symbol names a function which is traced or advised, return the
82 ;;; unadvised, traced etc. definition. This lets me get at the generic
83 ;;; function object even when it is traced.
84 (defun unencapsulated-fdefinition (symbol)
85 (symbol-function symbol))
87 ;;; If symbol names a function which is traced or advised, redefine
88 ;;; the `real' definition without affecting the advise.
89 (defun fdefine-carefully (name new-definition)
91 (sb-c::%%defun name new-definition nil)
92 (sb-c::note-name-defined name :function)
94 (setf (symbol-function name) new-definition))
99 (name (fboundp (get-setf-function-name name)))))
101 (defun gmakunbound (spec)
103 (name (fmakunbound name))
104 (name (fmakunbound (get-setf-function-name name)))))
106 (defun gdefinition (spec)
108 (name (or #-setf (macro-function name) ;??
109 (unencapsulated-fdefinition name)))
110 (name (unencapsulated-fdefinition (get-setf-function-name name)))))
112 (defun #-setf SETF\ SB-PCL\ GDEFINITION #+setf (setf gdefinition) (new-value
115 (name (fdefine-carefully name new-value))
116 (name (fdefine-carefully (get-setf-function-name name) new-value))))
118 (declaim (special *the-class-t*
119 *the-class-vector* *the-class-symbol*
120 *the-class-string* *the-class-sequence*
121 *the-class-rational* *the-class-ratio*
122 *the-class-number* *the-class-null* *the-class-list*
123 *the-class-integer* *the-class-float* *the-class-cons*
124 *the-class-complex* *the-class-character*
125 *the-class-bit-vector* *the-class-array*
128 *the-class-slot-object*
129 *the-class-structure-object*
130 *the-class-std-object*
131 *the-class-standard-object*
132 *the-class-funcallable-standard-object*
134 *the-class-generic-function*
135 *the-class-built-in-class*
136 *the-class-slot-class*
137 *the-class-structure-class*
138 *the-class-std-class*
139 *the-class-standard-class*
140 *the-class-funcallable-standard-class*
142 *the-class-standard-method*
143 *the-class-standard-reader-method*
144 *the-class-standard-writer-method*
145 *the-class-standard-boundp-method*
146 *the-class-standard-generic-function*
147 *the-class-standard-effective-slot-definition*
149 *the-eslotd-standard-class-slots*
150 *the-eslotd-funcallable-standard-class-slots*))
152 (declaim (special *the-wrapper-of-t*
153 *the-wrapper-of-vector* *the-wrapper-of-symbol*
154 *the-wrapper-of-string* *the-wrapper-of-sequence*
155 *the-wrapper-of-rational* *the-wrapper-of-ratio*
156 *the-wrapper-of-number* *the-wrapper-of-null*
157 *the-wrapper-of-list* *the-wrapper-of-integer*
158 *the-wrapper-of-float* *the-wrapper-of-cons*
159 *the-wrapper-of-complex* *the-wrapper-of-character*
160 *the-wrapper-of-bit-vector* *the-wrapper-of-array*))
162 ;;;; type specifier hackery
164 ;;; internal to this file.
165 (defun coerce-to-class (class &optional make-forward-referenced-class-p)
167 (or (find-class class (not make-forward-referenced-class-p))
168 (ensure-class class))
172 (defun specializer-from-type (type &aux args)
174 (setq args (cdr type) type (car type)))
175 (cond ((symbolp type)
176 (or (and (null args) (find-class type))
178 (class (coerce-to-class (car args)))
179 (prototype (make-instance 'class-prototype-specializer
180 :object (coerce-to-class (car args))))
181 (class-eq (class-eq-specializer (coerce-to-class (car args))))
182 (eql (intern-eql-specializer (car args))))))
183 ((and (null args) (typep type 'cl:class))
184 (or (sb-kernel:class-pcl-class type)
185 (find-structure-class (cl:class-name type))))
186 ((specializerp type) type)))
189 (defun type-from-specializer (specl)
193 (unless (member (car specl) '(class prototype class-eq eql))
194 (error "~S is not a legal specializer type." specl))
197 (when (symbolp specl)
198 ;;maybe (or (find-class specl nil) (ensure-class specl)) instead?
199 (setq specl (find-class specl)))
200 (or (not (eq *boot-state* 'complete))
201 (specializerp specl)))
202 (specializer-type specl))
204 (error "~S is neither a type nor a specializer." specl))))
206 (defun type-class (type)
207 (declare (special *the-class-t*))
208 (setq type (type-from-specializer type))
212 (error "bad argument to type-class"))
214 (eql (class-of (cadr type)))
215 (prototype (class-of (cadr type))) ;?
216 (class-eq (cadr type))
217 (class (cadr type)))))
219 (defun class-eq-type (class)
220 (specializer-type (class-eq-specializer class)))
222 (defun inform-type-system-about-std-class (name)
223 (let ((predicate-name (make-type-predicate-name name)))
224 (setf (gdefinition predicate-name)
225 (make-type-predicate name))
226 (do-satisfies-deftype name predicate-name)))
228 (defun make-type-predicate (name)
229 (let ((cell (find-class-cell name)))
231 (funcall (the function (find-class-cell-predicate cell)) x))))
233 ;This stuff isn't right. Good thing it isn't used.
234 ;The satisfies predicate has to be a symbol. There is no way to
235 ;construct such a symbol from a class object if class names change.
236 (defun class-predicate (class)
237 (when (symbolp class) (setq class (find-class class)))
238 #'(lambda (object) (memq class (class-precedence-list (class-of object)))))
240 (defun make-class-eq-predicate (class)
241 (when (symbolp class) (setq class (find-class class)))
242 #'(lambda (object) (eq class (class-of object))))
244 (defun make-eql-predicate (eql-object)
245 #'(lambda (object) (eql eql-object object)))
247 #|| ; The argument to satisfies must be a symbol.
248 (deftype class (&optional class)
250 `(satisfies ,(class-predicate class))
251 `(satisfies ,(class-predicate 'class))))
253 (deftype class-eq (class)
254 `(satisfies ,(make-class-eq-predicate class)))
257 ;;; internal to this file
259 ;;; These functions are a pale imitiation of their namesake. They accept
260 ;;; class objects or types where they should.
261 (defun *normalize-type (type)
263 (if (member (car type) '(not and or))
264 `(,(car type) ,@(mapcar #'*normalize-type (cdr type)))
265 (if (null (cdr type))
266 (*normalize-type (car type))
269 (let ((class (find-class type nil)))
271 (let ((type (specializer-type class)))
272 (if (listp type) type `(,type)))
274 ((or (not (eq *boot-state* 'complete))
276 (specializer-type type))
278 (error "~S is not a type." type))))
282 (defun unparse-type-list (tlist)
283 (mapcar #'unparse-type tlist))
287 (defun unparse-type (type)
289 (if (specializerp type)
290 (unparse-type (specializer-type type))
294 (class-eq `(class-eq ,(class-name (cadr type))))
295 (class (class-name (cadr type)))
296 (t `(,(car type) ,@(unparse-type-list (cdr type)))))))
298 ;;; internal to this file...
299 (defun convert-to-system-type (type)
301 ((not and or) `(,(car type) ,@(mapcar #'convert-to-system-type
303 ((class class-eq) ; class-eq is impossible to do right
304 (sb-kernel:layout-class (class-wrapper (cadr type))))
306 (t (if (null (cdr type))
312 (defun *typep (object type)
313 (setq type (*normalize-type type))
314 (cond ((member (car type) '(eql wrapper-eq class-eq class))
315 (specializer-applicable-using-type-p type `(eql ,object)))
316 ((eq (car type) 'not)
317 (not (*typep object (cadr type))))
319 (typep object (convert-to-system-type type)))))
321 ;;; Writing the missing NOT and AND clauses will improve
322 ;;; the quality of code generated by generate-discrimination-net, but
323 ;;; calling subtypep in place of just returning (values nil nil) can be
324 ;;; very slow. *SUBTYPEP is used by PCL itself, and must be fast.
325 (defun *subtypep (type1 type2)
326 (if (equal type1 type2)
328 (if (eq *boot-state* 'early)
329 (values (eq type1 type2) t)
330 (let ((*in-precompute-effective-methods-p* t))
331 (declare (special *in-precompute-effective-methods-p*))
332 ;; *in-precompute-effective-methods-p* is not a good name.
333 ;; It changes the way class-applicable-using-class-p works.
334 (setq type1 (*normalize-type type1))
335 (setq type2 (*normalize-type type2))
338 (values nil nil)) ; Should improve this.
340 (values nil nil)) ; Should improve this.
341 ((eql wrapper-eq class-eq class)
342 (multiple-value-bind (app-p maybe-app-p)
343 (specializer-applicable-using-type-p type2 type1)
344 (values app-p (or app-p (not maybe-app-p)))))
346 (subtypep (convert-to-system-type type1)
347 (convert-to-system-type type2))))))))
349 (defun do-satisfies-deftype (name predicate)
350 (declare (ignore name predicate)))
352 (defun make-type-predicate-name (name &optional kind)
353 (if (symbol-package name)
355 "~@[~A ~]TYPE-PREDICATE ~A ~A"
357 (package-name (symbol-package name))
360 (make-symbol (format nil
361 "~@[~A ~]TYPE-PREDICATE ~A"
363 (symbol-name name)))))
365 (defvar *built-in-class-symbols* ())
366 (defvar *built-in-wrapper-symbols* ())
368 (defun get-built-in-class-symbol (class-name)
369 (or (cadr (assq class-name *built-in-class-symbols*))
370 (let ((symbol (intern (format nil
372 (symbol-name class-name))
374 (push (list class-name symbol) *built-in-class-symbols*)
377 (defun get-built-in-wrapper-symbol (class-name)
378 (or (cadr (assq class-name *built-in-wrapper-symbols*))
379 (let ((symbol (intern (format nil
380 "*THE-WRAPPER-OF-~A*"
381 (symbol-name class-name))
383 (push (list class-name symbol) *built-in-wrapper-symbols*)
386 (pushnew '%class *variable-declarations*)
387 (pushnew '%variable-rebinding *variable-declarations*)
389 (defun variable-class (var env)
390 (caddr (variable-declaration 'class var env)))
392 (defvar *name->class->slotd-table* (make-hash-table))
394 ;;; This is used by combined methods to communicate the next methods
395 ;;; to the methods they call. This variable is captured by a lexical
396 ;;; variable of the methods to give it the proper lexical scope.
397 (defvar *next-methods* nil)
399 (defvar *not-an-eql-specializer* '(not-an-eql-specializer))
402 (defvar *umi-complete-classes*)
403 (defvar *umi-reorder*)
405 (defvar *invalidate-discriminating-function-force-p* ())
406 (defvar *invalid-dfuns-on-stack* ())
408 (defvar *standard-method-combination*)
410 (defvar *slotd-unsupplied* (list '*slotd-unsupplied*)) ;***
412 (defmacro define-gf-predicate (predicate-name &rest classes)
414 (defmethod ,predicate-name ((x t)) nil)
415 ,@(mapcar #'(lambda (c) `(defmethod ,predicate-name ((x ,c)) t))
418 (defun make-class-predicate-name (name)
419 (intern (format nil "~A::~A class predicate"
420 (package-name (symbol-package name))
424 (defun plist-value (object name)
425 (getf (object-plist object) name))
427 (defun #-setf SETF\ SB-PCL\ PLIST-VALUE #+setf (setf plist-value) (new-value
431 (setf (getf (object-plist object) name) new-value)
433 (remf (object-plist object) name)
436 ;;;; built-in classes
438 ;;; FIXME: This was the portable PCL way of setting up
439 ;;; *BUILT-IN-CLASSES*, but in SBCL (as in CMU CL) it's almost
440 ;;; entirely wasted motion, since it's immediately overwritten by a
441 ;;; result mostly derived from SB-KERNEL::*BUILT-IN-CLASSES*. However,
442 ;;; we can't just delete it, since the fifth element from each entry
443 ;;; (a prototype of the class) is still in the final result. It would
444 ;;; be nice to clean this up so that the other, never-used stuff is
445 ;;; gone, perhaps finding a tidier way to represent examples of each
448 ;;; FIXME: This can probably be blown away after bootstrapping.
449 ;;; And SB-KERNEL::*BUILT-IN-CLASSES*, too..
451 (defvar *built-in-classes*
452 ;; name supers subs cdr of cpl
454 '(;(t () (number sequence array character symbol) ())
455 (number (t) (complex float rational) (t))
456 (complex (number) () (number t)
458 (float (number) () (number t)
460 (rational (number) (integer ratio) (number t))
461 (integer (rational) () (rational number t)
463 (ratio (rational) () (rational number t)
466 (sequence (t) (list vector) (t))
467 (list (sequence) (cons null) (sequence t))
468 (cons (list) () (list sequence t)
471 (array (t) (vector) (t)
474 sequence) (string bit-vector) (array sequence t)
476 (string (vector) () (vector array sequence t)
478 (bit-vector (vector) () (vector array sequence t)
480 (character (t) () (t)
483 (symbol (t) (null) (t)
486 list) () (symbol list sequence t)
490 ;;; Grovel over SB-KERNEL::*BUILT-IN-CLASSES* in order to set
491 ;;; SB-PCL:*BUILT-IN-CLASSES*.
492 (sb-int:/show "about to set up SB-PCL::*BUILT-IN-CLASSES*")
493 (defvar *built-in-classes*
494 (labels ((direct-supers (class)
495 (sb-int:/show "entering DIRECT-SUPERS" (sb-kernel::class-name class))
496 (if (typep class 'cl:built-in-class)
497 (sb-kernel:built-in-class-direct-superclasses class)
498 (let ((inherits (sb-kernel:layout-inherits
499 (sb-kernel:class-layout class))))
500 (sb-int:/show inherits)
501 (list (svref inherits (1- (length inherits)))))))
503 (sb-int:/show "entering DIRECT-SUBS" (sb-kernel::class-name class))
504 (sb-int:collect ((res))
505 (let ((subs (sb-kernel:class-subclasses class)))
508 (sb-int:dohash (sub v subs)
511 (when (member class (direct-supers sub))
514 (prototype (class-name)
515 (let ((assoc (assoc class-name
516 '((complex . #c(1 1))
532 ;; This is the default prototype value which was
533 ;; used, without explanation, by the CMU CL code
534 ;; we're derived from. Evidently it's safe in all
537 (mapcar (lambda (kernel-bic-entry)
538 (sb-int:/show "setting up" kernel-bic-entry)
539 (let* ((name (car kernel-bic-entry))
540 (class (cl:find-class name)))
541 (sb-int:/show name class)
543 ,(mapcar #'cl:class-name (direct-supers class))
544 ,(mapcar #'cl:class-name (direct-subs class))
547 (cl:class-name (sb-kernel:layout-class x)))
549 (sb-kernel:layout-inherits
550 (sb-kernel:class-layout class))))
552 (remove-if (lambda (kernel-bic-entry)
553 (member (first kernel-bic-entry)
554 ;; I'm not sure why these are removed from
555 ;; the list, but that's what the original
556 ;; CMU CL code did. -- WHN 20000715
557 '(t sb-kernel:instance
558 sb-kernel:funcallable-instance
560 sb-kernel::*built-in-classes*))))
561 (sb-int:/show "done setting up SB-PCL::*BUILT-IN-CLASSES*")
563 ;;;; the classes that define the kernel of the metabraid
566 (:metaclass built-in-class))
568 (defclass sb-kernel:instance (t) ()
569 (:metaclass built-in-class))
571 (defclass function (t) ()
572 (:metaclass built-in-class))
574 (defclass sb-kernel:funcallable-instance (function) ()
575 (:metaclass built-in-class))
577 (defclass stream (t) ()
578 (:metaclass built-in-class))
580 (defclass slot-object (t) ()
581 (:metaclass slot-class))
583 (defclass structure-object (slot-object sb-kernel:instance) ()
584 (:metaclass structure-class))
586 (defstruct (dead-beef-structure-object
587 (:constructor |STRUCTURE-OBJECT class constructor|)))
589 (defclass std-object (slot-object) ()
590 (:metaclass std-class))
592 (defclass standard-object (std-object sb-kernel:instance) ())
594 (defclass funcallable-standard-object (std-object
595 sb-kernel:funcallable-instance)
597 (:metaclass funcallable-standard-class))
599 (defclass specializer (standard-object)
602 :reader specializer-type)))
604 (defclass definition-source-mixin (std-object)
606 :initform *load-truename*
607 :reader definition-source
608 :initarg :definition-source))
609 (:metaclass std-class))
611 (defclass plist-mixin (std-object)
614 :accessor object-plist))
615 (:metaclass std-class))
617 (defclass documentation-mixin (plist-mixin)
619 (:metaclass std-class))
621 (defclass dependent-update-mixin (plist-mixin)
623 (:metaclass std-class))
625 ;;; The class CLASS is a specified basic class. It is the common superclass
626 ;;; of any kind of class. That is any class that can be a metaclass must
627 ;;; have the class CLASS in its class precedence list.
628 (defclass class (documentation-mixin dependent-update-mixin
629 definition-source-mixin specializer)
633 :accessor class-name)
634 (class-eq-specializer
636 :reader class-eq-specializer)
639 :reader class-direct-superclasses)
642 :reader class-direct-subclasses)
644 :initform (cons nil nil))
647 :reader class-predicate-name)))
649 ;;; The class PCL-CLASS is an implementation-specific common superclass of
650 ;;; all specified subclasses of the class CLASS.
651 (defclass pcl-class (class)
652 ((class-precedence-list
653 :reader class-precedence-list)
656 :reader class-can-precede-list)
657 (incompatible-superclass-list
659 :accessor class-incompatible-superclass-list)
662 :reader class-wrapper)
665 :reader class-prototype)))
667 (defclass slot-class (pcl-class)
670 :accessor class-direct-slots)
673 :accessor class-slots)
676 :accessor class-initialize-info)))
678 ;;; The class STD-CLASS is an implementation-specific common superclass of
679 ;;; the classes STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS.
680 (defclass std-class (slot-class)
683 (defclass standard-class (std-class)
686 (defclass funcallable-standard-class (std-class)
689 (defclass forward-referenced-class (pcl-class) ())
691 (defclass built-in-class (pcl-class) ())
693 (defclass structure-class (slot-class)
696 :accessor class-defstruct-form)
697 (defstruct-constructor
699 :accessor class-defstruct-constructor)
702 :initarg :from-defclass-p)))
704 (defclass specializer-with-object (specializer) ())
706 (defclass exact-class-specializer (specializer) ())
708 (defclass class-eq-specializer (exact-class-specializer
709 specializer-with-object)
710 ((object :initarg :class
711 :reader specializer-class
712 :reader specializer-object)))
714 (defclass class-prototype-specializer (specializer-with-object)
715 ((object :initarg :class
716 :reader specializer-class
717 :reader specializer-object)))
719 (defclass eql-specializer (exact-class-specializer specializer-with-object)
720 ((object :initarg :object :reader specializer-object
721 :reader eql-specializer-object)))
723 (defvar *eql-specializer-table* (make-hash-table :test 'eql))
725 (defun intern-eql-specializer (object)
726 (or (gethash object *eql-specializer-table*)
727 (setf (gethash object *eql-specializer-table*)
728 (make-instance 'eql-specializer :object object))))
730 ;;;; slot definitions
732 (defclass slot-definition (standard-object)
736 :accessor slot-definition-name)
740 :accessor slot-definition-initform)
743 :initarg :initfunction
744 :accessor slot-definition-initfunction)
748 :accessor slot-definition-readers)
752 :accessor slot-definition-writers)
756 :accessor slot-definition-initargs)
760 :accessor slot-definition-type)
763 :initarg :documentation)
767 :accessor slot-definition-class)))
769 (defclass standard-slot-definition (slot-definition)
773 :accessor slot-definition-allocation)))
775 (defclass structure-slot-definition (slot-definition)
776 ((defstruct-accessor-symbol
778 :initarg :defstruct-accessor-symbol
779 :accessor slot-definition-defstruct-accessor-symbol)
780 (internal-reader-function
782 :initarg :internal-reader-function
783 :accessor slot-definition-internal-reader-function)
784 (internal-writer-function
786 :initarg :internal-writer-function
787 :accessor slot-definition-internal-writer-function)))
789 (defclass direct-slot-definition (slot-definition)
792 (defclass effective-slot-definition (slot-definition)
793 ((reader-function ; #'(lambda (object) ...)
794 :accessor slot-definition-reader-function)
795 (writer-function ; #'(lambda (new-value object) ...)
796 :accessor slot-definition-writer-function)
797 (boundp-function ; #'(lambda (object) ...)
798 :accessor slot-definition-boundp-function)
802 (defclass standard-direct-slot-definition (standard-slot-definition
803 direct-slot-definition)
806 (defclass standard-effective-slot-definition (standard-slot-definition
807 effective-slot-definition)
808 ((location ; nil, a fixnum, a cons: (slot-name . value)
810 :accessor slot-definition-location)))
812 (defclass structure-direct-slot-definition (structure-slot-definition
813 direct-slot-definition)
816 (defclass structure-effective-slot-definition (structure-slot-definition
817 effective-slot-definition)
820 (defclass method (standard-object) ())
822 (defclass standard-method (definition-source-mixin plist-mixin method)
825 :accessor method-generic-function)
828 ; :initarg :qualifiers
829 ; :reader method-qualifiers)
832 :initarg :specializers
833 :reader method-specializers)
836 :initarg :lambda-list
837 :reader method-lambda-list)
840 :initarg :function) ;no writer
843 :initarg :fast-function ;no writer
844 :reader method-fast-function)
847 ; :initarg :documentation
848 ; :reader method-documentation)
851 (defclass standard-accessor-method (standard-method)
852 ((slot-name :initform nil
854 :reader accessor-method-slot-name)
855 (slot-definition :initform nil
856 :initarg :slot-definition
857 :reader accessor-method-slot-definition)))
859 (defclass standard-reader-method (standard-accessor-method) ())
861 (defclass standard-writer-method (standard-accessor-method) ())
863 (defclass standard-boundp-method (standard-accessor-method) ())
865 (defclass generic-function (dependent-update-mixin
866 definition-source-mixin
868 funcallable-standard-object)
870 (:metaclass funcallable-standard-class))
872 (defclass standard-generic-function (generic-function)
876 :accessor generic-function-name)
879 :accessor generic-function-methods
882 :initarg :method-class
883 :accessor generic-function-method-class)
885 :initarg :method-combination
886 :accessor generic-function-method-combination)
888 :initform (make-arg-info)
892 :accessor gf-dfun-state)
895 :accessor gf-pretty-arglist))
896 (:metaclass funcallable-standard-class)
897 (:default-initargs :method-class *the-class-standard-method*
898 :method-combination *standard-method-combination*))
900 (defclass method-combination (standard-object) ())
902 (defclass standard-method-combination
903 (definition-source-mixin method-combination)
904 ((type :reader method-combination-type
906 (documentation :reader method-combination-documentation
907 :initarg :documentation)
908 (options :reader method-combination-options
911 (defparameter *early-class-predicates*
912 '((specializer specializerp)
913 (exact-class-specializer exact-class-specializer-p)
914 (class-eq-specializer class-eq-specializer-p)
915 (eql-specializer eql-specializer-p)
917 (slot-class slot-class-p)
918 (std-class std-class-p)
919 (standard-class standard-class-p)
920 (funcallable-standard-class funcallable-standard-class-p)
921 (structure-class structure-class-p)
922 (forward-referenced-class forward-referenced-class-p)
924 (standard-method standard-method-p)
925 (standard-accessor-method standard-accessor-method-p)
926 (standard-reader-method standard-reader-method-p)
927 (standard-writer-method standard-writer-method-p)
928 (standard-boundp-method standard-boundp-method-p)
929 (generic-function generic-function-p)
930 (standard-generic-function standard-generic-function-p)
931 (method-combination method-combination-p)))