Update of /cvsroot/sbcl/sbcl/src/compiler
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7429/src/compiler
220.127.116.11: XREF needs to account for the last node of a block as well
* ...as it can be eg. a CSET node. Reported by "mogunus" on #lisp.
Lest readers of sbcl-commits start thinking that #lisp is the best
place to report bugs: it is not. This got immediate attention as I
was working in closely related areas anyways.
sbcl-devel and sbcl-help remain the correct place to report bugs.
RCS file: /cvsroot/sbcl/sbcl/src/compiler/xref.lisp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- xref.lisp 8 Apr 2007 12:38:22 -0000 1.2
+++ xref.lisp 29 Jan 2008 12:51:28 -0000 1.3
@@ -19,16 +19,15 @@
(do ((block (block-next (component-head component)) (block-next block)))
((null (block-next block)))
- (let* ((this-cont (block-start block))
- (last (block-last block)))
+ (let ((start (block-start block)))
(flet ((handle-node (functional)
;; Record xref information for all nodes in the block.
;; 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))
- until (eq node last)
+ (loop for ctran = start then (node-next node)
+ while ctran
+ for node = (ctran-next ctran)
do (record-node-xrefs node functional))
;; Properly record the deferred macroexpansion information
;; that's been stored in the block.
@@ -81,7 +80,7 @@
(defun record-node-xrefs (node context)
(declare (type node node))
- ((or creturn cif entry mv-combination cast))
+ ((or creturn cif entry mv-combination cast exit))
;; Record references to globals made using SYMBOL-VALUE.
(let ((fun (principal-lvar-use (combination-fun node)))