+(defun preinform-compiler-about-accessors (readers writers slots)
+ (flet ((inform (name type)
+ ;; FIXME: This matches what PROCLAIM FTYPE does, except
+ ;; that :WHERE-FROM is :DEFINED, not :DECLARED, and should
+ ;; probably be factored into a common function -- eg.
+ ;; (%proclaim-ftype name declared-or-defined).
+ (when (eq (info :function :where-from name) :assumed)
+ (proclaim-as-fun-name name)
+ (note-name-defined name :function)
+ (setf (info :function :where-from name) :defined
+ (info :function :type name) type))))
+ (let ((rtype (specifier-type '(function (t) t)))
+ (wtype (specifier-type '(function (t t) t))))
+ (dolist (reader readers)
+ (inform reader rtype))
+ (dolist (writer writers)
+ (inform writer wtype))
+ (dolist (slot slots)
+ (inform (slot-reader-name slot) rtype)
+ (inform (slot-boundp-name slot) rtype)
+ (inform (slot-writer-name slot) wtype)))))
+