X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fir1tran.lisp;h=8f680386f758ba556ec3d8783b16d17746a2e1bb;hb=90ca09b75fbc3b63b2f7d09c67b04b866dd783f6;hp=36cfd94058f0112519660bed0ea4f9ae45591d50;hpb=1c2d2fa984c9d0bf07b5a1e5eeae2eade5cc4cb4;p=sbcl.git diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index 36cfd94..8f68038 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -523,10 +523,14 @@ (let ((var (or (lexenv-find name variables) (find-free-variable name)))) (etypecase var (leaf - (when (and (lambda-var-p var) (lambda-var-ignorep var)) - ;; (ANSI's specification for the IGNORE declaration requires - ;; that this be a STYLE-WARNING, not a full WARNING.) - (compiler-style-warning "reading an ignored variable: ~S" name)) + (when (lambda-var-p var) + (let ((home (continuation-home-lambda-or-null start))) + (when home + (pushnew var (lambda-calls-or-closes home)))) + (when (lambda-var-ignorep var) + ;; (ANSI's specification for the IGNORE declaration requires + ;; that this be a STYLE-WARNING, not a full WARNING.) + (compiler-style-warning "reading an ignored variable: ~S" name))) (reference-leaf start cont var)) (cons (aver (eq (car var) 'MACRO)) @@ -553,8 +557,8 @@ (t (ir1-convert-global-functoid-no-cmacro start cont form fun))))) -;;; Handle the case of where the call was not a compiler macro, or was a -;;; compiler macro and passed. +;;; Handle the case of where the call was not a compiler macro, or was +;;; a compiler macro and passed. (defun ir1-convert-global-functoid-no-cmacro (start cont form fun) (declare (type continuation start cont) (list form)) ;; FIXME: Couldn't all the INFO calls here be converted into @@ -672,14 +676,15 @@ (return)) (let ((this-cont (make-continuation))) (ir1-convert this-start this-cont form) - (setq this-start this-cont forms (cdr forms))))))) + (setq this-start this-cont + forms (cdr forms))))))) (values)) ;;;; converting combinations ;;; Convert a function call where the function (i.e. the FUN argument) -;;; is a LEAF. We return the COMBINATION node so that we can poke at -;;; it if we want to. +;;; is a LEAF. We return the COMBINATION node so that the caller can +;;; poke at it if it wants to. (declaim (ftype (function (continuation continuation list leaf) combination) ir1-convert-combination)) (defun ir1-convert-combination (start cont form fun) @@ -2018,18 +2023,3 @@ (specifier-type 'function)))) (values)) - -;;;; hacking function names - -;;; This is like LAMBDA, except the result is tweaked so that FUN-NAME -;;; can extract a name. (Also possibly the name could also be used at -;;; compile time to emit more-informative name-based compiler -;;; diagnostic messages as well.) -(defmacro-mundanely named-lambda (name args &body body) - - ;; FIXME: For now, in this stub version, we just discard the name. A - ;; non-stub version might use either macro-level LOAD-TIME-VALUE - ;; hackery or customized IR1-transform level magic to actually put - ;; the name in place. - (aver (legal-fun-name-p name)) - `(lambda ,args ,@body))