From: Christophe Rhodes Date: Wed, 20 Nov 2002 15:40:34 +0000 (+0000) Subject: 0.7.9.59: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=89925c1f87e50d52862bf26bfa07962925ddb403;p=sbcl.git 0.7.9.59: No longer put an extra BLOCK NIL around named LOOPs. ... what were they thinking? It was very deliberate. Any ideas? --- diff --git a/NEWS b/NEWS index 09cfa7f..e0f8543 100644 --- a/NEWS +++ b/NEWS @@ -1352,6 +1352,9 @@ changes in sbcl-0.7.10 relative to sbcl-0.7.9: * minor incompatible change: TRUENAME now considers the truename of a file naming a directory to be the pathname with :DIRECTORY component indicating that directory. + * minor incompatible change: a NAMED clause in the extended form of + LOOP no longer causes a BLOCK named NIL to surround the LOOP. The + reason for the previous behaviour is unclear. * more systematization and improvement of CLOS and MOP conformance in PCL (thanks to Gerd Moellman and Pierre Mai): ** the standard ANSI CL generic function NO-NEXT-METHOD is now diff --git a/src/code/loop.lisp b/src/code/loop.lisp index 9f0612d..d03284b 100644 --- a/src/code/loop.lisp +++ b/src/code/loop.lisp @@ -1110,7 +1110,7 @@ code to be loaded. (when *loop-names* (loop-error "You may only use one NAMED clause in your loop: NAMED ~S ... NAMED ~S." (car *loop-names*) name)) - (setq *loop-names* (list name nil)))) + (setq *loop-names* (list name)))) (defun loop-do-return () (loop-pseudo-body (loop-construct-return (loop-get-form)))) @@ -1942,9 +1942,9 @@ code to be loaded. (defun loop-standard-expansion (keywords-and-forms environment universe) (if (and keywords-and-forms (symbolp (car keywords-and-forms))) - (loop-translate keywords-and-forms environment universe) - (let ((tag (gensym))) - `(block nil (tagbody ,tag (progn ,@keywords-and-forms) (go ,tag)))))) + (loop-translate keywords-and-forms environment universe) + (let ((tag (gensym))) + `(block nil (tagbody ,tag (progn ,@keywords-and-forms) (go ,tag)))))) (sb!int:defmacro-mundanely loop (&environment env &rest keywords-and-forms) (loop-standard-expansion keywords-and-forms env *loop-ansi-universe*)) diff --git a/tests/loop.pure.lisp b/tests/loop.pure.lisp index f282dea..307129b 100644 --- a/tests/loop.pure.lisp +++ b/tests/loop.pure.lisp @@ -97,9 +97,16 @@ '(1 2 3 4 5 6 7))) (multiple-value-bind (result error) - (ignore-errors (eval '(loop for i from 1 repeat 7 of-type fixnum collect i))) + (ignore-errors + (eval '(loop for i from 1 repeat 7 of-type fixnum collect i))) (assert (null result)) (assert (typep error 'program-error))) -(assert (equal (ignore-errors (loop for i from 1 repeat 6.5 collect i)) - (ignore-errors (loop for i from 1 repeat (eval '6.5) collect i)))) +(assert (equal + (ignore-errors (loop for i from 1 repeat 6.5 collect i)) + (ignore-errors (loop for i from 1 repeat (eval '6.5) collect i)))) + +(assert (eq (block nil + (loop named foo do (loop-finish) finally (return :good)) + :bad) + :good)) diff --git a/version.lisp-expr b/version.lisp-expr index 0f13d33..02d2641 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.9.58" +"0.7.9.59"