-;;; Find the function that is being compiled by COMPILE and bash its name to
-;;; NAME. We also substitute for any references to name so that recursive
-;;; calls will be compiled direct. Lambda is the top-level lambda for the
-;;; compilation. A REF for the real function is the only thing in the
-;;; top-level lambda other than the bind and return, so it isn't too hard to
-;;; find.
-(defun compile-fix-function-name (lambda name)
- (declare (type clambda lambda) (type (or symbol cons) name))
- (when name
- (let ((fun (ref-leaf
- (continuation-next
- (node-cont (lambda-bind lambda))))))
- (setf (leaf-name fun) name)
- (let ((old (gethash name *free-functions*)))
- (when old (substitute-leaf fun old)))
- name)))
-
-(defun compile (name &optional (definition (fdefinition name)))
- #!+sb-doc
- "Compiles the function whose name is Name. If Definition is supplied,
- it should be a lambda expression that is compiled and then placed in the
- function cell of Name. If Name is Nil, the compiled code object is
- returned."