From 16062fad470533e429a12ac9cd0b9e53aa0e1e90 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Fri, 24 Apr 2009 12:46:38 +0000 Subject: [PATCH] 1.0.27.36: host CL symbols with other home packages 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 | 9 +++++++++ src/compiler/xref.lisp | 7 ++++++- version.lisp-expr | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/compiler/dump.lisp b/src/compiler/dump.lisp index 2f1958d..50f253d 100644 --- a/src/compiler/dump.lisp +++ b/src/compiler/dump.lisp @@ -974,6 +974,15 @@ (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 diff --git a/src/compiler/xref.lisp b/src/compiler/xref.lisp index ac1dad8..a358784 100644 --- a/src/compiler/xref.lisp +++ b/src/compiler/xref.lisp @@ -152,12 +152,17 @@ (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) diff --git a/version.lisp-expr b/version.lisp-expr index 20c9e58..963a79e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4