From 0c0a7bc105d2253c4fe6272de4654de01b2284a9 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Thu, 2 Apr 1992 15:25:38 +0000 Subject: [PATCH] Changed SUBSTITUTE-SINGLE-USE-CONTINUATION to not substitute if the continuation type assertions conflict. --- compiler/ir1opt.lisp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/compiler/ir1opt.lisp b/compiler/ir1opt.lisp index 0f9a29072..a63ee046f 100644 --- a/compiler/ir1opt.lisp +++ b/compiler/ir1opt.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.42 1992/04/01 13:38:17 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.43 1992/04/02 15:25:38 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1130,6 +1130,8 @@ ;;; -- CONT receives multiple values, or ;;; -- the reference is in a different environment from the variable, or ;;; -- either continuation has a funky TYPE-CHECK annotation. +;;; -- the continuations have incompatible assertions, so the new asserted type +;;; would be NIL. ;;; -- the var's DEST has a different policy than the ARG's (think safety). ;;; ;;; We change the Ref to be a reference to NIL with unused value, and let it @@ -1140,6 +1142,7 @@ (declare (type continuation arg) (type lambda-var var)) (let* ((ref (first (leaf-refs var))) (cont (node-cont ref)) + (cont-atype (continuation-asserted-type cont)) (dest (continuation-dest cont))) (when (and (eq (continuation-use cont) ref) dest @@ -1148,11 +1151,15 @@ (lambda-home (lambda-var-home var))) (member (continuation-type-check arg) '(t nil)) (member (continuation-type-check cont) '(t nil)) + (not (eq (values-type-intersection + cont-atype + (continuation-asserted-type arg)) + *empty-type*)) (eq (lexenv-cookie (node-lexenv dest)) (lexenv-cookie (node-lexenv (continuation-dest arg))))) (assert (member (continuation-kind arg) '(:block-start :deleted-block-start :inside-block))) - (assert-continuation-type arg (continuation-asserted-type cont)) + (assert-continuation-type arg cont-atype) (setf (node-derived-type ref) *wild-type*) (change-ref-leaf ref (find-constant nil)) (substitute-continuation arg cont) -- GitLab