;;; do LET conversion here.
(defun locall-analyze-fun-1 (fun)
(declare (type functional fun))
- (let ((refs (leaf-refs fun)))
+ (let ((refs (leaf-refs fun))
+ (local-p t))
(dolist (ref refs)
(let* ((lvar (node-lvar ref))
(dest (when lvar (lvar-dest lvar))))
(convert-call-if-possible ref dest)
(unless (eq (basic-combination-kind dest) :local)
- (reference-entry-point ref)))
+ (reference-entry-point ref)
+ (setq local-p nil)))
(t
- (reference-entry-point ref)))))))
+ (reference-entry-point ref)
+ (setq local-p nil))))))
+ (when local-p (note-local-functional fun)))
(values))
(depart-from-tail-set clambda)
(let* ((home (node-home-lambda call))
- (home-physenv (lambda-physenv home)))
+ (home-physenv (lambda-physenv home))
+ (physenv (lambda-physenv clambda)))
(aver (not (eq home clambda)))
(setf (lambda-home clambda) home)
(setf (lambda-physenv clambda) home-physenv)
+ (when physenv
+ (setf (physenv-nlx-info home-physenv)
+ (nconc (physenv-nlx-info physenv)
+ (physenv-nlx-info home-physenv))))
+
;; All of CLAMBDA's LETs belong to HOME now.
(let ((lets (lambda-lets clambda)))
(dolist (let lets)