X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1tran-lambda.lisp;h=efe3a4830380d2f51ad5af0f2ee39155390446d5;hb=d25e3478acccec70402ff32554669a982be8e281;hp=5bb387be4244dda8335c8231b3d01f8b0f4389b3;hpb=e3113504fca73ebd1b992930315386d9d3ae5d18;p=sbcl.git diff --git a/src/compiler/ir1tran-lambda.lisp b/src/compiler/ir1tran-lambda.lisp index 5bb387b..efe3a48 100644 --- a/src/compiler/ir1tran-lambda.lisp +++ b/src/compiler/ir1tran-lambda.lisp @@ -33,9 +33,12 @@ (compiler-error "The variable ~S occurs more than once in the lambda list." name)) (let ((kind (info :variable :kind name))) - (when (or (keywordp name) (eq kind :constant)) - (compiler-error "The name of the lambda variable ~S is already in use to name a constant." - name)) + (cond ((or (keywordp name) (eq kind :constant)) + (compiler-error "The name of the lambda variable ~S is already in use to name a constant." + name)) + ((eq :global kind) + (compiler-error "The name of the lambda variable ~S is already in use to name a global variable." + name))) (cond ((eq kind :special) (let ((specvar (find-free-var name))) (make-lambda-var :%source-name name @@ -1016,7 +1019,7 @@ :maybe-add-debug-catch t :source-name name))) (assert-global-function-definition-type name res) - (setf (defined-fun-functional defined-fun-res) res) + (push res (defined-fun-functionals defined-fun-res)) (unless (eq (defined-fun-inlinep defined-fun-res) :notinline) (substitute-leaf-if (lambda (ref) @@ -1088,7 +1091,7 @@ (setf (gethash name *free-funs*) res))) ;; If *FREE-FUNS* has a previously converted definition ;; for this name, then blow it away and try again. - ((defined-fun-functional found) + ((defined-fun-functionals found) (remhash name *free-funs*) (get-defined-fun name)) (t found))))