Improve recording of source information for most kinds of definitions <http://abcl.org/trac/ticket/415> #5
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:
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.
referenced this pull request
Oct 30, 2016
@alanruttenberg: As I understand your intention after this patch is finished, we will have two properties on symbols with associated source:
Once the code works well enough for SLIME, we would no longer need
Why does your code comment out the call to SET-ARGLIST in the precompiler? Does this need additional work, or an oversight on your part?
Why do functions need to record their names with a cons in place of a simple keyword (probably something basic than I am not getting)?
Shouldn't we distinguish between DEFUN, DEFMETHOD, and DEFGENERIC definitions for functions?
i.e. shouldn't we just replace the
If you agree on the symbol property key being 'SYSTEM:SOURCE', and can explain the bit about function source location using a cons to record its type, I'd go for merging this as a work in progress.
I had some trouble building with the arglist being set there. I think it is set elsewhere. Try getting arglists in the new build.
mop:add-direct-method is at least defined with defun at that location. It is later defined using atomic-defgeneric and looking at the expansion of that I can see that it is doing some funny business. It will need to be special-cased. It defines the generic function on a gensym.
(describe 'print-object) to see methods and generic-functions recorded
Functions are defined as cons because sometimes they are the symbol and sometimes they are the (setf xxx). In the latter case the source information is also kept on xxx.
:defstruct should be :structure. I'm trying to follow this bit in swank/sbcl.lisp. Will fix.
I'm fine with system:source