[armedbear] #421: Improve recording of source information for most kinds of definitions

armedbear armedbear-devel at common-lisp.net
Thu Nov 17 09:08:21 UTC 2016


#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
    Resolution:               |   Keywords:  github-issue
Parent Tickets:               |
------------------------------+--------------------------

Comment (by mevenson):

 @alanruttenberg: As I understand your intention after this patch is
 finished, we will have two properties on symbols with associated source:
 ||Symbol ||     Contents ||
 ||SYSTEM::%SOURCE ||    (PATHNAME . SOURCE-LINE)||
 ||SYSTEM::%SOURCE-BY-TYPE ||    ((KEYWORD-FOR-TYPE-OR-FUNCTION-INFO
 PATHNAME SOURCE-LINE) …)) ||

 where KEYWORD-FOR-TYPE-OR-FUNCTION-INFO would be one of :CONDITION,
 :VARIABLE, :KEYWORD, :MACRO, :COMPILER-MACRO, :PACKAGE, :DEFSTRUCT, :SETF-
 EXPANDER, :CONSTANT, :SOURCE-TRANSFORM and for both functions and generic
 functions a list of the form (:FUNCTION name-of-function)

 Once the code works well enough for SLIME, we would no longer need
 SYSTEM::%SOURCE (assuming that no one else consumes such symbol
 properties, which is a bit of a stretch, so I would go for an announced
 deprecation route for abcl-1.6.0 or something).

     Shouldn't we take the opportunity to export and normalize the property
 list key we are using?

 Instead of SYSTEM::%SOURCE-BY-TYPE let's move to SYSTEM:SOURCE, which will
 be the standard interface going forwards.

     Uncomment code for arglist?

 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?

     Inconsistent KEYWORD-FOR-TYPE with DEFMETHOD

 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 (:FUNCTION MOP:ADD-DIRECT-METHOD) with
 :GENERIC-FUNCTION?

 (get 'mop:add-direct-method 'system::%source-by-type)
 (((:FUNCTION MOP:ADD-DIRECT-METHOD)
   "/Users/evenson/work/abcl.git/src/org/armedbear/lisp/clos.lisp"
   100215))

 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.

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


More information about the armedbear-ticket mailing list