From: trittweiler Date: Thu, 12 Nov 2009 15:10:04 +0000 (+0000) Subject: 1.0.32.29: Add build flag :sb-xref-for-internals. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=49e8403800426f37a54d9b87353a31af36e7af40;p=sbcl.git 1.0.32.29: Add build flag :sb-xref-for-internals. Enabling :sb-xref-for-internals in customize-target-features.lisp, will make Sbcl collect Xref data about itself during the build. This increases the core size drastically by about 5-6mb, but it's useful for SBCL developers because they can now use M-? (slime-edit-uses) to get a list of call/expansion/reference sites for internal stuff. It may be interesting to Lisp advocacy who can now show off with finding the use sites of standardized functions like CONS, etc. :-) Additionally -- regardless of :sb-xref-for-internals --, we now also collect xref data for keywords because they're "fine" names for functions and macros, and I know of people who use MACROLET on keywords for their DSLs. --- diff --git a/NEWS b/NEWS index aee52cf..5ebc074 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,11 @@ changes relative to sbcl-1.0.32: * new feature: SB-INTROSPECT:WHO-SPECIALIZES-GENERALLY to get a list of definitions for methods specializing on the passed class itself, or on subclasses of it. + * new build flag: :sb-xref-for-internals; SBCL will collect xref information + about itself during the build (e.g. for M-? in Slime), if this flag is + enabled in customize-target-features.lisp. This will increase the core + size by about 5-6mb, though, so it's mostly interesting to SBCL + developers. * fixes and improvements related to Unicode and external formats: ** the Unicode character database has been upgraded to the Unicode 5.2 standard, giving names and properties to a number of new diff --git a/base-target-features.lisp-expr b/base-target-features.lisp-expr index 50b732e..770949a 100644 --- a/base-target-features.lisp-expr +++ b/base-target-features.lisp-expr @@ -261,6 +261,12 @@ ;; increases core size by about 100kB. :sb-source-locations + ;; Record xref data for SBCL internals. This can be rather useful for + ;; people who want to develop on SBCL itself because it'll make M-? + ;; (slime-edit-uses) work which lists call/expansion/etc. sites. + ;; It'll increase the core size by major 5-6mB, though. + ; :sb-xref-for-internals + ;; This affects the definition of a lot of things in bignum.lisp. It ;; doesn't seem to be documented anywhere what systems it might apply ;; to. It doesn't seem to be needed for X86 systems anyway. diff --git a/src/compiler/xref.lisp b/src/compiler/xref.lisp index 4bf2fd0..5140421 100644 --- a/src/compiler/xref.lisp +++ b/src/compiler/xref.lisp @@ -130,26 +130,29 @@ nil))))))) (defun internal-name-p (what) - ;; Don't store XREF information for internals. We define as internal - ;; anything named only by symbols from either implementation - ;; packages, COMMON-LISP or KEYWORD. The last one is useful for - ;; example when dealing with ctors. + ;; Unless we're building with SB-XREF-FOR-INTERNALS, don't store + ;; XREF information for internals. We define anything with a symbol + ;; from either an implementation package or from COMMON-LISP as + ;; internal (typecase what (list (every #'internal-name-p what)) (symbol + #!+sb-xref-for-internals + (eq '.anonymous. what) + #!-sb-xref-for-internals (or (eq '.anonymous. what) (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))))) - #+sb-xc-host ; again, special case like in genesis and dump + (load-time-value + (list* (find-package "COMMON-LISP") + #+sb-xc-host (find-package "SB-XC") + (remove-if-not + (lambda (package) + (= (mismatch "SB!" + (package-name package)) + 3)) + (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))))) diff --git a/version.lisp-expr b/version.lisp-expr index 191d195..8429184 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.32.28" +"1.0.32.29"