From b77ebf21b137cd0debcb7a2a1f52b093ce28ee02 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Mon, 15 Dec 2008 09:40:07 +0000 Subject: [PATCH] 1.0.23.41: fix DX-COMBINATION-P * Punt on multiple result-uses. Reported by Pascal Costanza and Thiemo Seufer. * Also check for clean arg flow all cases. --- src/compiler/ir1util.lisp | 8 +++----- tests/dynamic-extent.impure.lisp | 22 ++++++++++++++++++++++ version.lisp-expr | 2 +- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp index 9af9351..d23bc01 100644 --- a/src/compiler/ir1util.lisp +++ b/src/compiler/ir1util.lisp @@ -440,11 +440,9 @@ (lambda-return clambda))) (result-use (when (return-p creturn) (principal-lvar-use (return-result creturn))))) - (when result-use - (if (known-dx-combination-p result-use dx) - (combination-args-flow-cleanly-p use result-use dx) - (dx-combination-p result-use dx))))) - t)) + ;; FIXME: We should be able to deal with multiple uses here as well. + (and (dx-combination-p result-use dx) + (combination-args-flow-cleanly-p use result-use dx)))))) (defun combination-args-flow-cleanly-p (combination1 combination2 dx) (labels ((recurse (combination) diff --git a/tests/dynamic-extent.impure.lisp b/tests/dynamic-extent.impure.lisp index 6740a28..9aba2db 100644 --- a/tests/dynamic-extent.impure.lisp +++ b/tests/dynamic-extent.impure.lisp @@ -612,4 +612,26 @@ 14) )))) (assert (equal '((0 4) (3 ((1 2 3 5) 14))) (test-update-uvl-live-sets #() 4 5))) + +(with-test (:name :regression-1.0.23.38) + (compile nil '(lambda () + (flet ((make (x y) + (let ((res (cons x x))) + (setf (cdr res) y) + res))) + (declaim (inline make)) + (let ((z (make 1 2))) + (declare (dynamic-extent z)) + (print z) + t)))) + (compile nil '(lambda () + (flet ((make (x y) + (let ((res (cons x x))) + (setf (cdr res) y) + (if x res y)))) + (declaim (inline make)) + (let ((z (make 1 2))) + (declare (dynamic-extent z)) + (print z) + t))))) diff --git a/version.lisp-expr b/version.lisp-expr index db7535b..bc122c8 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.23.40" +"1.0.23.41" -- 1.7.10.4