From d515b8a4543a5e120c258846bc0b73eea47046b0 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sat, 9 May 2009 09:27:07 +0000 Subject: [PATCH] 1.0.28.33: minor post-DEFGLOBAL cleanups * Call array-accessor dispatch tables %%foo%% instead of **foo** to warn off the unwary. * Set their size to (1+ widetag-mask) -- this should not really matter since we check for other-pointer-lowtag before stripping the widetag, as widetag are always immediate objects, so the low bit is zero. ...but this is more obviously correct, and costs us, what 4 words of storage. * Mark one FIXME/KLUDGE more, since people have been so busy getting rid of them... * Restore the imperative tone in DEFVAR docstring. * Oops, left one FLUSHABLE too many in last commit. --- package-data-list.lisp-expr | 1 - src/code/array.lisp | 23 +++++++++++++---------- src/code/defboot.lisp | 2 +- version.lisp-expr | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index e29be50..723d822 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -270,7 +270,6 @@ of SBCL which maintained the CMU-CL-style split into two packages.)" "FIXUP-NOTE-KIND" "FIXUP-NOTE-FIXUP" "FIXUP-NOTE-POSITION" - "FLUSHABLE" "FOLDABLE" "FORCE-TN-TO-STACK" "FUN-INFO-DERIVE-TYPE" "FUN-INFO-IR2-CONVERT" diff --git a/src/code/array.lisp b/src/code/array.lisp index 4cd1b08..455d09f 100644 --- a/src/code/array.lisp +++ b/src/code/array.lisp @@ -328,17 +328,17 @@ of specialized arrays is supported." ;;; vectors or not simple. (macrolet ((def (name table-name) `(progn - (defglobal ,table-name (make-array ,sb!vm:widetag-mask)) + (defglobal ,table-name (make-array ,(1+ sb!vm:widetag-mask))) (defmacro ,name (array-var) `(the function (let ((tag 0)) (when (sb!vm::%other-pointer-p ,array-var) (setf tag (%other-pointer-widetag ,array-var))) (svref ,',table-name tag))))))) - (def !find-data-vector-setter **data-vector-setters**) - (def !find-data-vector-setter/check-bounds **data-vector-setters/check-bounds**) - (def !find-data-vector-reffer **data-vector-reffers**) - (def !find-data-vector-reffer/check-bounds **data-vector-reffers/check-bounds**)) + (def !find-data-vector-setter %%data-vector-setters%%) + (def !find-data-vector-setter/check-bounds %%data-vector-setters/check-bounds%%) + (def !find-data-vector-reffer %%data-vector-reffers%%) + (def !find-data-vector-reffer/check-bounds %%data-vector-reffers/check-bounds%%)) (macrolet ((%ref (accessor-getter extra-params) `(funcall (,accessor-getter array) array index ,@extra-params)) @@ -428,7 +428,10 @@ of specialized arrays is supported." new-value))) (define-reffers (symbol deffer check-form slow-path) `(progn - (setf ,symbol (make-array sb!vm::widetag-mask + ;; FIXME/KLUDGE: can't just FILL here, because genesis doesn't + ;; preserve the binding, so re-initiaize as NS doesn't have + ;; the energy to figure out to change that right now. + (setf ,symbol (make-array (1+ sb!vm::widetag-mask) :initial-element #'hairy-ref-error)) ,@(loop for widetag in '(sb!vm:complex-vector-widetag sb!vm:complex-vector-nil-widetag @@ -443,16 +446,16 @@ of specialized arrays is supported." collect `(setf (svref ,symbol ,widetag) (,deffer ,saetp ,check-form)))))) (defun !hairy-data-vector-reffer-init () - (define-reffers **data-vector-reffers** define-reffer + (define-reffers %%data-vector-reffers%% define-reffer (progn) #'slow-hairy-data-vector-ref) - (define-reffers **data-vector-setters** define-setter + (define-reffers %%data-vector-setters%% define-setter (progn) #'slow-hairy-data-vector-set) - (define-reffers **data-vector-reffers/check-bounds** define-reffer + (define-reffers %%data-vector-reffers/check-bounds%% define-reffer (%check-bound vector (length vector)) #'slow-hairy-data-vector-ref/check-bounds) - (define-reffers **data-vector-setters/check-bounds** define-setter + (define-reffers %%data-vector-setters/check-bounds%% define-setter (%check-bound vector (length vector)) #'slow-hairy-data-vector-set/check-bounds))) diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index c09818e..ac72b11 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -249,7 +249,7 @@ evaluated as a PROGN." (defmacro-mundanely defvar (var &optional (val nil valp) (doc nil docp)) #!+sb-doc - "Defines a special variable at top level. Declare the variable + "Define a special variable at top level. Declare the variable SPECIAL and, optionally, initialize it. If the variable already has a value, the old value is not clobbered. The third argument is an optional documentation string for the variable." diff --git a/version.lisp-expr b/version.lisp-expr index 2455f1f..a611eb1 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.28.32" +"1.0.28.33" -- 1.7.10.4