From: Nikodemus Siivola Date: Sat, 3 Mar 2007 10:49:26 +0000 (+0000) Subject: 1.0.3.19: the count argument in DOTIMES is known to be an integer X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=5830fefc45d371da71a89fe7d8fcde2c5119d36f;p=sbcl.git 1.0.3.19: the count argument in DOTIMES is known to be an integer * Declaring it as such for the non-constant expansion of dotimes allows the inversion of >= to < kick in for the termination test. --- diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index b4c6c36..5035116 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -326,15 +326,18 @@ ;;; destructuring mechanisms. (defmacro-mundanely dotimes ((var count &optional (result nil)) &body body) (cond ((numberp count) - `(do ((,var 0 (1+ ,var))) - ((>= ,var ,count) ,result) - (declare (type unsigned-byte ,var)) - ,@body)) - (t (let ((v1 (gensym))) - `(do ((,var 0 (1+ ,var)) (,v1 ,count)) - ((>= ,var ,v1) ,result) - (declare (type unsigned-byte ,var)) - ,@body))))) + `(do ((,var 0 (1+ ,var))) + ((>= ,var ,count) ,result) + (declare (type unsigned-byte ,var)) + ,@body)) + (t + (let ((c (gensym "COUNT"))) + `(do ((,var 0 (1+ ,var)) + (,c ,count)) + ((>= ,var ,c) ,result) + (declare (type unsigned-byte ,var) + (type integer ,c)) + ,@body))))) (defmacro-mundanely dolist ((var list &optional (result nil)) &body body) ;; We repeatedly bind the var instead of setting it so that we never diff --git a/version.lisp-expr b/version.lisp-expr index 38784a1..5550796 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".) -"1.0.3.18" +"1.0.3.19"