-(define-compiler-macro (setf info) (&whole whole
- new-value
- class
- type
- name
- &optional (env-list nil env-list-p))
- ;; Constant CLASS and TYPE is an overwhelmingly common special case,
- ;; and we can resolve it much more efficiently than the general
- ;; case.
- (if (and (keywordp class) (keywordp type))
- (let* ((info (type-info-or-lose class type))
- (tin (type-info-number info)))
- (if env-list-p
- `(set-info-value ,name
- ,tin
- ,new-value
- (get-write-info-env ,env-list))
- `(set-info-value ,name
- ,tin
- ,new-value))))
- whole)
+(progn
+ ;; Not all xc hosts are happy about SETF compiler macros: CMUCL 19
+ ;; does not accept them at all, and older SBCLs give a full warning.
+ ;; So the easy thing is to hide this optimization from all xc hosts.
+ #-sb-xc-host
+ (define-compiler-macro (setf info)
+ (&whole whole new-value class type name &optional (env-list nil env-list-p))
+ ;; Constant CLASS and TYPE is an overwhelmingly common special case,
+ ;; and we can resolve it much more efficiently than the general
+ ;; case.
+ (if (and (keywordp class) (keywordp type))
+ (let* ((info (type-info-or-lose class type))
+ (tin (type-info-number info)))
+ (if env-list-p
+ `(set-info-value ,name
+ ,tin
+ ,new-value
+ (get-write-info-env ,env-list))
+ `(set-info-value ,name
+ ,tin
+ ,new-value))))
+ whole))