defpackage.lisp 6.96 KB
Dramatically improve source recording on SYS::SOURCE plist for a symbol (Alan Ruttenberg) · e435b86f
The interface to recording information on the SYS:%SOURCE plist for a symbol is now deprecated and will be removed with abcl-1.7. Implementation -------------- Source information for ABCL is now recorded on the SYS::SOURCE property. The appropiate information for type is recorded by the SYS::RECORD-SOURCE-INFORMATION-BY-TYPE function: record-source-information-by-type (name type &optional source-pathname source-position) TYPE is either a symbol or list. Source information for functions, methods, and generic functions are represented as lists of the following form: (:generic-function function-name) (:function function-name) (:method method-name qualifiers specializers) Where FUNCTION-NAME or METHOD-NAME can be a either be of the form 'symbol or '(setf symbol). Source information for all other forms have a symbol for TYPE which is one of the following: :class, :variable, :condition, :constant, :compiler-macro, :macro :package, :structure, :type, :setf-expander, :source-transform These values follow SBCL'S implemenation in SLIME c.f. <https://github.com/slime/slime/blob/bad2acf672c33b913aabc1a7facb9c3c16a4afe9/swank/sbcl.lisp#L748> Modifications are in two places, one at the definitions, calling record-source-information-by-type and then again in the file-compiler, which writes forms like (put 'source name (cons (list type pathname position) (get 'source name))) In theory this can lead to redundancy if a fasl is loaded again and again. I'm not sure how to fix this yet. Forms in the __loader__ get called early in build when many of the sequence functions aren't present. Will probably just filter when presenting in slime. <> :closes <http://abcl.org/trac/ticket/421> . <> :merges <https://github.com/armedbear/abcl/pull/5> .