mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 22:01:36 -08:00
Another expansion of DOLIST which uses unboxing. Seems to produce better code with the new model.
This commit is contained in:
parent
551b9b2e23
commit
cb66371cf2
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue