From 18bcd8894b393c1ff0a39ec36e24de8cc074b6c3 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Fri, 13 Apr 1990 12:12:11 +0000 Subject: [PATCH] Added code to set the LEAF-TYPE of functionals to the DEFINITION-TYPE so that this information is easily avalible for later use (and isn't trashed by TR return deletion. --- compiler/envanal.lisp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler/envanal.lisp b/compiler/envanal.lisp index ce1276448..cde5adab9 100644 --- a/compiler/envanal.lisp +++ b/compiler/envanal.lisp @@ -27,11 +27,18 @@ ;;; 3] Find any unreferenced variables in the lambdas in the component. ;;; 4] Scan the blocks in the component closing over non-local-exit ;;; continuations. +;;; 5] Compute a function type for each "real" function. This is done now +;;; because tail uses of the result continuation may be blown away by the +;;; back end. ;;; (defun environment-analyze (component) (declare (type component component)) (assert (not (component-new-functions component))) (dolist (fun (component-lambdas component)) + (let ((f (if (eq (functional-kind fun) :external) + (functional-entry-function fun) + fun))) + (setf (leaf-type f) (definition-type f))) (let ((res (make-environment :function fun))) (setf (lambda-environment fun) res) (dolist (lambda (lambda-lets fun)) -- GitLab