Skip to content
Snippets Groups Projects
Commit b71200f3 authored by gerd's avatar gerd
Browse files

(compile nil

	    '(lambda (a c)
		(if nil (unwind-protect (max 521739 (unwind-protect c)))
		  (logandc2 3942 a))))
	 => nil is not of type ref

	* src/compiler/ir1opt.lisp (find-result-type): Ignore uses
	whose home lambda or block is deleted.  From SBCL.
parent 40847b05
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.80 2003/10/11 11:58:28 gerd Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.81 2003/10/13 09:57:10 gerd Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -563,19 +563,22 @@ ...@@ -563,19 +563,22 @@
(let ((result (return-result node))) (let ((result (return-result node)))
(collect ((use-union *empty-type* values-type-union)) (collect ((use-union *empty-type* values-type-union))
(do-uses (use result) (do-uses (use result)
(cond ((and (basic-combination-p use) (let ((use-home (node-home-lambda use)))
(eq (basic-combination-kind use) :local)) (cond ((or (eq (functional-kind use-home) :deleted)
(assert (eq (lambda-tail-set (node-home-lambda use)) (block-delete-p (node-block use))))
(lambda-tail-set (combination-lambda use)))) ((and (basic-combination-p use)
(when (combination-p use) (eq (basic-combination-kind use) :local))
(when (nth-value 1 (maybe-convert-tail-local-call use)) (assert (eq (lambda-tail-set use-home)
(return-from find-result-type (undefined-value))))) (lambda-tail-set (combination-lambda use))))
(t (when (combination-p use)
(use-union (node-derived-type use))))) (when (nth-value 1 (maybe-convert-tail-local-call use))
(return-from find-result-type (values)))))
(t
(use-union (node-derived-type use))))))
(let ((int (values-type-intersection (continuation-asserted-type result) (let ((int (values-type-intersection (continuation-asserted-type result)
(use-union)))) (use-union))))
(setf (return-result-type node) int)))) (setf (return-result-type node) int))))
(undefined-value)) (values))
;;; IR1-Optimize-Return -- Internal ;;; IR1-Optimize-Return -- Internal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment