From 2f6561ed6ca9478d801ebd2413cc9b4538c8e2eb Mon Sep 17 00:00:00 2001 From: Alexey Dejneka Date: Sun, 18 Sep 2005 07:13:36 +0000 Subject: [PATCH] 0.9.4.74: * Don't optimize two-argument BACKQ-LIST* to BACKQ-CONS when the first argument may be expanded later (fixes a bug reported on cll by Alexander ). --- NEWS | 2 ++ src/code/backq.lisp | 1 + tests/backq.impure.lisp | 3 +++ version.lisp-expr | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index fa545f2..0249283 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,8 @@ changes in sbcl-0.9.5 relative to sbcl-0.9.4: by Vasile Rotaru) * bug fix: compiler pack phase does not modify a hashtable, which is iterated. (reported by Bryan O'Connor, fixed by Rob MacLachlan) + * bug fix: backquote does not optimize (LIST* x y) to CONS when x + may be expanded. (reported by Alexander on c.l.l) * threads ** bug fix: parent thread now can be gc'ed even with a live child thread diff --git a/src/code/backq.lisp b/src/code/backq.lisp index cd418aa..f194f45 100644 --- a/src/code/backq.lisp +++ b/src/code/backq.lisp @@ -175,6 +175,7 @@ (list 'quote thing)) ((eq flag 'list*) (cond ((and (null (cddr thing)) + (not (expandable-backq-expression-p (car thing))) (not (expandable-backq-expression-p (cadr thing)))) (cons 'backq-cons thing)) ((expandable-backq-expression-p (car (last thing))) diff --git a/tests/backq.impure.lisp b/tests/backq.impure.lisp index 5fea61f..6a64703 100644 --- a/tests/backq.impure.lisp +++ b/tests/backq.impure.lisp @@ -61,3 +61,6 @@ (let ((a '`(1 ,@a ,@b ,.c ,.d))) (let ((*print-circle* t)) (assert (equal (read-from-string (write-to-string a)) a)))) + +(let ((s '``(,,@(list 1 2 3) 10))) + (assert (equal (eval (eval s)) '(1 2 3 10)))) diff --git a/version.lisp-expr b/version.lisp-expr index b332bc6..34c868e 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".) -"0.9.4.73" +"0.9.4.74" -- 1.7.10.4