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

(eval '(block b3

                 (max (return-from b3 1)
                 (if (unwind-protect (unwind-protect 2)) 3 4))))
	 => nil is not of type c::ref

	* src/compiler/envanal.lisp (emit-cleanups): Don't generate
	a %funcall If second arg of :unwind-protect cleanup is unused.
	Found by Paul Dietz.
parent ae24b059
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/envanal.lisp,v 1.32 2003/10/04 12:21:49 gerd Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/envanal.lisp,v 1.33 2003/10/26 10:27:58 gerd Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -348,9 +348,11 @@
(code `(%catch-breakup)))
(:unwind-protect
(code `(%unwind-protect-breakup))
(let ((fun (ref-leaf (continuation-use (second args)))))
(reanalyze-funs fun)
(code `(%funcall ,fun))))
(let ((use (continuation-use (second args))))
(when use
(let ((fun (ref-leaf use)))
(reanalyze-funs fun)
(code `(%funcall ,fun))))))
((:block :tagbody)
(cond (*converting-for-interpreter*
;; Avoid duplicates, as the interpreter expects just one
......
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