X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fxref.lisp;h=4ea73e42151432901a2920c4c1c94acbd6a398e8;hb=3b6e07c0fcb050fa86c7c42db33f49107e3097e6;hp=40c0d3700acb8c451810596f1e9a995295101a0f;hpb=cb83aa22932bf4b9bc74ac6f0fcd91db1702ad33;p=sbcl.git diff --git a/src/compiler/xref.lisp b/src/compiler/xref.lisp index 40c0d37..4ea73e4 100644 --- a/src/compiler/xref.lisp +++ b/src/compiler/xref.lisp @@ -26,7 +26,8 @@ ;; Note that this code can get executed several times ;; for the same block, if the functional is referenced ;; from multiple XEPs. - (loop for node = (ctran-next this-cont) then (ctran-next (node-next node)) + (loop for node = (ctran-next this-cont) + then (ctran-next (node-next node)) until (eq node last) do (record-node-xrefs node functional)) ;; Properly record the deferred macroexpansion information @@ -80,7 +81,14 @@ (defun record-node-xrefs (node context) (declare (type node node)) (etypecase node - ((or creturn cif entry combination mv-combination cast)) + ((or creturn cif entry mv-combination cast)) + (combination + ;; Record references to globals made using SYMBOL-VALUE. + (let ((fun (principal-lvar-use (combination-fun node))) + (arg (car (combination-args node)))) + (when (and (ref-p fun) (eq 'symbol-value (leaf-%source-name (ref-leaf fun))) + (constant-lvar-p arg) (symbolp (lvar-value arg))) + (record-xref :references (lvar-value arg) context node nil)))) (ref (let ((leaf (ref-leaf node))) (typecase leaf