0.7.10.32:
[sbcl.git] / src / compiler / ir1opt.lisp
index 1c878eb..199f560 100644 (file)
        (null (lambda-var-sets leaf)))
       (defined-fun
        (not (eq (defined-fun-inlinep leaf) :notinline)))
+      #!+(and (not sb-fluid) (not sb-xc-host))
       (global-var
        (case (global-var-kind leaf)
-        (:global-function t))))))
+        (:global-function (let ((name (leaf-source-name leaf)))
+                             (when (consp name)
+                               (aver (eq (first name) 'setf))
+                               (setq name (second name)))
+                             (eq (symbol-package name)
+                                 *cl-package*))))))))
 
 ;;; If we have a non-set LET var with a single use, then (if possible)
 ;;; replace the variable reference's CONT with the arg continuation.