[slime-devel] cmucl source-location and slime cvs problem

Helmut Eller e9626484 at stud3.tuwien.ac.at
Sat Apr 17 10:15:57 UTC 2004


Raymond Toy <rtoy at earthlink.net> writes:

> I think I finally tracked this down.  In cmucl cvs, Helmut's
> source-location patches have been incorporated.  However,
> swank-cmucl.lisp references some unknown functions such as
> file-source-location-tlf-number.  There's also a bug in
> resolve-file-source-location:

My experimental version looked a bit differently from the version in
cmucl cvs.

>
>   (defun resolve-file-source-location (location)
>     (let ((filename (c::file-source-location-pathname location))
>           (tlf-number (c::file-source-location-tlf-number location))
>           (form-number (c::file-source-location-tlf-number location)))
>
> Presumably the tlf-number and form-number should not be the same;
> form-number should be from file-source-location-form-number.

Hehe, I wonder how this ever worked.

> Anyway, attached is a simple hack patch that fixes these issues.  At
> least slime is now working again with cmucl cvs.  :-1
>
> Thanks for the great tool!
>
> Ray
>
> Index: swank-cmucl.lisp

Thanks for the patch. I applied it.

BTW, what do you think about recording the source location for defvar,
defparamater and defconst?  A simple way to do it, would be to store
the source location in the property list, like so:

(defmacro defvar (var &optional (val nil valp) (doc nil docp))
  `(progn
    (setf (get (quote ,var) 'source-location) (c::source-location))
    (declaim (special ,var))
     ,@(when valp
	 `((unless (boundp ',var)
	     (setq ,var ,val))))
    ,@(when docp
	`((setf (documentation ',var 'variable) ',doc)))
    ',var))

Perhaps there is a more GC friendly place than the property list.  I
haven't tried, but I hope that recording the source location for
variables doesn't need too much space.

Helmut.




More information about the slime-devel mailing list