From: kr <kr...@n-...> - 2005-09-05 06:16:49
|
Juho Snellman writes: > >> - i have not yet tried to rebuild a whole sbcl image, but my fix works > >> when i redefine in a running image the functions involved > > I probably stopped about here the first time around. Spending time > looking at a patch possibly fixing an old low-priority problem, that's > never been tested on a clean build, that's made against a 6-months old > version of SBCL didn't strike me as the best way to spend my limited > SBCL hacking time. alright, thanks for replying anyway. it is good to hear at least some feedback. unfortunately, my spare time is also extremely limited... so i did now spend the time necessary to turn this into a real patch that i can apply to sbcl-0.9.4, which lets sbcl build fine and pass the tests as well. it was actually quite an ordeal, and a good deal more tricky than i had anticipated. after a couple of wild goose chases, i was able to round up what i was missing. it ate up my spare time of the last several weekends. but here it is: the patch below supersedes what i submitted earlier. > I'm sure that a working and tested patch that doesn't break any tests > would be considered. Bonus points for including a new test for > whatever was fixed. i even concocted a simple test that checks that a defun loaded from a *.lisp file will have the filename stored, instead of the form. it is less clear to me where exactly this test should go. i put it in tests/compiler.impure.lisp , because all this source recording stuff is really a compiler issue. with this, i can apply the test patch to sbcl-0.9.4 first, to see how the test fails, and then add the real patch, rebuild, and see the test succeed. just so we do not forget: the following comment in target-load.lisp , just before (defun load ...) can now probably be removed: ;;; FIXME: Daniel Barlow's ilsb.tar ILISP-for-SBCL patches contain an ;;; implementation of "DEFUN SOURCE-FILE" which claims, in a comment, that CMU ;;; CL does not correctly record source file information when LOADing a ;;; non-compiled file. Check whether this bug exists in SBCL and fix it if so. -- regards markus krummenacker firebird:/lisp/sbcl/sbcl-0.9.4$ diff -u tests/compiler.impure.lisp.~1~ tests/compiler.impure.lisp --- tests/compiler.impure.lisp.~1~ Thu Jul 14 09:30:43 2005 +++ tests/compiler.impure.lisp Thu Sep 1 22:26:59 2005 @@ -1067,5 +1067,21 @@ (test f2 42 (1+ most-positive-fixnum)))) (assert (= e-count 4))))) +;;;kr050830: test whether source recording is now done correctly (after sbcl-0.9.4), +;;; when loading a *.lisp file. +;;; +(let* ((src-name (sb-c::debug-source-name + (sb-c::debug-info-source + (sb-kernel:%code-debug-info + (sb-kernel:fun-code-header + ;; any fn in this file will do for this test. + ;; it does not matter much which one, + ;; but watch the change in packages in this file ! + (symbol-function 'grovel-results))))))) + (assert (or (pathnamep src-name) + (stringp src-name))) + (assert (equal (truename src-name) (truename *load-pathname*))) + ) + ;;; success (quit :unix-status 104) |