X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdefboot.lisp;h=5035116178a441a09c29e8e0084a0bde53de1636;hb=fd324a9d981355d8bc10d2bd469cb54c4c9108fd;hp=9dc6d4616bbeb2fb85ec4b1d1b0c85e6b4a05555;hpb=07d11082f85d635148bfef93b3795b6c90dc7eca;p=sbcl.git diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index 9dc6d46..5035116 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -217,6 +217,8 @@ (style-warn "redefining ~S in DEFUN" name)) (setf (sb!xc:fdefinition name) def) + (sb!c::note-name-defined name :function) + ;; FIXME: I want to do this here (and fix bug 137), but until the ;; breathtaking CMU CL function name architecture is converted into ;; something sane, (1) doing so doesn't really fix the bug, and @@ -224,7 +226,11 @@ #+nil (setf (%fun-name def) name) (when doc - (setf (fdocumentation name 'function) doc)) + (setf (fdocumentation name 'function) doc) + #!+sb-eval + (when (typep def 'sb!eval:interpreted-function) + (setf (sb!eval:interpreted-function-documentation def) + doc))) name) ;;;; DEFVAR and DEFPARAMETER @@ -320,25 +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))))) - -(defun filter-dolist-declarations (decls) - (mapcar (lambda (decl) - `(declare ,@(remove-if - (lambda (clause) - (and (consp clause) - (or (eq (car clause) 'type) - (eq (car clause) 'ignore)))) - (cdr decl)))) - decls)) + `(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