From 1b7fde9126d21b01f0d5359027242f8b5acdf9f8 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 28 May 2003 14:49:35 +0000 Subject: [PATCH] 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 --- NEWS | 2 ++ src/code/bit-bash.lisp | 2 +- src/code/defstruct.lisp | 38 +++++++++++++++++++++----------------- src/code/parse-defmacro.lisp | 4 +++- src/compiler/ctype.lisp | 2 +- src/compiler/x86/macros.lisp | 4 ++++ version.lisp-expr | 2 +- 7 files changed, 33 insertions(+), 21 deletions(-) diff --git a/NEWS b/NEWS index 681b5c9..d1705d1 100644 --- a/NEWS +++ b/NEWS @@ -1783,6 +1783,8 @@ changes in sbcl-0.8.1 relative to sbcl-0.8.0: * STREAM-READ-SEQUENCE and STREAM-WRITE-SEQUENCE now have methods defined on the relevant FUNDAMENTAL-BINARY-{INPUT,OUTPUT}-STREAM classes. (thanks to Antonio Martinez) + * fixed some bugs revealed by Paul Dietz' test suite: + ** NIL is now allowed as a structure slot name. planned incompatible changes in 0.8.x: * (not done yet, but planned:) When the profiling interface settles diff --git a/src/code/bit-bash.lisp b/src/code/bit-bash.lisp index 9312406..23f58ec 100644 --- a/src/code/bit-bash.lisp +++ b/src/code/bit-bash.lisp @@ -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)) diff --git a/src/code/defstruct.lisp b/src/code/defstruct.lisp index 8b83b55..e523eed 100644 --- a/src/code/defstruct.lisp +++ b/src/code/defstruct.lisp @@ -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= diff --git a/src/code/parse-defmacro.lisp b/src/code/parse-defmacro.lisp index dada4f5..4618214 100644 --- a/src/code/parse-defmacro.lisp +++ b/src/code/parse-defmacro.lisp @@ -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) diff --git a/src/compiler/ctype.lisp b/src/compiler/ctype.lisp index 2c9a094..d58a2af 100644 --- a/src/compiler/ctype.lisp +++ b/src/compiler/ctype.lisp @@ -799,6 +799,6 @@ (dtype (continuation-value dtype))) (unless (eq atype nil) (compiler-warn - "Asserted type ~S conflicts with derived type ~S." + "~@" atype dtype)))) (ir2-convert-full-call node block))) diff --git a/src/compiler/x86/macros.lisp b/src/compiler/x86/macros.lisp index d870e2f..d960a9f 100644 --- a/src/compiler/x86/macros.lisp +++ b/src/compiler/x86/macros.lisp @@ -111,6 +111,7 @@ (inst mov (make-ea :dword :scale 1 :index ,temp) ,reg))) #!-sb-thread (defmacro store-tl-symbol-value (reg symbol temp) + (declare (ignore temp)) `(store-symbol-value ,reg ,symbol)) (defmacro load-type (target source &optional (offset 0)) @@ -169,6 +170,9 @@ ;;; formalized, in documentation and in macro definition, ;;; with the macro becoming e.g. PSEUDO-ATOMIC-ALLOCATION. (defun allocation (alloc-tn size &optional inline) + ;; FIXME: since it appears that inline allocation is gone, we should + ;; remove the INLINE parameter, and all the above comments. + (declare (ignore inline)) (flet ((load-size (dst-tn size) (unless (and (tn-p size) (location= alloc-tn size)) (inst mov dst-tn size)))) diff --git a/version.lisp-expr b/version.lisp-expr index b5cfc60..2ee03aa 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.8.0.12" +"0.8.0.13" -- 1.7.10.4