Dan Bensen | 21 May 2008 03:34
Picon
Favicon

destructuring-bind <symbol>

There seems to be some inconsistency between sbcl,
acl, and the hyperspec in applying destructuring-bind
to a bare variable.  There's a comp.lang.lisp thread
about it here:
http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/92a6b55c17a65bea#

Briefly, sbcl generates a (type list) declaration
along with binding the variable, acl justs binds it,
and the HS says the first arg is supposed to be a
lambda list, which seems to rule out a (non-nil)
symbol.
Here are the expansions and the definition:

acl:
CL-USER(1): (macroexpand-1 '(destructuring-bind x 1 x))
(LET* () (LET* ((#:G6 1) (X #:G6)) X))

sbcl:
CL-USER> (macroexpand-1 '(destructuring-bind x 1 x))
(LET ((#:WHOLE2137 1))
  (DECLARE (TYPE LIST #:WHOLE2137))
  (LET* ()
    (LET* ((X #:WHOLE2137))
      X)))

hyperspec:
destructuring-bind lambda-list expression declaration* form*

lambda-list::=
    (wholevar reqvars optvars restvar keyvars auxvars)
(Continue reading)

Vitaly Mayatskikh | 21 May 2008 11:08
Picon
Gravatar

bugfixes in tests

diff -up sbcl-1.0.16.41/tests/filesys.test.sh.orig sbcl-1.0.16.41/tests/filesys.test.sh
--- sbcl-1.0.16.41/tests/filesys.test.sh.orig	2008-05-21 10:30:05.000000000 +0200
+++ sbcl-1.0.16.41/tests/filesys.test.sh	2008-05-21 10:35:30.000000000 +0200
 <at>  <at>  -201,12 +201,12  <at>  <at>  check_status_maybe_lose "DIRECTORY/TRUEN
 # Test whether ENSURE-DIRECTORIES-EXIST can create a directory whose
 # name contains a wildcard character (it used to get itself confused
 # internally).
-run_sbcl --eval '(ensure-directories-exist "foo\\*bar/baz.txt")'
+run_sbcl --eval '(ensure-directories-exist "foo\\*bar/baz.txt")' --eval '(sb-ext:quit)'
 test -d foo*bar
 check_status_maybe_lose "ENSURE-DIRECTORIES-EXIST part 1" $? \
     0 "(directory exists)"

-run_sbcl --eval '(ensure-directories-exist "foo\\?bar/baz.txt")'
+run_sbcl --eval '(ensure-directories-exist "foo\\?bar/baz.txt")' --eval '(sb-ext:quit)'
 test -d foo?bar
 check_status_maybe_lose "ENSURE-DIRECTORIES-EXIST part 2" $? \
     0 "(directory exists)"
diff -up sbcl-1.0.16.41/tests/stress-gc.sh.orig sbcl-1.0.16.41/tests/stress-gc.sh
--- sbcl-1.0.16.41/tests/stress-gc.sh.orig	2007-12-28 20:46:57.000000000 +0100
+++ sbcl-1.0.16.41/tests/stress-gc.sh	2008-05-21 10:39:43.000000000 +0200
 <at>  <at>  -13,7 +13,7  <at>  <at> 

 . ./subr.sh

-sbcl <<EOF
+run_sbcl <<EOF
     (compile-file "./stress-gc.lisp")
(Continue reading)


Gmane