From 857677f1ca266bd41d7804a8fd88aaac8c73f93f Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Wed, 28 Dec 2011 20:50:32 +0100 Subject: [PATCH] Rewrite DOTIMES to adapt to the new type checking scheme. --- src/cmp/cmpopt-type.lsp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/cmp/cmpopt-type.lsp b/src/cmp/cmpopt-type.lsp index 7e522d509..0dd9e86bd 100644 --- a/src/cmp/cmpopt-type.lsp +++ b/src/cmp/cmpopt-type.lsp @@ -18,18 +18,21 @@ (multiple-value-bind (declarations body) (si:process-declarations body nil) (ext:with-unique-names (%limit) - (setf body `(si::while (< ,variable ,%limit) - ,@body - (setq ,variable (1+ ,variable)))) `(block nil (let ((,%limit ,limit)) (declare (:read-only ,%limit)) (ext:compiler-typecase ,%limit - (fixnum (let ((,variable 0)) - (declare (fixnum ,variable) - ,@declarations) - ,body)) - (t (let ((,variable 0)) - (declare ,@declarations) - ,body))) + (fixnum + (let ((,variable 0)) + (declare (fixnum ,variable) + ,@declarations) + (si::while (< ,variable ,%limit) + ,@body + (setq ,variable (the fixnum (1+ ,variable)))))) + (t + (let ((,variable 0)) + (declare ,@declarations) + (si::while (< ,variable ,%limit) + ,@body + (setq ,variable (1+ ,variable)))))) ,@output)))))