1.0.5.9: experimental semi-synchronous deadlines
[sbcl.git] / src / compiler / globaldb.lisp
index 45e10d8..c5e1a7a 100644 (file)
                         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)
   :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