#421: Improve recording of source information for most kinds of definitions --------------------------+---------------------------- Reporter: mevenson | Owner: Type: enhancement | Status: new Priority: major | Milestone: 1.5.0 Component: interpreter | Version: 1.5.0-dev Keywords: github-issue | Parent Tickets: --------------------------+---------------------------- Alan proposes in https://github.com/armedbear/abcl/pull/5:
Improve recording of source information for most kinds of definitions e.g.
(describe 'split-at-char) SPLIT-AT-CHAR is an internal symbol in the COMMON-LISP-USER package. Its function binding is #<SPLIT-AT-CHAR {4D969FD4}>. The function's lambda list is: (STRING CHAR) The symbol's property list contains these indicator/value pairs: SYSTEM::%SOURCE-BY-TYPE ((:COMPILER-MACRO "/Users/alanr/repos/lsw2/util/string.lisp" 1039) ((:FUNCTION SPLIT-AT-CHAR) "/Users/alanr/repos/lsw2/util/string.lisp" 687)) SYSTEM::%SOURCE (#P"/Users/lori/repos/lsw2/util/string.lisp" . 687)
I followed the source types in slime's swank/sbcl.lisp
This is preliminary to adding support for using this information in slime.
What should be recorded:
packages classes functions macros compiler-macros setf-expanders methods conditions structures types source-transforms variables constants
Implementation
fdefinition.lisp has the function record-source-information-for-type For interactive evaluation it does the work. For file compiling there are additions to compile-file.lisp that add forms after the prologue that add the information when fasl loading, during which recording by record- source-information-for-type is disabled, so it doesn't record the source positions in the fasl header.
As you see, I haven't got rid of the now redundant sys:%source property. Once slime has been adjusted it might be worth doing so.
Right now the absolute pathnames are recorded, but it might make sense to use logical pathnames if there were ones set up, though I expect the slime support with do some dwimming in any case.
-- Ticket URL: http://abcl.org/trac/ticket/421 armedbear http://abcl.org armedbear