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 (!fix-early-generic-functions
)
28 (fmakunbound 'ensure-accessor
)
29 (defun ensure-accessor (fun-name) ; Make FUN-NAME exist as a GF if it doesn't
30 (destructuring-bind (slot-name method
) (cddr fun-name
)
31 ;; FIXME: change SLOT-OBJECT here to T to get SLOT-MISSING
32 ;; behaviour for non-slot-objects too?
33 (let ((reader-specializers (load-time-value (list (find-class 'slot-object
)) t
))
34 (writer-specializers (load-time-value (list (find-class 't
)
35 (find-class 'slot-object
)) t
)))
36 (multiple-value-bind (lambda-list specializers method-class initargs doc
)
39 (values '(object) reader-specializers
'global-reader-method
40 (make-std-reader-method-function 'slot-object slot-name
)
41 "automatically-generated reader method"))
43 (values '(new-value object
) writer-specializers
45 (make-std-writer-method-function 'slot-object slot-name
)
46 "automatically-generated writer method"))
48 (values '(object) reader-specializers
'global-boundp-method
49 (make-std-boundp-method-function 'slot-object slot-name
)
50 "automatically-generated boundp method")))
51 (let ((gf (ensure-generic-function fun-name
:lambda-list lambda-list
)))
52 (add-method gf
(make-a-method method-class
53 () lambda-list specializers
54 initargs doc
:slot-name slot-name
)))))))
56 (dolist (gf-name *!temporary-ensure-accessor-functions
*)
57 ; (format t "~&Genericizing ~S~%" gf-name)
59 (ensure-accessor gf-name
))
61 (compute-standard-slot-locations)
62 (dolist (s '(condition function structure-object
))
63 (dohash ((k v
) (classoid-subclasses (find-classoid s
)))
65 (find-class (classoid-name k
))))
66 (setq **boot-state
** 'complete
)