Another expansion of DOLIST which uses unboxing. Seems to produce better code with the new model.

This commit is contained in:
Juan Jose Garcia Ripoll 2011-12-29 19:50:10 +01:00
parent 551b9b2e23
commit cb66371cf2

View file

@ -23,12 +23,14 @@
(declare (:read-only ,%limit))
(ext:compiler-typecase ,%limit
(fixnum
;; %LIMIT will be type checked by the compiler to be
;; a fixnum. We may thus just increase the counter.
(let ((,variable 0))
(declare (fixnum ,variable)
,@declarations)
(si::while (< ,variable ,%limit)
,@body
(setq ,variable (the fixnum (1+ ,variable))))))
(reckless (setq ,variable (1+ ,variable))))))
(t
(let ((,variable 0))
(declare ,@declarations)