X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ffopcompile.lisp;h=6adfbf2716ecd8747206151e76c61e3a13f8eded;hb=07ab1e4811ab16f95a9a5e8d767426a0787f22c0;hp=16f9daf7ea7fcdaab61edec64f9c528e98384862;hpb=cdb975feaadf1dc5554396b8f399708bc9b6f90d;p=sbcl.git diff --git a/src/compiler/fopcompile.lisp b/src/compiler/fopcompile.lisp index 16f9daf..6adfbf2 100644 --- a/src/compiler/fopcompile.lisp +++ b/src/compiler/fopcompile.lisp @@ -258,21 +258,21 @@ ;; Special variable (fopcompile `(symbol-value ',form) path for-value-p) ;; Lexical - (when for-value-p - (let* ((lambda-var (cdr (assoc form (lexenv-vars *lexenv*)))) - (handle (when lambda-var - (lambda-var-fop-value lambda-var)))) - (if handle - (sb!fasl::dump-push handle - *compile-object*) - (progn - ;; Undefined variable. Signal a warning, and - ;; treat it as a special variable reference, - ;; like the real compiler does. - (note-undefined-reference form :variable) - (fopcompile `(symbol-value ',form) - path - for-value-p)))))))))) + (let* ((lambda-var (cdr (assoc form (lexenv-vars *lexenv*)))) + (handle (when lambda-var + (lambda-var-fop-value lambda-var)))) + (if handle + (when for-value-p + (sb!fasl::dump-push handle *compile-object*)) + (progn + ;; Undefined variable. Signal a warning, and + ;; treat it as a special variable reference, like + ;; the real compiler does -- do not elide even if + ;; the value is unused. + (note-undefined-reference form :variable) + (fopcompile `(symbol-value ',form) + path + for-value-p))))))))) ((listp form) (multiple-value-bind (macroexpansion macroexpanded-p) (sb!xc:macroexpand form *lexenv*)