(setq n (+ n (estimate-code-size-1 (cadr l) env) 1))))
((eq fn 'go) 1)
((eq fn 'function)
- ;; This skirts the issue of implementationally-defined
- ;; lambda macros by recognizing CL function names and
- ;; nothing else.
- (if (or (symbolp (cadr x))
- (and (consp (cadr x)) (eq (caadr x) 'setf)))
+ (if (sb!int:legal-fun-name-p (cadr x))
1
+ ;; FIXME: This tag appears not to be present
+ ;; anywhere.
(throw 'duplicatable-code-p nil)))
((eq fn 'multiple-value-setq)
(f (length (second x)) (cddr x)))
(defun loop-do-repeat ()
(loop-disallow-conditional :repeat)
(let ((form (loop-get-form))
- (type 'real))
- (let ((var (loop-make-var (gensym "LOOP-REPEAT-") form type)))
- (push `(when (minusp (decf ,var)) (go end-loop)) *loop-before-loop*)
- (push `(when (minusp (decf ,var)) (go end-loop)) *loop-after-body*)
+ (type 'integer))
+ (let ((var (loop-make-var (gensym "LOOP-REPEAT-") `(ceiling ,form) type)))
+ (push `(if (<= ,var 0) (go end-loop) (decf ,var)) *loop-before-loop*)
+ (push `(if (<= ,var 0) (go end-loop) (decf ,var)) *loop-after-body*)
;; FIXME: What should
;; (loop count t into a
;; repeat 3