,(nreverse *loop-after-body*)
,(nreconc *loop-epilogue*
(nreverse *loop-after-epilogue*)))))
- (do () (nil)
- (setq answer `(block ,(pop *loop-names*) ,answer))
- (unless *loop-names* (return nil)))
(dolist (entry *loop-bind-stack*)
(let ((vars (first entry))
(dcls (second entry))
,vars
,@(loop-build-destructuring-bindings crocks
forms)))))))
+ (do () (nil)
+ (setq answer `(block ,(pop *loop-names*) ,answer))
+ (unless *loop-names* (return nil)))
answer)))
(defun loop-iteration-driver ()
(,packages `,(mapcar (lambda (package)
(if (packagep package)
package
- (find-package package)))
+ ;; Maybe FIND-PACKAGE-OR-DIE?
+ (or (find-package package)
+ (error 'simple-package-error
+ ;; could be a character
+ :name (string package)
+ :format-control "~@<~S does not name a package ~:>"
+ :format-arguments (list package)))))
(if (consp ,these-packages)
,these-packages
(list ,these-packages))))
`(setf ,package-use-list (package-%use-list (car ,packages)))
`(declare (ignore ,package-use-list)))
(macrolet ((,init-macro (next-kind)
+ (declare (optimize (inhibit-warnings 3)))
(let ((symbols (gensym)))
`(progn
(setf ,',kind ,next-kind)
(flet ((,real-symbol-p (number)
(> number 1)))
(macrolet ((,mname ()
+ (declare (optimize (inhibit-warnings 3)))
`(block ,',BLOCK
(loop
(case ,',kind
(let ((*package* (find-package :cl)))
(assert (= (loop for x being each external-symbol count t) 978)))
+
+(assert (eq (loop for a = (return t) return nil) t))
+
+(multiple-value-bind (result error)
+ (ignore-errors
+ (loop for nil being the external-symbols of :nonexistent-package
+ count t))
+ (assert (null result))
+ (assert (typep error 'package-error)))