;;;; -*- coding: utf-8; fill-column: 78 -*-
-changes relative to sbcl-1.0.36:
+changes relative to sbcl-1.0.37:
* INCOMPATIBLE CHANGE: Thread names are now restricted to SIMPLE-STRINGs
like for any other thread-related datastructure (MUTEX, etc.)
* DEPRECATION: the SB-QUEUE contrib was merged into the SB-CONCURRENCY
CONDITION-NOTIFY on Linux. See threads "lost wakeup in condition-wait /
condition-notify" (Feb 2010) and "Condition-Wait, Deadline handler, waking
up itself" (March 2010) for further details.
+ * bug fix: allow forward FIND and POSITION on lists to elide checking :END
+ against length of the list if the element is found before the specified
+ END is reached. (thanks to Alec Berryman, lp#554385)
changes in sbcl-1.0.37 relative to sbcl-1.0.36:
* enhancement: Backtrace from THROW to uncaught tag on x86oids now shows
(second got) ',lambda)))))
(test sb-kernel:bounding-indices-bad-error
(lambda ()
- (find :foo '(1 2 3 :foo) :start 1 :end 5)))
+ (find :foo '(1 2 3 :foo) :start 1 :end 5 :from-end t)))
(test sb-kernel:bounding-indices-bad-error
(lambda ()
- (position :foo '(1 2 3 :foo) :start 1 :end 5)))
+ (position :foo '(1 2 3 :foo) :start 1 :end 5 :from-end t)))
(test sb-kernel:bounding-indices-bad-error
(lambda ()
- (find :foo '(1 2 3 :foo) :start 3 :end 0)))
+ (find :foo '(1 2 3 :foo) :start 3 :end 0 :from-end t)))
(test sb-kernel:bounding-indices-bad-error
(lambda ()
- (position :foo '(1 2 3 :foo) :start 3 :end 0)))
+ (position :foo '(1 2 3 :foo) :start 3 :end 0 :from-end t)))
(test type-error
(lambda ()
(let ((list (list 1 2 3 :foo)))
(lambda ()
(let ((list (list 1 2 3 :foo)))
(position :bar (nconc list list)))))))
+
+(with-test (:name :bug-554385)
+ ;; FIND-IF shouldn't look through the entire list.
+ (assert (= 2 (find-if #'evenp '(1 2 1 1 1 1 1 1 1 1 1 1 :foo))))
+ ;; Even though the end bounds are incorrect, the
+ ;; element is found before that's an issue.
+ (assert (eq :foo (find :foo '(1 2 3 :foo) :start 1 :end 5)))
+ (assert (= 3 (position :foo '(1 2 3 :foo) :start 1 :end 5))))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.37.35"
+"1.0.37.36"