1.0.27.36: host CL symbols with other home packages
authorChristophe Rhodes <csr21@cantab.net>
Fri, 24 Apr 2009 12:46:38 +0000 (12:46 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 24 Apr 2009 12:46:38 +0000 (12:46 +0000)
Genesis already knew about the case of a symbol exported from the CL
package with a different home package.  For repeatable FASLs, the dumper
and the xref internals detector also need to know.

2 commit messages follow:

special case dumping of CL symbols with other home packages

Just like in genesis, we need to deal with CL symbols which are
permitted to have a home package that's not CL.  SBCL doesn't do that,
but other implementations legitimately can and do; nevertheless, dump
as though it were a CL symbol.

xref cross-compilation consistency fixes

Treat as internal symbols (a) symbols with home package being "SB-XC",
and (b) symbols which are external in the CL package but whose home
package is elsewhere.

src/compiler/dump.lisp
src/compiler/xref.lisp
version.lisp-expr

index 2f1958d..50f253d 100644 (file)
   (let* ((pname (symbol-name s))
          (pname-length (length pname))
          (pkg (symbol-package s)))
+    ;; see comment in genesis: we need this here for repeatable fasls
+    #+sb-xc-host
+    (multiple-value-bind (cl-symbol cl-status)
+        (find-symbol (symbol-name s) sb!int:*cl-package*)
+      (when (and (eq s cl-symbol)
+                 (eq cl-status :external))
+        ;; special case, to work around possible xc host "design
+        ;; choice" weirdness in COMMON-LISP package
+        (setq pkg sb!int:*cl-package*)))
 
     (cond ((null pkg)
            (dump-fop* pname-length
index ac1dad8..a358784 100644 (file)
          (member (symbol-package what)
                  (load-time-value (list* (find-package "COMMON-LISP")
                                          (find-package "KEYWORD")
+                                         #+sb-xc-host (find-package "SB-XC")
                                          (remove-if-not
                                           (lambda (package)
                                             (= (mismatch "SB!"
                                                          (package-name package))
                                                3))
-                                          (list-all-packages)))))))
+                                          (list-all-packages)))))
+         #+sb-xc-host ; again, special case like in genesis and dump
+         (multiple-value-bind (cl-symbol cl-status)
+             (find-symbol (symbol-name what) sb!int:*cl-package*)
+           (and (eq what cl-symbol) (eq cl-status :external)))))
     (t t)))
 
 (defun record-xref (kind what context node path)
index 20c9e58..963a79e 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.27.35"
+"1.0.27.36"