X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1tran-lambda.lisp;h=c107a938282ab3f8e0c37e1405c5f5705e3792cf;hb=e73a30c901ab234291aefc9f1e73507650628892;hp=ec19c9eac5aafcc33da4b8abf9fd0214b0229b5a;hpb=4ccd8dcd4b936ca6a0f989e12397bd9426905a11;p=sbcl.git diff --git a/src/compiler/ir1tran-lambda.lisp b/src/compiler/ir1tran-lambda.lisp index ec19c9e..c107a93 100644 --- a/src/compiler/ir1tran-lambda.lisp +++ b/src/compiler/ir1tran-lambda.lisp @@ -595,7 +595,7 @@ (tests `((eq ,n-key :allow-other-keys) (setq ,n-allowp ,n-value-temp)))) (tests `(t - (setq ,n-losep ,n-key)))) + (setq ,n-losep (list ,n-key))))) (body `(when (oddp ,n-count) @@ -614,7 +614,7 @@ (unless allowp (body `(when (and ,n-losep (not ,n-allowp)) - (%unknown-key-arg-error ,n-losep))))))) + (%unknown-key-arg-error (car ,n-losep)))))))) (let ((ep (ir1-convert-lambda-body `((let ,(temps) @@ -1081,18 +1081,25 @@ ;;; ;;; The INLINE-EXPANSION is a LAMBDA-WITH-LEXENV, or NIL if there is ;;; no inline expansion. -(defun %compiler-defun (name lambda-with-lexenv) +(defun %compiler-defun (name lambda-with-lexenv compile-toplevel) (let ((defined-fun nil)) ; will be set below if we're in the compiler - (when (boundp '*lexenv*) ; when in the compiler + (when compile-toplevel + ;; better be in the compiler + (aver (boundp '*lexenv*)) (when sb!xc:*compile-print* (compiler-mumble "~&; recognizing DEFUN ~S~%" name)) (remhash name *free-funs*) - (setf defined-fun (get-defined-fun name))) + (setf defined-fun (get-defined-fun name)) - (become-defined-fun-name name) + (aver (fasl-output-p *compile-object*)) + (if (member name *fun-names-in-this-file* :test #'equal) + (warn 'duplicate-definition :name name) + (push name *fun-names-in-this-file*))) + (become-defined-fun-name name) + (cond (lambda-with-lexenv (setf (info :function :inline-expansion-designator name) lambda-with-lexenv)