From 833da47b238d8f22a6109851de6b6e53d31e2e3c Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Sun, 8 Dec 1991 17:24:51 +0000 Subject: [PATCH] In CONSTRAIN-REF-TYPE, clear out the old NODE-DERIVED-TYPE in the IF case to prevent type inference anomalies. --- compiler/constraint.lisp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/compiler/constraint.lisp b/compiler/constraint.lisp index ef66a55b0..aad2090d4 100644 --- a/compiler/constraint.lisp +++ b/compiler/constraint.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/constraint.lisp,v 1.10 1991/02/20 14:56:51 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/constraint.lisp,v 1.11 1991/12/08 17:24:51 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -351,13 +351,15 @@ (let* ((cont (node-cont ref)) (dest (continuation-dest cont))) - (if (and (if-p dest) - (csubtypep *null-type* not-res) - (eq (continuation-asserted-type cont) *wild-type*)) - (change-ref-leaf ref (find-constant 't)) - (derive-node-type ref (or (type-difference res not-res) - res)))))) - + (cond ((and (if-p dest) + (csubtypep *null-type* not-res) + (eq (continuation-asserted-type cont) *wild-type*)) + (setf (node-derived-type ref) *wild-type*) + (change-ref-leaf ref (find-constant 't))) + (t + (derive-node-type ref (or (type-difference res not-res) + res))))))) + (undefined-value)) -- GitLab