Update of /cvsroot/sbcl/sbcl/src/code
In directory sc8-pr-cvs1:/tmp/cvs-serv12500/src/code
Modified Files:
bit-bash.lisp defstruct.lisp parse-defmacro.lisp
Log Message:
0.8.0.13:
Miscellaneous grab bag of fixes
... use SB!XC:MOST-POSITIVE-FIXNUM in bit-bash type; the
expression is no doubt still wrong for 64-bit lisps, but
it stands a chance of being right for 32-bit; :)
... NIL is a valid structure slot name; (yes, really!)
... whine about invalid keywords in macro calls even if there
are no defined keywords (but just &KEY) in the lambda
list;
... prettify the compile-time warning in
%COMPILE-TIME-TYPE-ERROR a little;
... a couple of IGNOREs
Index: bit-bash.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/bit-bash.lisp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- bit-bash.lisp 25 Oct 2002 13:04:35 -0000 1.14
+++ bit-bash.lisp 28 May 2003 14:49:35 -0000 1.15
@@ -17,7 +17,7 @@
(defconstant unit-bits n-word-bits)
;;; the maximum number of bits that can be dealt with in a single call
-(defconstant max-bits (ash most-positive-fixnum -2))
+(defconstant max-bits (ash sb!xc:most-positive-fixnum -2))
(deftype unit ()
`(unsigned-byte ,unit-bits))
Index: defstruct.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/defstruct.lisp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- defstruct.lisp 26 May 2003 04:25:53 -0000 1.60
+++ defstruct.lisp 28 May 2003 14:49:35 -0000 1.61
@@ -604,23 +604,27 @@
:index 0
:type t)))
(multiple-value-bind (name default default-p type type-p read-only ro-p)
- (cond
- ((listp spec)
- (destructuring-bind
- (name
- &optional (default nil default-p)
- &key (type nil type-p) (read-only nil ro-p))
- spec
- (values name
- default default-p
- (uncross type) type-p
- read-only ro-p)))
- (t
- (when (keywordp spec)
- (style-warn "Keyword slot name indicates probable syntax ~
- error in DEFSTRUCT: ~S."
- spec))
- spec))
+ (typecase spec
+ (symbol
+ (when (keywordp spec)
+ (style-warn "Keyword slot name indicates probable syntax ~
+ error in DEFSTRUCT: ~S."
+ spec))
+ spec)
+ (cons
+ (destructuring-bind
+ (name
+ &optional (default nil default-p)
+ &key (type nil type-p) (read-only nil ro-p))
+ spec
+ (values name
+ default default-p
+ (uncross type) type-p
+ read-only ro-p)))
+ (t (error 'simple-program-error
+ :format-control "in DEFSTRUCT, ~S is not a legal slot ~
+ description."
+ :format-arguments (list spec))))
(when (find name (dd-slots defstruct)
:test #'string=
Index: parse-defmacro.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/parse-defmacro.lisp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- parse-defmacro.lisp 4 May 2003 16:52:33 -0000 1.14
+++ parse-defmacro.lisp 28 May 2003 14:49:36 -0000 1.15
@@ -87,6 +87,7 @@
(maximum 0)
(minimum 0)
(keys ())
+ (key-seen nil)
;; ANSI specifies that dotted lists are "treated exactly as if the
;; parameter name that ends the list had appeared preceded by &rest."
;; We force this behavior by transforming dotted lists into ordinary
@@ -188,6 +189,7 @@
(setq rest-name (gensym "KEYWORDS-"))
(push rest-name *ignorable-vars*)
(setq restp t)
+ (setq key-seen t)
(push-let-binding rest-name path t))
(&allow-other-keys
(setq allow-other-keys-p t))
@@ -242,7 +244,7 @@
:minimum ,minimum
:maximum ,explicit-maximum)))
*arg-tests*))
- (when keys
+ (when key-seen
(let ((problem (gensym "KEY-PROBLEM-"))
(info (gensym "INFO-")))
(push `(multiple-value-bind (,problem ,info)
|