0.7.9.59:
authorChristophe Rhodes <csr21@cam.ac.uk>
Wed, 20 Nov 2002 15:40:34 +0000 (15:40 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Wed, 20 Nov 2002 15:40:34 +0000 (15:40 +0000)
No longer put an extra BLOCK NIL around named LOOPs.
... what were they thinking? It was very deliberate. Any ideas?

NEWS
src/code/loop.lisp
tests/loop.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 09cfa7f..e0f8543 100644 (file)
--- 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
index 9f0612d..d03284b 100644 (file)
@@ -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*))
index f282dea..307129b 100644 (file)
                '(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))
index 0f13d33..02d2641 100644 (file)
@@ -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"