;;; other things defined in terms of COND
(defmacro-mundanely when (test &body forms)
#!+sb-doc
- "First arg is a predicate. If it is non-null, the rest of the forms are
+ "If the first argument is true, the rest of the forms are
evaluated as a PROGN."
`(cond (,test nil ,@forms)))
(defmacro-mundanely unless (test &body forms)
#!+sb-doc
- "First arg is a predicate. If it is null, the rest of the forms are
+ "If the first argument is not true, the rest of the forms are
evaluated as a PROGN."
`(cond ((not ,test) nil ,@forms)))
(defmacro-mundanely and (&rest forms)
(if (and (consp name) (eq (first name) 'setf))
(setf (fdocumentation (second name) 'setf) doc)
(setf (fdocumentation name 'function) doc)))
- (sb!c::proclaim-as-function-name name)
- (if (eq (info :function :where-from name) :assumed)
- (progn
- (setf (info :function :where-from name) :defined)
- (if (info :function :assumed-type name)
- (setf (info :function :assumed-type name) nil))))
+ (become-defined-function-name name)
(when (or inline-expansion
(info :function :inline-expansion name))
(setf (info :function :inline-expansion name)
(defun sb!c::%defun (name def doc source)
(declare (ignore source))
(setf (sb!eval:interpreted-function-name def) name)
+ (ecase (info :function :where-from name)
+ (:assumed
+ (setf (info :function :where-from name) :defined)
+ (setf (info :function :type name)
+ (extract-function-type def))
+ (when (info :function :assumed-type name)
+ (setf (info :function :assumed-type name) nil)))
+ (:declared)
+ (:defined
+ (setf (info :function :type name) (extract-function-type def))))
(sb!c::%%defun name def doc))
\f
;;;; DEFVAR and DEFPARAMETER