X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1util.lisp;h=b3f02b52bec15818dac374aabbb4c26182a57f2b;hb=df679ed627975948b1cee190f4d79c397588c43e;hp=b331c408520e2bccaa1c85cc3147c5161c5ad80b;hpb=f9336e9b3711794feba99b88faadc82ef8cac7f3;p=sbcl.git diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp index b331c40..b3f02b5 100644 --- a/src/compiler/ir1util.lisp +++ b/src/compiler/ir1util.lisp @@ -996,13 +996,15 @@ (remove-from-dfo block) (values)) -;;; Do stuff to indicate that the return node Node is being deleted. -;;; We set the RETURN to NIL. +;;; Do stuff to indicate that the return node NODE is being deleted. (defun delete-return (node) (declare (type creturn node)) - (let ((fun (return-lambda node))) + (let* ((fun (return-lambda node)) + (tail-set (lambda-tail-set fun))) (aver (lambda-return fun)) - (setf (lambda-return fun) nil)) + (setf (lambda-return fun) nil) + (when (and tail-set (not (find-if #'lambda-return (tail-set-funs tail-set)))) + (setf (tail-set-type tail-set) *empty-type*))) (values)) ;;; If any of the VARS in FUN was never referenced and was not @@ -1268,7 +1270,10 @@ (setf (ref-leaf ref) leaf) (setf (leaf-ever-used leaf) t) (let ((ltype (leaf-type leaf))) - (if (fun-type-p ltype) + (if (let* ((cont (node-cont ref)) + (dest (continuation-dest cont))) + (and (basic-combination-p dest) + (eq cont (basic-combination-fun dest)))) (setf (node-derived-type ref) ltype) (derive-node-type ref ltype))) (reoptimize-continuation (node-cont ref)))