(t
(expand-or-get-setf-inverse form environment)))))
-;;; GET-SETF-METHOD existed in pre-ANSI Common Lisp, and various code inherited
-;;; from CMU CL uses it repeatedly, so rather than rewrite a lot of code to not
-;;; use it, we just define it in terms of ANSI's GET-SETF-EXPANSION (or
-;;; actually, the cross-compiler version of that, i.e.
-;;; SB!XC:GET-SETF-EXPANSION).
-(declaim (ftype (function (t &optional (or null sb!c::lexenv))) get-setf-method))
-(defun get-setf-method (form &optional environment)
- #!+sb-doc
- "This is a specialized-for-one-value version of GET-SETF-EXPANSION (and
-a relic from pre-ANSI Common Lisp). Portable ANSI code should use
-GET-SETF-EXPANSION directly."
- (multiple-value-bind (temps value-forms store-vars store-form access-form)
- (sb!xc:get-setf-expansion form environment)
- (when (cdr store-vars)
- (error "GET-SETF-METHOD used for a form with multiple store ~
- variables:~% ~S"
- form))
- (values temps value-forms store-vars store-form access-form)))
-
;;; If a macro, expand one level and try again. If not, go for the
;;; SETF function.
(declaim (ftype (function (t (or null sb!c::lexenv)))
(eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute)
;;; Assign SETF macro information for NAME, making all appropriate checks.
- (defun assign-setf-macro (name expander inverse doc)
+ (defun assign-setf-macro (name expander expander-lambda-list inverse doc)
+ #+sb-xc-host (declare (ignore expander-lambda-list))
(with-single-package-locked-error
(:symbol name "defining a setf-expander for ~A"))
(cond ((gethash name sb!c:*setf-assumed-fboundp*)
(style-warn "defining setf macro for ~S when ~S is fbound"
name `(setf ,name))))
(remhash name sb!c:*setf-assumed-fboundp*)
+ #-sb-xc-host
+ (when expander
+ (setf (%fun-lambda-list expander) expander-lambda-list))
;; FIXME: It's probably possible to join these checks into one form which
;; is appropriate both on the cross-compilation host and on the target.
(when (or inverse (info :setf :inverse name))
`(eval-when (:load-toplevel :compile-toplevel :execute)
(assign-setf-macro ',access-fn
nil
+ nil
',(car rest)
,(when (and (car rest) (stringp (cadr rest)))
`',(cadr rest)))))
(%defsetf ,access-form ,(length store-variables)
(lambda (,whole)
,body)))
+ ',lambda-list
nil
',doc))))))
(t
(lambda (,whole ,environment)
,@local-decs
,body)
+ ',lambda-list
nil
',doc)))))