X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ftarget-main.lisp;h=b1c02300e013b051fef65848540653936ee879b5;hb=b767eae48831153473226b985511c8f7a3ef98c5;hp=14df8972afd03b562c26b31648a116fe3b05f4a0;hpb=5ec8d0c1c8b7939818b75118b472fac1af554f9a;p=sbcl.git diff --git a/src/compiler/target-main.lisp b/src/compiler/target-main.lisp index 14df897..b1c0230 100644 --- a/src/compiler/target-main.lisp +++ b/src/compiler/target-main.lisp @@ -27,23 +27,6 @@ (error "can't find a definition for ~S" definition-designator)) definition))) -;;; 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-fun-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))) - ;;; Handle the nontrivial case of CL:COMPILE. (defun actually-compile (name definition) (with-compilation-values @@ -67,10 +50,10 @@ (*toplevel-lambdas* ()) (*block-compile* nil) (*compiler-error-bailout* - #'(lambda () - (compiler-mumble - "~2&fatal error, aborting compilation~%") - (return-from actually-compile (values nil t nil)))) + (lambda () + (compiler-mumble + "~2&fatal error, aborting compilation~%") + (return-from actually-compile (values nil t nil)))) (*current-path* nil) (*last-source-context* nil) (*last-original-source* nil) @@ -106,7 +89,8 @@ (values definition nil nil) (actually-compile name definition)) (cond (name - (if (macro-function name) + (if (and (symbolp name) + (macro-function name)) (setf (macro-function name) compiled-definition) (setf (fdefinition name) compiled-definition)) (values name warnings-p failure-p))