Hi,
I am relatively new to SBCL and SLIME, so maybe I'm wrong about this. I did not find restart-frame support for SBCL, so I did this patch and it seems to work for me.
RCS file: /project/slime/cvsroot/slime/swank-sbcl.lisp,v retrieving revision 1.151 diff -r1.151 swank-sbcl.lisp 929c929,933 < ---
(defimplementation restart-frame (index) (let ((frame (nth-frame index))) (return-from-frame index (sb-debug::frame-call-as-list frame))))
levy
________________________________________________________________________ Nézze meg az Üvegtigrist INGYEN! T-Online Téka kódolatlan hétvége január 13-15. www.t-online.hu
On Sat, Jan 14, 2006 at 11:11:18PM +0100, Mészáros Levente wrote: : Hi, : : I am relatively new to SBCL and SLIME, so maybe I'm wrong about this. I : did not find restart-frame support for SBCL, so I did this patch and it : seems to work for me.
Is it really this simple? Will it be committed to the project?
-Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??"
jcm@FreeBSD-uk.eu.org wrote:
On Sat, Jan 14, 2006 at 11:11:18PM +0100, Mészáros Levente wrote: : Hi, : : I am relatively new to SBCL and SLIME, so maybe I'm wrong about this. I : did not find restart-frame support for SBCL, so I did this patch and it : seems to work for me.
Is it really this simple?
Not quite. The restarted function will be run in the wrong dynamic environment. For example:
(declaim (optimize (debug 2)))
(defvar *a* 0)
(defun foo (a) (let ((*a* (1+ *a*))) (/ 2 a)))
(defun bar () (print *a*) (foo 0))
When you call BAR, it'll print 0 and then call FOO, which will signal an error. If we now restart BAR, the dynamic binding for *A* that FOO established will still be visibile, and it'll print 1 instead.