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

armedbear armedbear-devel at common-lisp.net
Thu Nov 17 09:09:14 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):

 Alan replies:

 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.
 {{{
 ;;; To be redefined as generic functions later
 (defun add-direct-method (specializer method) ...

 (describe 'print-object) to see methods and generic-functions recorded

   ((:METHOD PRINT-OBJECT NIL (STANDARD-OBJECT T))
    "/Users/lori/repos/abcl/src/org/armedbear/lisp/print-object.lisp" 1878)
   ((:METHOD PRINT-OBJECT NIL (T T))
    "/Users/lori/repos/abcl/src/org/armedbear/lisp/print-object.lisp" 1715)
   ((:GENERIC-FUNCTION PRINT-OBJECT)
    "/Users/lori/repos/abcl/src/org/armedbear/lisp/print-object.lisp"
 1672))
 }}}
 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.

 e.g.
 {{{
 (defun (setf jfield) (newvalue class-ref-or-field field-or-instance
               &optional (instance nil instance-supplied-p) unused-value)
   (declare (ignore unused-value))
   (if instance-supplied-p
       (jfield class-ref-or-field field-or-instance instance newvalue)
       (jfield class-ref-or-field field-or-instance nil newvalue)))

 :defstruct should be :structure. I'm trying to follow this bit in
 swank/sbcl.lisp. Will fix.

 (defparameter *definition-types*
   '(:variable defvar
     :constant defconstant
     :type deftype
     :symbol-macro define-symbol-macro
     :macro defmacro
     :compiler-macro define-compiler-macro
     :function defun
     :generic-function defgeneric
     :method defmethod
     :setf-expander define-setf-expander
     :structure defstruct
     :condition define-condition
     :class defclass
     :method-combination define-method-combination
     :package defpackage
     :transform :deftransform
     :optimizer :defoptimizer
     :vop :define-vop
     :source-transform :define-source-transform
     :ir1-convert :def-ir1-translator
     :declaration declaim
     :alien-type :define-alien-type)
   "Map SB-INTROSPECT definition type names to Slime-friendly forms")
 }}}

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


More information about the armedbear-ticket mailing list