1.0.0.8:
[sbcl.git] / src / compiler / seqtran.lisp
index 57a9d0f..323dcad 100644 (file)
                                 ,n-sequence ,start ,n-end)))
          (block ,block
            (macrolet ((maybe-return ()
-                        '(let ((,element (aref ,sequence ,index)))
+                        ;; WITH-ARRAY-DATA has already performed bounds
+                        ;; checking, so we can safely elide the checks
+                        ;; in the inner loop.
+                        '(let ((,element (locally (declare (optimize (insert-array-bounds-checks 0)))
+                                           (aref ,sequence ,index))))
                            (when ,done-p-expr
                              (return-from ,block
                                (values ,element