From f505ec4076a19cf75227bf60f7f8684166694f8e Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Mon, 30 Jun 2008 09:48:27 +0000 Subject: [PATCH] 1.0.18.5: ADJOIN with constant NIL as second argument * One more bug in TRANSFORM-LIST-ITEM-SEEK. --- NEWS | 1 + src/compiler/seqtran.lisp | 6 ++++-- tests/list.pure.lisp | 2 +- version.lisp-expr | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 7305f0a..58e8614 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ changes in sbcl-1.0.19 relative to 1.0.18: ** deriving the result type of COERCE no longer signals an error if the derived type of the second argument is a MEMBER type containing invalid type specifiers. + ** ADJOIN with constant NIL as second argument works correctly. changes in sbcl-1.0.18 relative to 1.0.17: * minor incompatible change: SB-SPROF:WITH-PROFILING now by default diff --git a/src/compiler/seqtran.lisp b/src/compiler/seqtran.lisp index 28da444..3277b04 100644 --- a/src/compiler/seqtran.lisp +++ b/src/compiler/seqtran.lisp @@ -369,8 +369,10 @@ `(let ,(mapcar (lambda (fun) `(,fun ,(ensure-fun fun))) funs) ,(open-code c-list))) ((and cp (not c-list)) - ;; constant nil list -- nothing to find! - nil) + ;; constant nil list + (if (eq name 'adjoin) + '(list item) + nil)) (t ;; specialized out-of-line version `(,(specialized-list-seek-function-name name funs c-test) diff --git a/tests/list.pure.lisp b/tests/list.pure.lisp index 555b0c2..d42a879 100644 --- a/tests/list.pure.lisp +++ b/tests/list.pure.lisp @@ -262,7 +262,7 @@ (declare (optimize speed)) (adjoin elt '(:y)))) ':x))) - +(assert (equal '(a) (funcall (compile nil '(lambda () (adjoin 'a nil)))))) (macrolet ((test (expected list-1 list-2 &rest args) `(progn diff --git a/version.lisp-expr b/version.lisp-expr index 4a42341..c3fd9aa 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.18.4" +"1.0.18.5" -- 1.7.10.4