From: Alexey Dejneka Date: Mon, 10 Jan 2005 08:04:19 +0000 (+0000) Subject: 0.8.18.24: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=0faed7c088edb23773442caf97746a0f001a195a;p=sbcl.git 0.8.18.24: * BACKQ-* wrappers have dynamic-extent argument lists. * Dereference FUNCTION designator argument of REDUCE at the beginning of the function. * Remove some FIXNUM declarations in REDUCE. --- diff --git a/src/code/backq.lisp b/src/code/backq.lisp index 49d1ba8..0e7896d 100644 --- a/src/code/backq.lisp +++ b/src/code/backq.lisp @@ -207,6 +207,7 @@ ;; whether there's still an optimizer bug, and fix it if so, and ;; then make these INLINE. `(defun ,b-name (&rest ,args) + (declare (dynamic-extent ,args)) (apply #',name ,args))))) (def backq-list list) (def backq-list* list*) diff --git a/src/code/seq.lisp b/src/code/seq.lisp index b05450e..631e848 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -1079,8 +1079,7 @@ ref) `(do ((index ,start (1+ index)) (value ,initial-value)) - ((= index (the fixnum ,end)) value) - (declare (fixnum index)) + ((>= index ,end) value) (setq value (funcall ,function value (apply-key ,key (,ref ,sequence index)))))) @@ -1094,8 +1093,7 @@ `(do ((index (1- ,end) (1- index)) (value ,initial-value) (terminus (1- ,start))) - ((= index terminus) value) - (declare (fixnum index terminus)) + ((<= index terminus) value) (setq value (funcall ,function (apply-key ,key (,ref ,sequence index)) value)))) @@ -1108,14 +1106,13 @@ initial-value ivp) `(let ((sequence (nthcdr ,start ,sequence))) - (do ((count (if ,ivp ,start (1+ (the fixnum ,start))) + (do ((count (if ,ivp ,start (1+ ,start)) (1+ count)) (sequence (if ,ivp sequence (cdr sequence)) (cdr sequence)) (value (if ,ivp ,initial-value (apply-key ,key (car sequence))) (funcall ,function value (apply-key ,key (car sequence))))) - ((= count (the fixnum ,end)) value) - (declare (fixnum count))))) + ((>= count ,end) value)))) (sb!xc:defmacro list-reduce-from-end (function sequence @@ -1124,17 +1121,15 @@ end initial-value ivp) - `(let ((sequence (nthcdr (- (the fixnum (length ,sequence)) - (the fixnum ,end)) + `(let ((sequence (nthcdr (- (length ,sequence) ,end) (reverse ,sequence)))) - (do ((count (if ,ivp ,start (1+ (the fixnum ,start))) + (do ((count (if ,ivp ,start (1+ ,start)) (1+ count)) (sequence (if ,ivp sequence (cdr sequence)) (cdr sequence)) (value (if ,ivp ,initial-value (apply-key ,key (car sequence))) (funcall ,function (apply-key ,key (car sequence)) value))) - ((= count (the fixnum ,end)) value) - (declare (fixnum count))))) + ((>= count ,end) value)))) ) ; EVAL-WHEN @@ -1142,7 +1137,8 @@ (function sequence &key key from-end start end (initial-value nil ivp)) (declare (type index start)) (let ((start start) - (end (or end length))) + (end (or end length)) + (function (%coerce-callable-to-fun function))) (declare (type index start end)) (cond ((= end start) (if ivp initial-value (funcall function))) diff --git a/version.lisp-expr b/version.lisp-expr index 2c11ea5..5f6b587 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; 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".) -"0.8.18.23" +"0.8.18.24"