0.9.9.27:
[sbcl.git] / src / pcl / defs.lisp
1 ;;;; This software is part of the SBCL system. See the README file for
2 ;;;; more information.
3
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
8 ;;;; information.
9
10 ;;;; copyright information from original PCL sources:
11 ;;;;
12 ;;;; Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 Xerox Corporation.
13 ;;;; All rights reserved.
14 ;;;;
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
18 ;;;; control laws.
19 ;;;;
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
22 ;;;; specification.
23
24 (in-package "SB-PCL")
25 \f
26 ;;; (These are left over from the days when PCL was an add-on package
27 ;;; for a pre-CLOS Common Lisp. They shouldn't happen in a normal
28 ;;; build, of course, but they might happen if someone is experimenting
29 ;;; and debugging, and it's probably worth complaining if they do,
30 ;;; so we've left 'em in.)
31 (when (eq *boot-state* 'complete)
32   (error "Trying to load (or compile) PCL in an environment in which it~%~
33           has already been loaded. This doesn't work, you will have to~%~
34           get a fresh lisp (reboot) and then load PCL."))
35 (when *boot-state*
36   (cerror "Try loading (or compiling) PCL anyways."
37           "Trying to load (or compile) PCL in an environment in which it~%~
38            has already been partially loaded. This may not work, you may~%~
39            need to get a fresh lisp (reboot) and then load PCL."))
40 \f
41 #-sb-fluid (declaim (inline gdefinition))
42 (defun gdefinition (spec)
43   ;; This is null layer right now, but once FDEFINITION stops bypasssing
44   ;; fwrappers/encapsulations we can do that here.
45   (fdefinition spec))
46
47 (defun (setf gdefinition) (new-value spec)
48   ;; This is almost a null layer right now, but once (SETF
49   ;; FDEFINITION) stops bypasssing fwrappers/encapsulations we can do
50   ;; that here.
51   (sb-c::note-name-defined spec :function) ; FIXME: do we need this? Why?
52   (setf (fdefinition spec) new-value))
53 \f
54 ;;;; type specifier hackery
55
56 ;;; internal to this file
57 (defun coerce-to-class (class &optional make-forward-referenced-class-p)
58   (if (symbolp class)
59       (or (find-class class (not make-forward-referenced-class-p))
60           (ensure-class class))
61       class))
62
63 ;;; interface
64 (defun specializer-from-type (type &aux args)
65   (when (consp type)
66     (setq args (cdr type) type (car type)))
67   (cond ((symbolp type)
68          (or (and (null args) (find-class type))
69              (ecase type
70                (class    (coerce-to-class (car args)))
71                (prototype (make-instance 'class-prototype-specializer
72                                          :object (coerce-to-class (car args))))
73                (class-eq (class-eq-specializer (coerce-to-class (car args))))
74                (eql      (intern-eql-specializer (car args))))))
75         ;; FIXME: do we still need this?
76         ((and (null args) (typep type 'classoid))
77          (or (classoid-pcl-class type)
78              (ensure-non-standard-class (classoid-name type))))
79         ((specializerp type) type)))
80
81 ;;; interface
82 (defun type-from-specializer (specl)
83   (cond ((eq specl t)
84          t)
85         ((consp specl)
86          (unless (member (car specl) '(class prototype class-eq eql))
87            (error "~S is not a legal specializer type." specl))
88          specl)
89         ((progn
90            (when (symbolp specl)
91              ;;maybe (or (find-class specl nil) (ensure-class specl)) instead?
92              (setq specl (find-class specl)))
93            (or (not (eq *boot-state* 'complete))
94                (specializerp specl)))
95          (specializer-type specl))
96         (t
97          (error "~S is neither a type nor a specializer." specl))))
98
99 (defun type-class (type)
100   (declare (special *the-class-t*))
101   (setq type (type-from-specializer type))
102   (if (atom type)
103       (if (eq type t)
104           *the-class-t*
105           (error "bad argument to TYPE-CLASS"))
106       (case (car type)
107         (eql (class-of (cadr type)))
108         (prototype (class-of (cadr type))) ;?
109         (class-eq (cadr type))
110         (class (cadr type)))))
111
112 (defun class-eq-type (class)
113   (specializer-type (class-eq-specializer class)))
114
115 ;;; internal to this file..
116 ;;;
117 ;;; These functions are a pale imitation of their namesake. They accept
118 ;;; class objects or types where they should.
119 (defun *normalize-type (type)
120   (cond ((consp type)
121          (if (member (car type) '(not and or))
122              `(,(car type) ,@(mapcar #'*normalize-type (cdr type)))
123              (if (null (cdr type))
124                  (*normalize-type (car type))
125                  type)))
126         ((symbolp type)
127          (let ((class (find-class type nil)))
128            (if class
129                (let ((type (specializer-type class)))
130                  (if (listp type) type `(,type)))
131                `(,type))))
132         ((or (not (eq *boot-state* 'complete))
133              (specializerp type))
134          (specializer-type type))
135         (t
136          (error "~S is not a type." type))))
137
138 ;;; internal to this file...
139 (defun convert-to-system-type (type)
140   (case (car type)
141     ((not and or) `(,(car type) ,@(mapcar #'convert-to-system-type
142                                           (cdr type))))
143     ((class class-eq) ; class-eq is impossible to do right
144      (layout-classoid (class-wrapper (cadr type))))
145     (eql type)
146     (t (if (null (cdr type))
147            (car type)
148            type))))
149
150 ;;; Writing the missing NOT and AND clauses will improve the quality
151 ;;; of code generated by GENERATE-DISCRIMINATION-NET, but calling
152 ;;; SUBTYPEP in place of just returning (VALUES NIL NIL) can be very
153 ;;; slow. *SUBTYPEP is used by PCL itself, and must be fast.
154 ;;;
155 ;;; FIXME: SB-KERNEL has fast-and-not-quite-precise type code for use
156 ;;; in the compiler. Could we share some of it here?
157 (defun *subtypep (type1 type2)
158   (if (equal type1 type2)
159       (values t t)
160       (if (eq *boot-state* 'early)
161           (values (eq type1 type2) t)
162           (let ((*in-precompute-effective-methods-p* t))
163             (declare (special *in-precompute-effective-methods-p*))
164             ;; FIXME: *IN-PRECOMPUTE-EFFECTIVE-METHODS-P* is not a
165             ;; good name. It changes the way
166             ;; CLASS-APPLICABLE-USING-CLASS-P works.
167             (setq type1 (*normalize-type type1))
168             (setq type2 (*normalize-type type2))
169             (case (car type2)
170               (not
171                (values nil nil)) ; XXX We should improve this.
172               (and
173                (values nil nil)) ; XXX We should improve this.
174               ((eql wrapper-eq class-eq class)
175                (multiple-value-bind (app-p maybe-app-p)
176                    (specializer-applicable-using-type-p type2 type1)
177                  (values app-p (or app-p (not maybe-app-p)))))
178               (t
179                (subtypep (convert-to-system-type type1)
180                          (convert-to-system-type type2))))))))
181 \f
182 (defvar *built-in-class-symbols* ())
183 (defvar *built-in-wrapper-symbols* ())
184
185 (defun get-built-in-class-symbol (class-name)
186   (or (cadr (assq class-name *built-in-class-symbols*))
187       (let ((symbol (make-class-symbol class-name)))
188         (push (list class-name symbol) *built-in-class-symbols*)
189         symbol)))
190
191 (defun get-built-in-wrapper-symbol (class-name)
192   (or (cadr (assq class-name *built-in-wrapper-symbols*))
193       (let ((symbol (make-wrapper-symbol class-name)))
194         (push (list class-name symbol) *built-in-wrapper-symbols*)
195         symbol)))
196 \f
197 (pushnew '%class *var-declarations*)
198 (pushnew '%variable-rebinding *var-declarations*)
199
200 (defun variable-class (var env)
201   (caddr (var-declaration 'class var env)))
202
203 (defvar *name->class->slotd-table* (make-hash-table))
204
205 (defvar *standard-method-combination*)
206 \f
207 (defun plist-value (object name)
208   (getf (object-plist object) name))
209
210 (defun (setf plist-value) (new-value object name)
211   (if new-value
212       (setf (getf (object-plist object) name) new-value)
213       (progn
214         (remf (object-plist object) name)
215         nil)))
216 \f
217 ;;;; built-in classes
218
219 ;;; Grovel over SB-KERNEL::*BUILT-IN-CLASSES* in order to set
220 ;;; SB-PCL:*BUILT-IN-CLASSES*.
221 (/show "about to set up SB-PCL::*BUILT-IN-CLASSES*")
222 (defvar *built-in-classes*
223   (labels ((direct-supers (class)
224              (/noshow "entering DIRECT-SUPERS" (classoid-name class))
225              (if (typep class 'built-in-classoid)
226                  (built-in-classoid-direct-superclasses class)
227                  (let ((inherits (layout-inherits
228                                   (classoid-layout class))))
229                    (/noshow inherits)
230                    (list (svref inherits (1- (length inherits)))))))
231            (direct-subs (class)
232              (/noshow "entering DIRECT-SUBS" (classoid-name class))
233              (collect ((res))
234                (let ((subs (classoid-subclasses class)))
235                  (/noshow subs)
236                  (when subs
237                    (dohash (sub v subs)
238                      (declare (ignore v))
239                      (/noshow sub)
240                      (when (member class (direct-supers sub))
241                        (res sub)))))
242                (res))))
243     (mapcar (lambda (kernel-bic-entry)
244               (/noshow "setting up" kernel-bic-entry)
245               (let* ((name (car kernel-bic-entry))
246                      (class (find-classoid name))
247                      (prototype-form
248                       (getf (cdr kernel-bic-entry) :prototype-form)))
249                 (/noshow name class)
250                 `(,name
251                   ,(mapcar #'classoid-name (direct-supers class))
252                   ,(mapcar #'classoid-name (direct-subs class))
253                   ,(map 'list
254                         (lambda (x)
255                           (classoid-name
256                            (layout-classoid x)))
257                         (reverse
258                          (layout-inherits
259                           (classoid-layout class))))
260                   ,(if prototype-form
261                        (eval prototype-form)
262                        ;; This is the default prototype value which
263                        ;; was used, without explanation, by the CMU CL
264                        ;; code we're derived from. Evidently it's safe
265                        ;; in all relevant cases.
266                        42))))
267             (remove-if (lambda (kernel-bic-entry)
268                          (member (first kernel-bic-entry)
269                                  ;; I'm not sure why these are removed from
270                                  ;; the list, but that's what the original
271                                  ;; CMU CL code did. -- WHN 20000715
272                                  '(t function stream
273                                      file-stream string-stream)))
274                        sb-kernel::*built-in-classes*))))
275 (/noshow "done setting up SB-PCL::*BUILT-IN-CLASSES*")
276 \f
277 ;;;; the classes that define the kernel of the metabraid
278
279 (defclass t () ()
280   (:metaclass built-in-class))
281
282 (defclass function (t) ()
283   (:metaclass built-in-class))
284
285 (defclass stream (t) ()
286   (:metaclass built-in-class))
287
288 (defclass file-stream (stream) ()
289   (:metaclass built-in-class))
290
291 (defclass string-stream (stream) ()
292   (:metaclass built-in-class))
293
294 (defclass slot-object (t) ()
295   (:metaclass slot-class))
296
297 (defclass condition (slot-object) ()
298   (:metaclass condition-class))
299
300 (defclass structure-object (slot-object) ()
301   (:metaclass structure-class))
302
303 (defstruct (dead-beef-structure-object
304             (:constructor |STRUCTURE-OBJECT class constructor|)
305             (:copier nil)))
306
307 (defclass standard-object (slot-object) ())
308
309 (defclass funcallable-standard-object (standard-object function)
310   ()
311   (:metaclass funcallable-standard-class))
312
313 (defclass metaobject (standard-object) ())
314
315 (defclass generic-function (dependent-update-mixin
316                             definition-source-mixin
317                             metaobject
318                             funcallable-standard-object)
319   ((%documentation :initform nil :initarg :documentation)
320    ;; We need to make a distinction between the methods initially set
321    ;; up by :METHOD options to DEFGENERIC and the ones set up later by
322    ;; DEFMETHOD, because ANSI specifies that executing DEFGENERIC on
323    ;; an already-DEFGENERICed function clears the methods set by the
324    ;; previous DEFGENERIC, but not methods set by DEFMETHOD. (Making
325    ;; this distinction seems a little kludgy, but it has the positive
326    ;; effect of making it so that loading a file a.lisp containing
327    ;; DEFGENERIC, then loading a second file b.lisp containing
328    ;; DEFMETHOD, then modifying and reloading a.lisp and/or b.lisp
329    ;; tends to leave the generic function in a state consistent with
330    ;; the most-recently-loaded state of a.lisp and b.lisp.)
331    (initial-methods :initform ()
332                     :accessor generic-function-initial-methods))
333   (:metaclass funcallable-standard-class))
334
335 (defclass standard-generic-function (generic-function)
336   ((name
337     :initform nil
338     :initarg :name
339     :reader generic-function-name)
340    (methods
341     :initform ()
342     :accessor generic-function-methods
343     :type list)
344    (method-class
345     :initarg :method-class
346     :accessor generic-function-method-class)
347    (%method-combination
348     :initarg :method-combination
349     :accessor generic-function-method-combination)
350    (declarations
351     ;; KLUDGE: AMOP specifies :DECLARATIONS, while ANSI specifies
352     ;; :DECLARE.  Allow either (but FIXME: maybe a note or a warning
353     ;; might be appropriate).
354     :initarg :declarations
355     :initarg :declare
356     :initform ()
357     :accessor generic-function-declarations)
358    (arg-info
359     :initform (make-arg-info)
360     :reader gf-arg-info)
361    (dfun-state
362     :initform ()
363     :accessor gf-dfun-state))
364   (:metaclass funcallable-standard-class)
365   (:default-initargs :method-class *the-class-standard-method*
366                      :method-combination *standard-method-combination*))
367
368 (defclass method (metaobject) ())
369
370 (defclass standard-method (definition-source-mixin plist-mixin method)
371   ((%generic-function
372     :initform nil
373     :accessor method-generic-function)
374    #+nil ; implemented by PLIST
375    (qualifiers
376     :initform ()
377     :initarg  :qualifiers
378     :reader method-qualifiers)
379    (specializers
380     :initform ()
381     :initarg  :specializers
382     :reader method-specializers)
383    (lambda-list
384     :initform ()
385     :initarg  :lambda-list
386     :reader method-lambda-list)
387    (%function :initform nil :initarg :function)
388    (fast-function
389     :initform nil
390     :initarg :fast-function             ;no writer
391     :reader method-fast-function)
392    (%documentation :initform nil :initarg :documentation)))
393
394 (defclass standard-accessor-method (standard-method)
395   ((slot-name :initform nil :initarg :slot-name
396               :reader accessor-method-slot-name)
397    (%slot-definition :initform nil :initarg :slot-definition
398                      :reader accessor-method-slot-definition)))
399
400 (defclass standard-reader-method (standard-accessor-method) ())
401 (defclass standard-writer-method (standard-accessor-method) ())
402 ;;; an extension, apparently.
403 (defclass standard-boundp-method (standard-accessor-method) ())
404
405 (defclass method-combination (metaobject)
406   ((%documentation :initform nil :initarg :documentation)))
407
408 (defclass standard-method-combination (definition-source-mixin
409                                        method-combination)
410   ((type-name
411     :reader method-combination-type-name
412     :initarg :type-name)
413    (options
414     :reader method-combination-options
415     :initarg :options)))
416
417 (defclass long-method-combination (standard-method-combination)
418   ((function
419     :initarg :function
420     :reader long-method-combination-function)
421    (args-lambda-list
422     :initarg :args-lambda-list
423     :reader long-method-combination-args-lambda-list)))
424
425 (defclass short-method-combination (standard-method-combination)
426   ((operator
427     :reader short-combination-operator
428     :initarg :operator)
429    (identity-with-one-argument
430     :reader short-combination-identity-with-one-argument
431     :initarg :identity-with-one-argument)))
432
433 (defclass slot-definition (metaobject)
434   ((name
435     :initform nil
436     :initarg :name
437     :accessor slot-definition-name)
438    (initform
439     :initform nil
440     :initarg :initform
441     :accessor slot-definition-initform)
442    (initfunction
443     :initform nil
444     :initarg :initfunction
445     :accessor slot-definition-initfunction)
446    (readers
447     :initform nil
448     :initarg :readers
449     :accessor slot-definition-readers)
450    (writers
451     :initform nil
452     :initarg :writers
453     :accessor slot-definition-writers)
454    (initargs
455     :initform nil
456     :initarg :initargs
457     :accessor slot-definition-initargs)
458    (%type :initform t :initarg :type :accessor slot-definition-type)
459    (%documentation 
460     :initform nil :initarg :documentation
461     ;; KLUDGE: we need a reader for bootstrapping purposes, in
462     ;; COMPUTE-EFFECTIVE-SLOT-DEFINITION-INITARGS.
463     :reader %slot-definition-documentation)
464    (%class :initform nil :initarg :class :accessor slot-definition-class)))
465
466 (defclass standard-slot-definition (slot-definition)
467   ((allocation
468     :initform :instance
469     :initarg :allocation
470     :accessor slot-definition-allocation)
471    (allocation-class
472     :initform nil
473     :initarg :allocation-class
474     :accessor slot-definition-allocation-class)))
475
476 (defclass condition-slot-definition (slot-definition)
477   ((allocation
478     :initform :instance
479     :initarg :allocation
480     :accessor slot-definition-allocation)
481    (allocation-class
482     :initform nil
483     :initarg :allocation-class
484     :accessor slot-definition-allocation-class)))
485
486 (defclass structure-slot-definition (slot-definition)
487   ((defstruct-accessor-symbol
488      :initform nil
489      :initarg :defstruct-accessor-symbol
490      :accessor slot-definition-defstruct-accessor-symbol)
491    (internal-reader-function
492      :initform nil
493      :initarg :internal-reader-function
494      :accessor slot-definition-internal-reader-function)
495    (internal-writer-function
496      :initform nil
497      :initarg :internal-writer-function
498      :accessor slot-definition-internal-writer-function)))
499
500 (defclass direct-slot-definition (slot-definition)
501   ())
502
503 (defclass effective-slot-definition (slot-definition)
504   ((reader-function ; (lambda (object) ...)
505     :accessor slot-definition-reader-function)
506    (writer-function ; (lambda (new-value object) ...)
507     :accessor slot-definition-writer-function)
508    (boundp-function ; (lambda (object) ...)
509     :accessor slot-definition-boundp-function)
510    (accessor-flags
511     :initform 0)))
512
513 (defclass standard-direct-slot-definition (standard-slot-definition
514                                            direct-slot-definition)
515   ())
516
517 (defclass standard-effective-slot-definition (standard-slot-definition
518                                               effective-slot-definition)
519   ((location ; nil, a fixnum, a cons: (slot-name . value)
520     :initform nil
521     :accessor slot-definition-location)))
522
523 (defclass condition-direct-slot-definition (condition-slot-definition
524                                             direct-slot-definition)
525   ())
526
527 (defclass condition-effective-slot-definition (condition-slot-definition
528                                                effective-slot-definition)
529   ())
530
531 (defclass structure-direct-slot-definition (structure-slot-definition
532                                             direct-slot-definition)
533   ())
534
535 (defclass structure-effective-slot-definition (structure-slot-definition
536                                                effective-slot-definition)
537   ())
538
539 (defclass specializer (metaobject)
540   ((type :initform nil :reader specializer-type)))
541
542 (defclass specializer-with-object (specializer) ())
543
544 (defclass exact-class-specializer (specializer) ())
545
546 (defclass class-eq-specializer (exact-class-specializer
547                                 specializer-with-object)
548   ((object :initarg :class
549            :reader specializer-class
550            :reader specializer-object)))
551
552 (defclass class-prototype-specializer (specializer-with-object)
553   ((object :initarg :class
554            :reader specializer-class
555            :reader specializer-object)))
556
557 (defclass eql-specializer (exact-class-specializer specializer-with-object)
558   ((object :initarg :object :reader specializer-object
559            :reader eql-specializer-object)))
560
561 (defvar *eql-specializer-table* (make-hash-table :test 'eql))
562
563 (defun intern-eql-specializer (object)
564   (or (gethash object *eql-specializer-table*)
565       (setf (gethash object *eql-specializer-table*)
566             (make-instance 'eql-specializer :object object))))
567
568 (defclass class (dependent-update-mixin
569                  definition-source-mixin
570                  specializer)
571   ((name
572     :initform nil
573     :initarg :name
574     :reader class-name)
575    (class-eq-specializer
576     :initform nil
577     :reader class-eq-specializer)
578    (direct-superclasses
579     :initform ()
580     :reader class-direct-superclasses)
581    ;; Note: The (CLASS-)DIRECT-SUBCLASSES for STRUCTURE-CLASSes and
582    ;; CONDITION-CLASSes are lazily computed whenever the subclass info
583    ;; becomes available, i.e. when the PCL class is created.
584    (direct-subclasses
585     :initform ()
586     :reader class-direct-subclasses)
587    (direct-methods
588     :initform (cons nil nil))
589    (%documentation
590     :initform nil
591     :initarg :documentation)
592    (finalized-p
593     :initform nil
594     :reader class-finalized-p)))
595
596 (def!method make-load-form ((class class) &optional env)
597   ;; FIXME: should we not instead pass ENV to FIND-CLASS?  Probably
598   ;; doesn't matter while all our environments are the same...
599   (declare (ignore env))
600   (let ((name (class-name class)))
601     (unless (and name (eq (find-class name nil) class))
602       (error "~@<Can't use anonymous or undefined class as constant: ~S~:@>"
603              class))
604     `(find-class ',name)))
605
606 ;;; The class PCL-CLASS is an implementation-specific common
607 ;;; superclass of all specified subclasses of the class CLASS.
608 (defclass pcl-class (class)
609   ((%class-precedence-list
610     :reader class-precedence-list)
611    ;; KLUDGE: see note in CPL-OR-NIL
612    (cpl-available-p
613     :reader cpl-available-p
614     :initform nil)
615    (can-precede-list
616     :initform ()
617     :reader class-can-precede-list)
618    (incompatible-superclass-list
619     :initform ()
620     :accessor class-incompatible-superclass-list)
621    (wrapper
622     :initform nil
623     :reader class-wrapper)
624    (prototype
625     :initform nil
626     :reader class-prototype)))
627
628 (defclass slot-class (pcl-class)
629   ((direct-slots
630     :initform ()
631     :accessor class-direct-slots)
632    (slots
633     :initform ()
634     :accessor class-slots)))
635
636 ;;; The class STD-CLASS is an implementation-specific common
637 ;;; superclass of the classes STANDARD-CLASS and
638 ;;; FUNCALLABLE-STANDARD-CLASS.
639 (defclass std-class (slot-class)
640   ())
641
642 (defclass standard-class (std-class)
643   ())
644
645 (defclass funcallable-standard-class (std-class)
646   ())
647
648 (defclass forward-referenced-class (pcl-class) ())
649
650 (defclass built-in-class (pcl-class) ())
651
652 (defclass condition-class (slot-class) ())
653
654 (defclass structure-class (slot-class)
655   ((defstruct-form
656      :initform ()
657      :accessor class-defstruct-form)
658    (defstruct-constructor
659      :initform nil
660      :accessor class-defstruct-constructor)
661    (from-defclass-p
662     :initform nil
663     :initarg :from-defclass-p)))
664
665 (defclass definition-source-mixin (standard-object)
666   ((source
667     :initform nil
668     :reader definition-source
669     :initarg :definition-source)))
670
671 (defclass plist-mixin (standard-object)
672   ((plist :initform () :accessor object-plist)))
673
674 (defclass dependent-update-mixin (plist-mixin) ())
675
676 (defparameter *early-class-predicates*
677   '((specializer specializerp)
678     (exact-class-specializer exact-class-specializer-p)
679     (class-eq-specializer class-eq-specializer-p)
680     (eql-specializer eql-specializer-p)
681     (class classp)
682     (slot-class slot-class-p)
683     (std-class std-class-p)
684     (standard-class standard-class-p)
685     (funcallable-standard-class funcallable-standard-class-p)
686     (condition-class condition-class-p)
687     (structure-class structure-class-p)
688     (forward-referenced-class forward-referenced-class-p)
689     (method method-p)
690     (standard-method standard-method-p)
691     (standard-accessor-method standard-accessor-method-p)
692     (standard-reader-method standard-reader-method-p)
693     (standard-writer-method standard-writer-method-p)
694     (standard-boundp-method standard-boundp-method-p)
695     (generic-function generic-function-p)
696     (standard-generic-function standard-generic-function-p)
697     (method-combination method-combination-p)
698     (long-method-combination long-method-combination-p)
699     (short-method-combination short-method-combination-p)))