From 84ef6cd84eec31f11be5a0876a024658e783d85a Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Thu, 8 Mar 1990 13:30:35 +0000 Subject: [PATCH] Changed NOTE-NON-LOCAL-EXIT to add a use of the NLX continuation to the %NLX-ENTRY function when we delete the escape function. Formerly there was no use to represent the type uncertainty of the thrown value, which could cause LTN to get confused, perhaps choosing a specialized representation when the value could in fact be of any type. --- compiler/envanal.lisp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler/envanal.lisp b/compiler/envanal.lisp index 9a891b693..ce1276448 100644 --- a/compiler/envanal.lisp +++ b/compiler/envanal.lisp @@ -181,7 +181,9 @@ ;;; reference to NLX-Info structure for the escape function reference. This ;;; will cause the escape function to be deleted (although not removed from ;;; the DFO.) The escape function is no longer needed, and we don't want to -;;; emit code for it. +;;; emit code for it. We then also change the %NLX-ENTRY call to use +;;; the NLX continuation so that there will be a use to represent the NLX +;;; use. ;;; (defun note-non-local-exit (env exit) (declare (type environment env) (type exit exit)) @@ -199,7 +201,10 @@ (assert info) (close-over info (node-environment exit) env) (when (eq (functional-kind exit-fun) :escape) - (substitute-leaf (find-constant info) exit-fun)))) + (substitute-leaf (find-constant info) exit-fun) + (let ((node (block-last (nlx-info-target info)))) + (delete-continuation-use node) + (add-continuation-use node (nlx-info-continuation info)))))) (undefined-value)) -- GitLab