Hello, All!
i'm trying to debug SLIME for ABCL implementation -- it appears that SLIME causes some compiler error with it..
i've noticed that defect happens in functions that are generated on-fly by SLIME. this looks like for each form in REPL (or so) SLIME do (compile nil [something]) several of times.. ABCL produces a temp file for each form compiled this way, so i see this temp files being created.
i thought maybe it compiles forms from REPL -- but no, stuff from REPL is running in interpreted mode..
so this is weird.. does anyone have an idea what does it compile and why?
it's possible that it's caused not by SLIME but by ABCL itself. anyway i'd like to know what SLIME does.
i would also appreciate any tips on investigating this.
With best regards, Alex Mizrahi.
+ "Alex Mizrahi" killerstorm@newmail.ru:
| so this is weird.. does anyone have an idea what does it compile and why?
Slime starts the background lisp and then feeds it a progn form to load swank-loader.lisp, which in turn causes the whole swank package to be compiled, and then to run swank:start-server with suitable arguments.
As to why, well, slime is the front end and swank is the back end, and the two need to talk the proper protocol. Swank is compiled for efficiency reasons.
| i would also appreciate any tips on investigating this.
I suppose the same way you study any problem with loading and compiling lisp code. Start with swank-loader.lisp, note where the problem arises and use the debugger and whatever tools are handy to find the location of the error.
- Harald
(message (Hello 'Harald) (you :wrote :on '(Fri, 16 Mar 2007 16:11:59 +0100 (CET))) (
HHO> As to why, well, slime is the front end and swank is the back end, and HHO> the two need to talk the proper protocol. Swank is compiled for HHO> efficiency reasons.
well, i meant what does it compile when it's already loaded -- in response to events in REPL.
i've found single place where it does (compile nil:
(let ((regex-hash (make-hash-table :test #'equal))) (defun compiled-regex (regex-string) (or (gethash regex-string regex-hash) (setf (gethash regex-string regex-hash) (if (zerop (length regex-string)) (lambda (s) (check-type s string) t) (compile nil (slime-nregex:regex-compile regex-string)))))))
i suspect it's highly likely that ABCL chokes on attempts to compile some regex function.. but it's not that simple -- possibly it's superposition of several bugs in ABCL :).
) (With-best-regards '(Alex Mizrahi) :aka 'killer_storm) "?? ???? ??????? ?????")
+ "Alex Mizrahi" killerstorm@newmail.ru:
| well, i meant what does it compile when it's already loaded -- in | response to events in REPL.
Ah. Sorry, I didn't understand what you meant and guessed wrong.
| i've found single place where it does (compile nil: | | (let ((regex-hash (make-hash-table :test #'equal))) | (defun compiled-regex (regex-string) | (or (gethash regex-string regex-hash) | (setf (gethash regex-string regex-hash) | (if (zerop (length regex-string)) | (lambda (s) (check-type s string) t) | (compile nil (slime-nregex:regex-compile regex-string)))))))
And compiled-regex is used (indirectly) by apropos-list-for-emacs, which can certainly be called as a result of REPL events. In fact, lots of stuff can happen in the lisp in response to events on the emacs side.
| i suspect it's highly likely that ABCL chokes on attempts to compile | some regex function.. but it's not that simple -- possibly it's | superposition of several bugs in ABCL :).
Well, I don't use ABCL myself, so I am certainly the wrong person to ask. Is the problem here that you don't get a debugger, so you can dig around in the backtrace and find out what is going on? But if you look in the *slime-events* buffer, maybe you can find exactly what emacs sent to swank. Then you could try running the offending command directly in ABCL and see if that gets you into the debugger.
- Harald