X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Flocall.lisp;h=f480fcfa6b1df7efef5b123f8e311e676c55d4fd;hb=631ecfcd29ecabd40c3bc5579496e635b30a142e;hp=1fef35a49bfb5de7e23c25a33cf27ad9ecdcea12;hpb=d604a358d8e5eb5587989e0a4f1d31dbe6ac5ffe;p=sbcl.git diff --git a/src/compiler/locall.lisp b/src/compiler/locall.lisp index 1fef35a..f480fcf 100644 --- a/src/compiler/locall.lisp +++ b/src/compiler/locall.lisp @@ -274,7 +274,8 @@ ;;; 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)))) @@ -286,9 +287,12 @@ (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)) @@ -828,7 +832,8 @@ (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))) @@ -837,6 +842,11 @@ (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) @@ -1017,11 +1027,11 @@ (when (leaf-has-source-name-p clambda) ;; ANSI requires that explicit NOTINLINE be respected. (or (eq (lambda-inlinep clambda) :notinline) - ;; If (= LET-CONVERTION 0) we can guess that inlining + ;; If (= LET-CONVERSION 0) we can guess that inlining ;; generally won't be appreciated, but if the user ;; specifically requests inlining, that takes precedence over ;; our general guess. - (and (policy clambda (= let-convertion 0)) + (and (policy clambda (= let-conversion 0)) (not (eq (lambda-inlinep clambda) :inline)))))) ;;; We also don't convert calls to named functions which appear in the