(values))
-;;; Return true if FUN's result continuation is used in a
-;;; tail-recursive full call. We only consider explicit :FULL calls.
-;;; It is assumed that known calls are never part of a tail-recursive
-;;; loop, so we don't need to enforce tail-recursion. In any case, we
-;;; don't know which known calls will actually be full calls until
-;;; after LTN.
+;;; Return true if FUN's result is used in a tail-recursive full
+;;; call. We only consider explicit :FULL calls. It is assumed that
+;;; known calls are never part of a tail-recursive loop, so we don't
+;;; need to enforce tail-recursion. In any case, we don't know which
+;;; known calls will actually be full calls until after LTN.
(defun has-full-call-use (fun)
(declare (type clambda fun))
(let ((return (lambda-return fun)))
(block punt
(dolist (fun funs t)
(dolist (ref (leaf-refs fun))
- (let* ((cont (node-cont ref))
- (dest (continuation-dest cont)))
- (when (and dest
+ (let* ((lvar (node-lvar ref))
+ (dest (and lvar (lvar-dest lvar))))
+ (when (and (basic-combination-p dest)
(not (node-tail-p dest))
- (basic-combination-p dest)
- (eq (basic-combination-fun dest) cont)
+ (eq (basic-combination-fun dest) lvar)
(eq (basic-combination-kind dest) :local))
(return-from punt nil)))))))))