X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fglobaldb.lisp;h=c5e1a7a938f7fc47095444c7e088edf45e7fee48;hb=11fa2359dd9dc3fbb84a9b80b255617e4792bd0e;hp=45e10d8d6e09793d921ac2aca56e238a68148af3;hpb=c103e75ed3eaf47bda3407d663fd64f09215dc11;p=sbcl.git diff --git a/src/compiler/globaldb.lisp b/src/compiler/globaldb.lisp index 45e10d8..c5e1a7a 100644 --- a/src/compiler/globaldb.lisp +++ b/src/compiler/globaldb.lisp @@ -788,27 +788,33 @@ new-value))) new-value) #!-sb-fluid -(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)) ;;; the maximum density of the hashtable in a volatile env (in ;;; names/bucket) @@ -930,7 +936,7 @@ :default #+sb-xc-host (specifier-type 'function) #-sb-xc-host (if (fboundp name) - (extract-fun-type (fdefinition name)) + (specifier-type (sb!impl::%fun-type (fdefinition name))) (specifier-type 'function))) ;;; the ASSUMED-TYPE for this function, if we have to infer the type