(list uses))))
(defun principal-lvar-use (lvar)
- (let ((use (lvar-uses lvar)))
- (if (cast-p use)
- (principal-lvar-use (cast-value use))
- use)))
+ (labels ((plu (lvar)
+ (declare (type lvar lvar))
+ (let ((use (lvar-uses lvar)))
+ (if (cast-p use)
+ (plu (cast-value use))
+ use))))
+ (plu lvar)))
;;; Update lvar use information so that NODE is no longer a use of its
;;; LVAR.
((:block :tagbody)
(aver (entry-p mess-up))
(loop for exit in (entry-exits mess-up)
- for nlx-info = (find-nlx-info exit)
+ for nlx-info = (exit-nlx-info exit)
do (funcall fun nlx-info)))
((:catch :unwind-protect)
(aver (combination-p mess-up))
;;; exits to CONT in that entry, then return it, otherwise return NIL.
(defun find-nlx-info (exit)
(declare (type exit exit))
- (let ((entry (exit-entry exit)))
+ (let* ((entry (exit-entry exit))
+ (cleanup (entry-cleanup entry))
+ (block (first (block-succ (node-block exit)))))
(dolist (nlx (physenv-nlx-info (node-physenv entry)) nil)
- (when (eq (nlx-info-exit nlx) exit)
+ (when (and (eq (nlx-info-block nlx) block)
+ (eq (nlx-info-cleanup nlx) cleanup))
(return nlx)))))
+
+(defun nlx-info-lvar (nlx)
+ (declare (type nlx-info nlx))
+ (node-lvar (block-last (nlx-info-target nlx))))
\f
;;;; functional hackery