[armedbear] #415: Fixes to compiler to record source information

armedbear armedbear-devel at common-lisp.net
Thu Nov 24 10:35:06 UTC 2016


#415: Fixes to compiler to record source information
------------------------------+----------------------
      Reporter:  mevenson     |      Owner:  mevenson
          Type:  enhancement  |     Status:  assigned
      Priority:  major        |  Milestone:  1.5.0
     Component:  compiler     |    Version:
    Resolution:               |   Keywords:
Parent Tickets:               |
------------------------------+----------------------

Comment (by mevenson):

 Merged with <http://abcl.org/trac/changeset/14914> ff.

 The interface to recording information on the SYS:%SOURCE plist for a
 symbol is now deprecated and will be removed with abcl-1.7.

 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.

 <> :merges <​https://github.com/armedbear/abcl/pull/5> .

--
Ticket URL: <http://abcl.org/trac/ticket/415#comment:2>
armedbear <http://abcl.org>
armedbear


More information about the armedbear-ticket mailing list