From 545fa4548b327804cf78afe38a2ecd94ced86162 Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Thu, 11 Oct 2001 01:09:15 +0000 Subject: [PATCH] 0.pre7.59: cleanup after widetag renaming in 0.pre7.58.. ..renamed %VECTOR-TYPE-CODE to VECTOR-WIDETAG-AND-N-BITS ..renamed %COMPLEX-VECTOR-TYPE-CODE to COMPLEX-VECTOR-WIDETAG ..renamed DEFINE-PRIMITIVE-OBJECT :HEADER to :WIDETAG ..renamed PRIMITIVE-OBJECT-HEADER to PRIMITIVE-OBJECT-WIDETAG renamed WORD-BITS to N-WORD-BITS --- package-data-list.lisp-expr | 5 ++- src/code/alpha-vm.lisp | 2 +- src/code/array.lisp | 23 +++++------ src/code/bit-bash.lisp | 4 +- src/code/debug-int.lisp | 14 +++---- src/code/fd-stream.lisp | 7 ++-- src/code/float.lisp | 6 +-- src/code/host-alieneval.lisp | 13 ++++--- src/code/kernel.lisp | 3 +- src/code/room.lisp | 6 +-- src/code/run-program.lisp | 4 +- src/code/save.lisp | 2 +- src/code/stream.lisp | 8 ++-- src/code/target-alieneval.lisp | 2 +- src/code/target-c-call.lisp | 2 +- src/code/target-random.lisp | 4 +- src/code/x86-vm.lisp | 2 +- src/compiler/alpha/array.lisp | 2 +- src/compiler/alpha/parms.lisp | 8 ++-- src/compiler/alpha/type-vops.lisp | 20 +++++----- src/compiler/array-tran.lisp | 6 +-- src/compiler/bit-util.lisp | 4 +- src/compiler/generic/genesis.lisp | 67 +++++++++++++++++---------------- src/compiler/generic/objdef.lisp | 46 +++++++++++----------- src/compiler/generic/target-core.lisp | 2 +- src/compiler/generic/vm-fndb.lisp | 2 +- src/compiler/generic/vm-macs.lisp | 10 ++--- src/compiler/generic/vm-tran.lisp | 16 ++++---- src/compiler/generic/vm-type.lisp | 4 +- src/compiler/srctran.lisp | 28 +++++++------- src/compiler/target-disassem.lisp | 2 +- src/compiler/x86/array.lisp | 2 +- src/compiler/x86/insts.lisp | 2 +- src/compiler/x86/parms.lisp | 10 ++--- version.lisp-expr | 2 +- 35 files changed, 173 insertions(+), 167 deletions(-) diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index 6e0d752..4bc2893 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -1764,7 +1764,7 @@ structure representations" "OFFSET-STATIC-SYMBOL" "OTHER-IMMEDIATE-0-LOWTAG" "OTHER-IMMEDIATE-1-LOWTAG" "OTHER-POINTER-LOWTAG" "PAD-DATA-BLOCK" "PENDING-INTERRUPT-TRAP" - "PRIMITIVE-OBJECT" "PRIMITIVE-OBJECT-HEADER" + "PRIMITIVE-OBJECT" "PRIMITIVE-OBJECT-WIDETAG" "PRIMITIVE-OBJECT-LOWTAG" "PRIMITIVE-OBJECT-NAME" "PRIMITIVE-OBJECT-OPTIONS" "PRIMITIVE-OBJECT-P" "PRIMITIVE-OBJECT-SIZE" "PRIMITIVE-OBJECT-SLOTS" @@ -1839,7 +1839,8 @@ structure representations" "WEAK-POINTER-BROKEN-SLOT" "WEAK-POINTER-NEXT-SLOT" "WEAK-POINTER-SIZE" "WEAK-POINTER-WIDETAG" "WEAK-POINTER-VALUE-SLOT" - "WORD" "WORD-BITS" "WORD-BYTES" "WORD-REG-SC-NUMBER" "WORD-SHIFT" + "WORD" "N-WORD-BITS" "WORD-BYTES" + "WORD-REG-SC-NUMBER" "WORD-SHIFT" "ZERO-SC-NUMBER")) #s(sb-cold:package-data diff --git a/src/code/alpha-vm.lisp b/src/code/alpha-vm.lisp index b03bd84..e6aad8d 100644 --- a/src/code/alpha-vm.lisp +++ b/src/code/alpha-vm.lisp @@ -156,7 +156,7 @@ (declare (type (unsigned-byte 8) length) (type (simple-array (unsigned-byte 8) (*)) vector)) (copy-from-system-area pc (* sb!vm:byte-bits 5) - vector (* sb!vm:word-bits + vector (* sb!vm:n-word-bits sb!vm:vector-data-offset) (* length sb!vm:byte-bits)) (let* ((index 0) diff --git a/src/code/array.lisp b/src/code/array.lisp index 62452a5..5d86d2f 100644 --- a/src/code/array.lisp +++ b/src/code/array.lisp @@ -63,8 +63,8 @@ (sb!xc:defmacro pick-vector-type (type &rest specs) `(cond ,@(mapcar #'(lambda (spec) `(,(if (eq (car spec) t) - t - `(subtypep ,type ',(car spec))) + t + `(subtypep ,type ',(car spec))) ,@(cdr spec))) specs)))) @@ -75,7 +75,7 @@ ;;; MAKE-ARRAY for any non-simple array. Thus, there's some value to ;;; making this somewhat efficient, at least not doing full calls to ;;; SUBTYPEP in the easy cases. -(defun %vector-type-code (type) +(defun %vector-widetag-and-n-bits (type) (case type ;; Pick off some easy common cases. ;; @@ -84,7 +84,7 @@ ;; on smarter compiler transforms which do the calculation once ;; and for all in any reasonable user programs.) ((t) - (values #.sb!vm:simple-vector-widetag #.sb!vm:word-bits)) + (values #.sb!vm:simple-vector-widetag #.sb!vm:n-word-bits)) ((character base-char standard-char) (values #.sb!vm:simple-string-widetag #.sb!vm:byte-bits)) ((bit) @@ -129,8 +129,8 @@ (values #.sb!vm:simple-array-complex-long-float-widetag #!+x86 192 #!+sparc 256)) - (t (values #.sb!vm:simple-vector-widetag #.sb!vm:word-bits)))))) -(defun %complex-vector-type-code (type) + (t (values #.sb!vm:simple-vector-widetag #.sb!vm:n-word-bits)))))) +(defun %complex-vector-widetag (type) (case type ;; Pick off some easy common cases. ((t) @@ -161,9 +161,10 @@ (error "can't specify :DISPLACED-INDEX-OFFSET without :DISPLACED-TO")) (if (and simple (= array-rank 1)) ;; Its a (simple-array * (*)) - (multiple-value-bind (type bits) (%vector-type-code element-type) + (multiple-value-bind (type n-bits) + (%vector-widetag-and-n-bits element-type) (declare (type (unsigned-byte 8) type) - (type (integer 1 256) bits)) + (type (integer 1 256) n-bits)) (let* ((length (car dimensions)) (array (allocate-vector type @@ -171,8 +172,8 @@ (ceiling (* (if (= type sb!vm:simple-string-widetag) (1+ length) length) - bits) - sb!vm:word-bits)))) + n-bits) + sb!vm:n-word-bits)))) (declare (type index length)) (when initial-element-p (fill array initial-element)) @@ -195,7 +196,7 @@ initial-contents initial-element initial-element-p))) (array (make-array-header (cond ((= array-rank 1) - (%complex-vector-type-code element-type)) + (%complex-vector-widetag element-type)) (simple sb!vm:simple-array-widetag) (t sb!vm:complex-array-widetag)) array-rank))) diff --git a/src/code/bit-bash.lisp b/src/code/bit-bash.lisp index 589968b..fe2fa6e 100644 --- a/src/code/bit-bash.lisp +++ b/src/code/bit-bash.lisp @@ -14,7 +14,7 @@ ;;;; constants and types ;;; the number of bits to process at a time -(defconstant unit-bits sb!vm:word-bits) +(defconstant unit-bits sb!vm: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)) @@ -512,7 +512,7 @@ ;; %BYTE-BLIT (and correspondingly rename the corresponding VOP) and ;; replace the DST-END argument with an N-BYTES argument? (copy-to-system-area bv - (* sb!vm:vector-data-offset sb!vm:word-bits) + (* sb!vm:vector-data-offset sb!vm:n-word-bits) sap offset (* (length bv) sb!vm:byte-bits))) diff --git a/src/code/debug-int.lisp b/src/code/debug-int.lisp index 3996f93..236db61 100644 --- a/src/code/debug-int.lisp +++ b/src/code/debug-int.lisp @@ -2031,8 +2031,8 @@ (sb!sys:int-sap val))) (#.sb!vm:signed-reg-sc-number (with-escaped-value (val) - (if (logbitp (1- sb!vm:word-bits) val) - (logior val (ash -1 sb!vm:word-bits)) + (if (logbitp (1- sb!vm:n-word-bits) val) + (logior val (ash -1 sb!vm:n-word-bits)) val))) (#.sb!vm:unsigned-reg-sc-number (with-escaped-value (val) @@ -2176,8 +2176,8 @@ (#.sb!vm:signed-reg-sc-number (/show0 "case of SIGNED-REG-SC-NUMBER") (with-escaped-value (val) - (if (logbitp (1- sb!vm:word-bits) val) - (logior val (ash -1 sb!vm:word-bits)) + (if (logbitp (1- sb!vm:n-word-bits) val) + (logior val (ash -1 sb!vm:n-word-bits)) val))) (#.sb!vm:unsigned-reg-sc-number (/show0 "case of UNSIGNED-REG-SC-NUMBER") @@ -2331,7 +2331,7 @@ (#.sb!vm:sap-reg-sc-number (set-escaped-value (sap-int value))) (#.sb!vm:signed-reg-sc-number - (set-escaped-value (logand value (1- (ash 1 sb!vm:word-bits))))) + (set-escaped-value (logand value (1- (ash 1 sb!vm:n-word-bits))))) (#.sb!vm:unsigned-reg-sc-number (set-escaped-value value)) (#.sb!vm:non-descriptor-reg-sc-number @@ -2465,7 +2465,7 @@ (#.sb!vm:sap-reg-sc-number (set-escaped-value (sap-int value))) (#.sb!vm:signed-reg-sc-number - (set-escaped-value (logand value (1- (ash 1 sb!vm:word-bits))))) + (set-escaped-value (logand value (1- (ash 1 sb!vm:n-word-bits))))) (#.sb!vm:unsigned-reg-sc-number (set-escaped-value value)) (#.sb!vm:single-reg-sc-number @@ -3223,7 +3223,7 @@ (frame (do ((cfp (sb!vm:context-register scp sb!vm::cfp-offset)) (f (top-frame) (frame-down f))) ((= cfp (sap-int (frame-pointer f))) f) - (declare (type (unsigned-byte #.sb!vm:word-bits) cfp)))) + (declare (type (unsigned-byte #.sb!vm:n-word-bits) cfp)))) (component (breakpoint-data-component data)) (cookie (gethash component *fun-end-cookies*))) (remhash component *fun-end-cookies*) diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index c6a1052..5eb1bc45b 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -325,7 +325,7 @@ (copy-to-system-area thing (+ (* start sb!vm:byte-bits) (* sb!vm:vector-data-offset - sb!vm:word-bits)) + sb!vm:n-word-bits)) (fd-stream-obuf-sap fd-stream) (* tail sb!vm:byte-bits) (* bytes sb!vm:byte-bits))) @@ -343,7 +343,7 @@ (copy-to-system-area thing (+ (* start sb!vm:byte-bits) (* sb!vm:vector-data-offset - sb!vm:word-bits)) + sb!vm:n-word-bits)) (fd-stream-obuf-sap fd-stream) 0 (* bytes sb!vm:byte-bits))) @@ -581,7 +581,8 @@ (let* ((length (- end start)) (string (make-string length))) (copy-from-system-area sap (* start sb!vm:byte-bits) - string (* sb!vm:vector-data-offset sb!vm:word-bits) + string (* sb!vm:vector-data-offset + sb!vm:n-word-bits) (* length sb!vm:byte-bits)) string)) diff --git a/src/code/float.lisp b/src/code/float.lisp index 51a621e..870a8d0 100644 --- a/src/code/float.lisp +++ b/src/code/float.lisp @@ -864,19 +864,19 @@ uninterruptibly frob the rounding modes & do ieee round-to-integer. (exp (ldb sb!vm:double-float-exponent-byte hi-bits)) (frac (logior (ldb sb!vm:double-float-significand-byte hi-bits) sb!vm:double-float-hidden-bit)) - (shift (- exp (- sb!vm:double-float-digits sb!vm:word-bits) + (shift (- exp (- sb!vm:double-float-digits sb!vm:n-word-bits) sb!vm:double-float-bias))) (when (> exp sb!vm:double-float-normal-exponent-max) (error 'floating-point-invalid-operation :operator 'truncate :operands (list x))) - (if (<= shift (- sb!vm:word-bits sb!vm:double-float-digits)) + (if (<= shift (- sb!vm:n-word-bits sb!vm:double-float-digits)) 0 (let* ((res-hi (ash frac shift)) (res (if (plusp shift) (logior res-hi (the fixnum (ash (double-float-low-bits x) - (- shift sb!vm:word-bits)))) + (- shift sb!vm:n-word-bits)))) res-hi))) (declare (type (unsigned-byte 31) res-hi res)) (if (minusp hi-bits) diff --git a/src/code/host-alieneval.lisp b/src/code/host-alieneval.lisp index de1bd71..54d98e7 100644 --- a/src/code/host-alieneval.lisp +++ b/src/code/host-alieneval.lisp @@ -332,7 +332,7 @@ (def-alien-type-translator system-area-pointer () (make-alien-system-area-pointer-type - :bits #!-alpha sb!vm:word-bits #!+alpha 64)) + :bits #!-alpha sb!vm:n-word-bits #!+alpha 64)) (def-alien-type-method (system-area-pointer :unparse) (type) (declare (ignore type)) @@ -509,13 +509,13 @@ (def-alien-type-class (integer) (signed t :type (member t nil))) -(def-alien-type-translator signed (&optional (bits sb!vm:word-bits)) +(def-alien-type-translator signed (&optional (bits sb!vm:n-word-bits)) (make-alien-integer-type :bits bits)) -(def-alien-type-translator integer (&optional (bits sb!vm:word-bits)) +(def-alien-type-translator integer (&optional (bits sb!vm:n-word-bits)) (make-alien-integer-type :bits bits)) -(def-alien-type-translator unsigned (&optional (bits sb!vm:word-bits)) +(def-alien-type-translator unsigned (&optional (bits sb!vm:n-word-bits)) (make-alien-integer-type :bits bits :signed nil)) (def-alien-type-method (integer :unparse) (type) @@ -569,7 +569,7 @@ ;;; FIXME: Check to make sure that we aren't attaching user-readable ;;; stuff to CL:BOOLEAN in any way which impairs ANSI compliance. -(def-alien-type-translator boolean (&optional (bits sb!vm:word-bits)) +(def-alien-type-translator boolean (&optional (bits sb!vm:n-word-bits)) (make-alien-boolean-type :bits bits :signed nil)) (def-alien-type-method (boolean :unparse) (type) @@ -771,7 +771,8 @@ ;;;; the POINTER type (def-alien-type-class (pointer :include (alien-value (:bits - #!-alpha sb!vm:word-bits + #!-alpha + sb!vm:n-word-bits #!+alpha 64))) (to nil :type (or alien-type null))) diff --git a/src/code/kernel.lisp b/src/code/kernel.lisp index 34dc5d4..f664cdb 100644 --- a/src/code/kernel.lisp +++ b/src/code/kernel.lisp @@ -119,7 +119,8 @@ (sb!kernel:%raw-bits object offset)) (defun %set-raw-bits (object offset value) - (declare (type index offset) (type (unsigned-byte #.sb!vm:word-bits) value)) + (declare (type index offset)) + (declare (type (unsigned-byte #.sb!vm:n-word-bits) value)) (setf (sb!kernel:%raw-bits object offset) value)) (defun make-single-float (x) (make-single-float x)) diff --git a/src/code/room.lisp b/src/code/room.lisp index 408bc14..c108cc0 100644 --- a/src/code/room.lisp +++ b/src/code/room.lisp @@ -29,14 +29,14 @@ (defvar *meta-room-info* (make-array 256 :initial-element nil)) (dolist (obj *primitive-objects*) - (let ((header (primitive-object-header obj)) + (let ((widetag (primitive-object-widetag obj)) (lowtag (primitive-object-lowtag obj)) (name (primitive-object-name obj)) (variable (primitive-object-variable-length obj)) (size (primitive-object-size obj))) (cond ((not lowtag)) - ((not header) + ((not widetag) (let ((info (make-room-info :name name :kind :lowtag)) (lowtag (symbol-value lowtag))) @@ -45,7 +45,7 @@ (setf (svref *meta-room-info* (logior lowtag (ash i 3))) info)))) (variable) (t - (setf (svref *meta-room-info* (symbol-value header)) + (setf (svref *meta-room-info* (symbol-value widetag)) (make-room-info :name name :kind :fixed :length size)))))) diff --git a/src/code/run-program.lisp b/src/code/run-program.lisp index 1539001..0e73a96 100644 --- a/src/code/run-program.lisp +++ b/src/code/run-program.lisp @@ -413,7 +413,7 @@ ;; Blast the string into place. (sb-kernel:copy-to-system-area (the simple-string s) (* sb-vm:vector-data-offset - sb-vm:word-bits) + sb-vm:n-word-bits) string-sap 0 (* (1+ n) sb-vm:byte-bits)) ;; Blast the pointer to the string into place. @@ -713,7 +713,7 @@ (sb-kernel:copy-from-system-area (alien-sap buf) 0 string (* sb-vm:vector-data-offset - sb-vm:word-bits) + sb-vm:n-word-bits) (* count sb-vm:byte-bits)) (write-string string stream :end count))))))))))) diff --git a/src/code/save.lisp b/src/code/save.lisp index 061be32..74a6906 100644 --- a/src/code/save.lisp +++ b/src/code/save.lisp @@ -19,7 +19,7 @@ (sb!alien:def-alien-routine "save" (sb!alien:boolean) (file sb!c-call:c-string) - (initial-function (sb!alien:unsigned #.sb!vm:word-bits))) + (initial-function (sb!alien:unsigned #.sb!vm:n-word-bits))) ;;; FIXME: When this is run without the PURIFY option, ;;; it seems to save memory all the way up to the high-water mark, diff --git a/src/code/stream.lisp b/src/code/stream.lisp index a433a65..e640a9c 100644 --- a/src/code/stream.lisp +++ b/src/code/stream.lisp @@ -511,10 +511,10 @@ (when (/= start +in-buffer-extra+) (bit-bash-copy ibuf (+ (* +in-buffer-extra+ sb!vm:byte-bits) (* sb!vm:vector-data-offset - sb!vm:word-bits)) + sb!vm:n-word-bits)) ibuf (+ (the index (* start sb!vm:byte-bits)) (* sb!vm:vector-data-offset - sb!vm:word-bits)) + sb!vm:n-word-bits)) (* count sb!vm:byte-bits))) (setf (lisp-stream-in-index stream) (1+ start)) (code-char (aref ibuf start)))))) @@ -533,10 +533,10 @@ (funcall (lisp-stream-bin stream) stream eof-error-p eof-value)) (t (unless (zerop start) - (bit-bash-copy ibuf (* sb!vm:vector-data-offset sb!vm:word-bits) + (bit-bash-copy ibuf (* sb!vm:vector-data-offset sb!vm:n-word-bits) ibuf (+ (the index (* start sb!vm:byte-bits)) (* sb!vm:vector-data-offset - sb!vm:word-bits)) + sb!vm:n-word-bits)) (* count sb!vm:byte-bits))) (setf (lisp-stream-in-index stream) (1+ start)) (aref ibuf start))))) diff --git a/src/code/target-alieneval.lisp b/src/code/target-alieneval.lisp index 935cf7f..baf1b79 100644 --- a/src/code/target-alieneval.lisp +++ b/src/code/target-alieneval.lisp @@ -517,7 +517,7 @@ (ecase units (:bits 1) (:bytes sb!vm:byte-bits) - (:words sb!vm:word-bits)))) + (:words sb!vm:n-word-bits)))) (error "unknown size for alien type ~S" (unparse-alien-type alien-type))))) diff --git a/src/code/target-c-call.lisp b/src/code/target-c-call.lisp index df2459e..0d4e2cb 100644 --- a/src/code/target-c-call.lisp +++ b/src/code/target-c-call.lisp @@ -42,6 +42,6 @@ (let ((result (make-string length))) (sb!kernel:copy-from-system-area (alien-sap ptr) 0 result (* sb!vm:vector-data-offset - sb!vm:word-bits) + sb!vm:n-word-bits) (* length sb!vm:byte-bits)) result))))) diff --git a/src/code/target-random.lisp b/src/code/target-random.lisp index 9937cd7..af1e45f 100644 --- a/src/code/target-random.lisp +++ b/src/code/target-random.lisp @@ -191,7 +191,7 @@ (- (sb!impl::make-double-float (dpb (ash (random-chunk state) (- sb!vm:double-float-digits random-chunk-length - sb!vm:word-bits)) + sb!vm:n-word-bits)) sb!vm:double-float-significand-byte (sb!impl::double-float-high-bits 1d0)) (random-chunk state)) @@ -207,7 +207,7 @@ (- (sb!impl::make-double-float (dpb (ash (sb!vm::random-mt19937 state-vector) (- sb!vm:double-float-digits random-chunk-length - sb!vm:word-bits)) + sb!vm:n-word-bits)) sb!vm:double-float-significand-byte (sb!impl::double-float-high-bits 1d0)) (sb!vm::random-mt19937 state-vector)) diff --git a/src/code/x86-vm.lisp b/src/code/x86-vm.lisp index f5e8e76..26d8dc4 100644 --- a/src/code/x86-vm.lisp +++ b/src/code/x86-vm.lisp @@ -276,7 +276,7 @@ (/hexstr length) (/hexstr vector) (copy-from-system-area pc (* sb!vm:byte-bits 2) - vector (* sb!vm:word-bits + vector (* sb!vm:n-word-bits sb!vm:vector-data-offset) (* length sb!vm:byte-bits)) (let* ((index 0) diff --git a/src/compiler/alpha/array.lisp b/src/compiler/alpha/array.lisp index d8b19cc..9ff35c1 100644 --- a/src/compiler/alpha/array.lisp +++ b/src/compiler/alpha/array.lisp @@ -122,7 +122,7 @@ ,size vector-data-offset other-pointer-lowtag ,scs ,element-type data-vector-set))) (def-small-data-vector-frobs (type bits) - (let* ((elements-per-word (floor word-bits bits)) + (let* ((elements-per-word (floor n-word-bits bits)) (bit-shift (1- (integer-length elements-per-word)))) `(progn (define-vop (,(symbolicate 'data-vector-ref/ type)) diff --git a/src/compiler/alpha/parms.lisp b/src/compiler/alpha/parms.lisp index 1936ac9..9ac99b0 100644 --- a/src/compiler/alpha/parms.lisp +++ b/src/compiler/alpha/parms.lisp @@ -11,7 +11,7 @@ (eval-when (:compile-toplevel :load-toplevel :execute) -(defconstant word-bits 32 +(defconstant n-word-bits 32 #!+sb-doc "Number of bits per word where a word holds one lisp descriptor.") @@ -19,11 +19,11 @@ #!+sb-doc "Number of bits per byte where a byte is the smallest addressable object.") -(defconstant word-shift (1- (integer-length (/ word-bits byte-bits))) +(defconstant word-shift (1- (integer-length (/ n-word-bits byte-bits))) #!+sb-doc "Number of bits to shift between word addresses and byte addresses.") -(defconstant word-bytes (/ word-bits byte-bits) +(defconstant word-bytes (/ n-word-bits byte-bits) #!+sb-doc "Number of bytes in a word.") @@ -49,7 +49,7 @@ (+ (byte-size single-float-significand-byte) 1)) (defconstant double-float-digits - (+ (byte-size double-float-significand-byte) word-bits 1)) + (+ (byte-size double-float-significand-byte) n-word-bits 1)) ;; Values in 17f code seem to be same as HPPA. These values are from ;; DEC Assembly Language Programmers guide. The active bits are diff --git a/src/compiler/alpha/type-vops.lisp b/src/compiler/alpha/type-vops.lisp index 2963d4d..4b31c6a 100644 --- a/src/compiler/alpha/type-vops.lisp +++ b/src/compiler/alpha/type-vops.lisp @@ -61,37 +61,37 @@ (function-p (if (intersection headers *fun-header-widetags*) (if (subsetp headers *fun-header-widetags*) t - (error "Can't test for mix of function subtypes ~ + (error "can't test for mix of function subtypes ~ and normal header types.")) nil))) (unless type-codes - (error "Must supply at least on type for test-type.")) + (error "must supply at least one type for test-type")) (cond (fixnump (when (remove-if #'(lambda (x) (or (= x even-fixnum-lowtag) (= x odd-fixnum-lowtag))) lowtags) - (error "Can't mix fixnum testing with other lowtags.")) + (error "can't mix fixnum testing with other lowtags")) (when function-p - (error "Can't mix fixnum testing with function subtype testing.")) + (error "can't mix fixnum testing with function subtype testing")) (when immediates - (error "Can't mix fixnum testing with other immediates.")) + (error "can't mix fixnum testing with other immediates")) (if headers `(%test-fixnum-and-headers ,value ,temp ,target ,not-p ',(canonicalize-headers headers)) `(%test-fixnum ,value ,temp ,target ,not-p))) (immediates (when headers - (error "Can't mix testing of immediates with testing of headers.")) + (error "can't mix testing of immediates with testing of headers")) (when lowtags - (error "Can't mix testing of immediates with testing of lowtags.")) + (error "can't mix testing of immediates with testing of lowtags")) (when (cdr immediates) - (error "Can't test multiple immediates at the same time.")) + (error "can't test multiple immediates at the same time")) `(%test-immediate ,value ,temp ,target ,not-p ,(car immediates))) (lowtags (when (cdr lowtags) - (error "Can't test multiple lowtags at the same time.")) + (error "can't test multiple lowtags at the same time")) (if headers `(%test-lowtag-and-headers ,value ,temp ,target ,not-p ,(car lowtags) @@ -101,7 +101,7 @@ `(%test-headers ,value ,temp ,target ,not-p ,function-p ',(canonicalize-headers headers))) (t - (error "Nothing to test?")))))) + (error "nothing to test?")))))) (defun %test-fixnum (value temp target not-p) (assemble () diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp index 5d055ab..066040c 100644 --- a/src/compiler/array-tran.lisp +++ b/src/compiler/array-tran.lisp @@ -253,11 +253,11 @@ 'length `(+ length ,n-pad-elements))) (n-words-form - (if (>= n-bits-per-element sb!vm:word-bits) + (if (>= n-bits-per-element sb!vm:n-word-bits) `(* ,padded-length-form (the fixnum ; i.e., not RATIO - ,(/ n-bits-per-element sb!vm:word-bits))) - (let ((n-elements-per-word (/ sb!vm:word-bits + ,(/ n-bits-per-element sb!vm:n-word-bits))) + (let ((n-elements-per-word (/ sb!vm:n-word-bits n-bits-per-element))) (declare (type index n-elements-per-word)) ; i.e., not RATIO `(ceiling ,padded-length-form ,n-elements-per-word)))) diff --git a/src/compiler/bit-util.lisp b/src/compiler/bit-util.lisp index 13cfb7e..10d540c 100644 --- a/src/compiler/bit-util.lisp +++ b/src/compiler/bit-util.lisp @@ -25,8 +25,8 @@ ;;; less-portable implementation of CLEAR-BIT-VECTOR: ;;; (do ((i sb!vm:vector-data-offset (1+ i)) ;;; (end (+ sb!vm:vector-data-offset -;;; (ash (+ (length vec) (1- sb!vm:word-bits)) -;;; (- (1- (integer-length sb!vm:word-bits))))))) +;;; (ash (+ (length vec) (1- sb!vm:n-word-bits)) +;;; (- (1- (integer-length sb!vm:n-word-bits))))))) ;;; ((= i end) vec) ;;; (setf (sb!kernel:%raw-bits vec i) 0))) ;;; We could use this in the target SBCL if the new version turns out to be a diff --git a/src/compiler/generic/genesis.lisp b/src/compiler/generic/genesis.lisp index cfb66af..40478a5 100644 --- a/src/compiler/generic/genesis.lisp +++ b/src/compiler/generic/genesis.lisp @@ -138,7 +138,7 @@ ;; the GSPACE that this descriptor is allocated in, or NIL if not set yet. (gspace nil :type (or gspace null)) ;; the offset in words from the start of GSPACE, or NIL if not set yet - (word-offset nil :type (or (unsigned-byte #.sb!vm:word-bits) null)) + (word-offset nil :type (or (unsigned-byte #.sb!vm:n-word-bits) null)) ;; the high and low halves of the descriptor ;; ;; KLUDGE: Judging from the comments in genesis.lisp of the CMU CL @@ -220,14 +220,14 @@ (defun descriptor-fixnum (des) (let ((bits (descriptor-bits des))) - (if (logbitp (1- sb!vm:word-bits) bits) - ;; KLUDGE: The (- SB!VM:WORD-BITS 2) term here looks right to - ;; me, and it works, but in CMU CL it was (1- SB!VM:WORD-BITS), + (if (logbitp (1- sb!vm:n-word-bits) bits) + ;; KLUDGE: The (- SB!VM:N-WORD-BITS 2) term here looks right to + ;; me, and it works, but in CMU CL it was (1- SB!VM:N-WORD-BITS), ;; and although that doesn't make sense for me, or work for me, ;; it's hard to see how it could have been wrong, since CMU CL ;; genesis worked. It would be nice to understand how this came ;; to be.. -- WHN 19990901 - (logior (ash bits -2) (ash -1 (- sb!vm:word-bits 2))) + (logior (ash bits -2) (ash -1 (- sb!vm:n-word-bits 2))) (ash bits -2)))) ;;; common idioms @@ -278,12 +278,13 @@ (defun make-random-descriptor (value) (make-descriptor (logand (ash value (- descriptor-low-bits)) (1- (ash 1 - (- sb!vm:word-bits descriptor-low-bits)))) + (- sb!vm:n-word-bits + descriptor-low-bits)))) (logand value (1- (ash 1 descriptor-low-bits))))) (defun make-fixnum-descriptor (num) (when (>= (integer-length num) - (1+ (- sb!vm:word-bits sb!vm:n-lowtag-bits))) + (1+ (- sb!vm:n-word-bits sb!vm:n-lowtag-bits))) (error "~D is too big for a fixnum." num)) (make-random-descriptor (ash num (1- sb!vm:n-lowtag-bits)))) @@ -380,7 +381,7 @@ (defun maybe-byte-swap (word) (declare (type (unsigned-byte 32) word)) - (aver (= sb!vm:word-bits 32)) + (aver (= sb!vm:n-word-bits 32)) (aver (= sb!vm:byte-bits 8)) (if (not *genesis-byte-order-swap-p*) word @@ -391,7 +392,7 @@ (defun maybe-byte-swap-short (short) (declare (type (unsigned-byte 16) short)) - (aver (= sb!vm:word-bits 32)) + (aver (= sb!vm:n-word-bits 32)) (aver (= sb!vm:byte-bits 8)) (if (not *genesis-byte-order-swap-p*) short @@ -415,7 +416,7 @@ (ldb (byte 8 ,(* i 8)) new-value))))) `(progn (defun ,name (byte-vector byte-index) - (aver (= sb!vm:word-bits 32)) + (aver (= sb!vm:n-word-bits 32)) (aver (= sb!vm:byte-bits 8)) (ecase sb!c:*backend-byte-order* (:little-endian @@ -423,7 +424,7 @@ (:big-endian (error "stub: no big-endian ports of SBCL (yet?)")))) (defun (setf ,name) (new-value byte-vector byte-index) - (aver (= sb!vm:word-bits 32)) + (aver (= sb!vm:n-word-bits 32)) (aver (= sb!vm:byte-bits 8)) (ecase sb!c:*backend-byte-order* (:little-endian @@ -581,20 +582,20 @@ (defun bignum-to-core (n) #!+sb-doc "Copy a bignum to the cold core." - (let* ((words (ceiling (1+ (integer-length n)) sb!vm:word-bits)) + (let* ((words (ceiling (1+ (integer-length n)) sb!vm:n-word-bits)) (handle (allocate-unboxed-object *dynamic* - sb!vm:word-bits + sb!vm:n-word-bits words sb!vm:bignum-widetag))) (declare (fixnum words)) (do ((index 1 (1+ index)) - (remainder n (ash remainder (- sb!vm:word-bits)))) + (remainder n (ash remainder (- sb!vm:n-word-bits)))) ((> index words) (unless (zerop (integer-length remainder)) ;; FIXME: Shouldn't this be a fatal error? (warn "~D words of ~D were written, but ~D bits were left over." words n remainder))) - (let ((word (ldb (byte sb!vm:word-bits 0) remainder))) + (let ((word (ldb (byte sb!vm:n-word-bits 0) remainder))) (write-wordindexed handle index (make-descriptor (ash word (- descriptor-low-bits)) (ldb (byte descriptor-low-bits 0) @@ -604,7 +605,7 @@ (defun number-pair-to-core (first second type) #!+sb-doc "Makes a number pair of TYPE (ratio or complex) and fills it in." - (let ((des (allocate-unboxed-object *dynamic* sb!vm:word-bits 2 type))) + (let ((des (allocate-unboxed-object *dynamic* sb!vm:n-word-bits 2 type))) (write-wordindexed des 1 first) (write-wordindexed des 2 second) des)) @@ -613,7 +614,7 @@ (etypecase x (single-float (let ((des (allocate-unboxed-object *dynamic* - sb!vm:word-bits + sb!vm:n-word-bits (1- sb!vm:single-float-size) sb!vm:single-float-widetag))) (write-wordindexed des @@ -622,7 +623,7 @@ des)) (double-float (let ((des (allocate-unboxed-object *dynamic* - sb!vm:word-bits + sb!vm:n-word-bits (1- sb!vm:double-float-size) sb!vm:double-float-widetag)) (high-bits (make-random-descriptor (double-float-high-bits x))) @@ -638,7 +639,7 @@ #!+(and long-float x86) (long-float (let ((des (allocate-unboxed-object *dynamic* - sb!vm:word-bits + sb!vm:n-word-bits (1- sb!vm:long-float-size) sb!vm:long-float-widetag)) (exp-bits (make-random-descriptor (long-float-exp-bits x))) @@ -655,7 +656,7 @@ (defun complex-single-float-to-core (num) (declare (type (complex single-float) num)) - (let ((des (allocate-unboxed-object *dynamic* sb!vm:word-bits + (let ((des (allocate-unboxed-object *dynamic* sb!vm:n-word-bits (1- sb!vm:complex-single-float-size) sb!vm:complex-single-float-widetag))) (write-wordindexed des sb!vm:complex-single-float-real-slot @@ -666,7 +667,7 @@ (defun complex-double-float-to-core (num) (declare (type (complex double-float) num)) - (let ((des (allocate-unboxed-object *dynamic* sb!vm:word-bits + (let ((des (allocate-unboxed-object *dynamic* sb!vm:n-word-bits (1- sb!vm:complex-double-float-size) sb!vm:complex-double-float-widetag))) (let* ((real (realpart num)) @@ -715,7 +716,7 @@ (declaim (ftype (function (sb!vm:word) descriptor) sap-to-core)) (defun sapint-to-core (sapint) (let ((des (allocate-unboxed-object *dynamic* - sb!vm:word-bits + sb!vm:n-word-bits (1- sb!vm:sap-size) sb!vm:sap-widetag))) (write-wordindexed des @@ -734,7 +735,7 @@ ;;; descriptor. (defun vector-in-core (&rest objects) (let* ((size (length objects)) - (result (allocate-vector-object *dynamic* sb!vm:word-bits size + (result (allocate-vector-object *dynamic* sb!vm:n-word-bits size sb!vm:simple-vector-widetag))) (dotimes (index size) (write-wordindexed result (+ index sb!vm:vector-data-offset) @@ -751,7 +752,7 @@ (declare (simple-string name)) (let ((symbol (allocate-unboxed-object (or *cold-symbol-allocation-gspace* *dynamic*) - sb!vm:word-bits + sb!vm:n-word-bits (1- sb!vm:symbol-size) sb!vm:symbol-header-widetag))) (write-wordindexed symbol sb!vm:symbol-value-slot *unbound-marker*) @@ -1056,7 +1057,7 @@ (defun make-nil-descriptor () (let* ((des (allocate-unboxed-object *static* - sb!vm:word-bits + sb!vm:n-word-bits sb!vm:symbol-size 0)) (result (make-descriptor (descriptor-high des) @@ -1926,7 +1927,7 @@ (fop-small-vector) (let* ((size (clone-arg)) (result (allocate-vector-object *dynamic* - sb!vm:word-bits + sb!vm:n-word-bits size sb!vm:simple-vector-widetag))) (do ((index (1- size) (1- index))) @@ -1964,7 +1965,7 @@ (let* ((len (read-arg 4)) (result (allocate-vector-object *dynamic* - sb!vm:word-bits + sb!vm:n-word-bits len sb!vm:simple-array-single-float-widetag)) (start (+ (descriptor-byte-offset result) @@ -2043,7 +2044,7 @@ (ecase +backend-fasl-file-implementation+ (:x86 ; (which has 80-bit long-float format) (prepare-for-fast-read-byte *fasl-input-stream* - (let* ((des (allocate-unboxed-object *dynamic* sb!vm:word-bits + (let* ((des (allocate-unboxed-object *dynamic* sb!vm:n-word-bits (1- sb!vm:long-float-size) sb!vm:long-float-widetag)) (low-bits (make-random-descriptor (fast-read-u-integer 4))) @@ -2059,7 +2060,7 @@ #+nil (#.sb!c:sparc-fasl-file-implementation ; 128 bit long-float format (prepare-for-fast-read-byte *fasl-input-stream* - (let* ((des (allocate-unboxed-object *dynamic* sb!vm:word-bits + (let* ((des (allocate-unboxed-object *dynamic* sb!vm:n-word-bits (1- sb!vm:long-float-size) sb!vm:long-float-widetag)) (low-bits (make-random-descriptor (fast-read-u-integer 4))) @@ -2078,7 +2079,7 @@ (ecase +backend-fasl-file-implementation+ (:x86 ; (which has 80-bit long-float format) (prepare-for-fast-read-byte *fasl-input-stream* - (let* ((des (allocate-unboxed-object *dynamic* sb!vm:word-bits + (let* ((des (allocate-unboxed-object *dynamic* sb!vm:n-word-bits (1- sb!vm:complex-long-float-size) sb!vm:complex-long-float-widetag)) (real-low-bits (make-random-descriptor (fast-read-u-integer 4))) @@ -2111,7 +2112,7 @@ #+nil (#.sb!c:sparc-fasl-file-implementation ; 128 bit long-float format (prepare-for-fast-read-byte *fasl-input-stream* - (let* ((des (allocate-unboxed-object *dynamic* sb!vm:word-bits + (let* ((des (allocate-unboxed-object *dynamic* sb!vm:n-word-bits (1- sb!vm:complex-long-float-size) sb!vm:complex-long-float-widetag)) (real-low-bits (make-random-descriptor (fast-read-u-integer 4))) @@ -2182,7 +2183,7 @@ (defun finalize-load-time-value-noise () (cold-set (cold-intern '*!load-time-values*) (allocate-vector-object *dynamic* - sb!vm:word-bits + sb!vm:n-word-bits *load-time-value-counter* sb!vm:simple-vector-widetag))) @@ -2616,7 +2617,7 @@ "struct ~A {~%" (nsubstitute #\_ #\- (string-downcase (string (sb!vm:primitive-object-name obj))))) - (when (sb!vm:primitive-object-header obj) + (when (sb!vm:primitive-object-widetag obj) (format t " lispobj header;~%")) (dolist (slot (sb!vm:primitive-object-slots obj)) (format t " ~A ~A~@[[1]~];~%" diff --git a/src/compiler/generic/objdef.lisp b/src/compiler/generic/objdef.lisp index a4989d5..17b27e3 100644 --- a/src/compiler/generic/objdef.lisp +++ b/src/compiler/generic/objdef.lisp @@ -19,18 +19,18 @@ (cdr :ref-trans cdr :set-trans sb!c::%rplacd :init :arg)) (define-primitive-object (instance :lowtag instance-pointer-lowtag - :header instance-header-widetag + :widetag instance-header-widetag :alloc-trans %make-instance) (slots :rest-p t)) (define-primitive-object (bignum :lowtag other-pointer-lowtag - :header bignum-widetag + :widetag bignum-widetag :alloc-trans sb!bignum::%allocate-bignum) (digits :rest-p t :c-type #!-alpha "long" #!+alpha "u32")) (define-primitive-object (ratio :type ratio :lowtag other-pointer-lowtag - :header ratio-widetag + :widetag ratio-widetag :alloc-trans %make-ratio) (numerator :type integer :ref-known (flushable movable) @@ -42,23 +42,23 @@ :init :arg)) (define-primitive-object (single-float :lowtag other-pointer-lowtag - :header single-float-widetag) + :widetag single-float-widetag) (value :c-type "float")) (define-primitive-object (double-float :lowtag other-pointer-lowtag - :header double-float-widetag) + :widetag double-float-widetag) (filler) (value :c-type "double" :length 2)) #!+long-float (define-primitive-object (long-float :lowtag other-pointer-lowtag - :header long-float-widetag) + :widetag long-float-widetag) #!+sparc (filler) (value :c-type "long double" :length #!+x86 3 #!+sparc 4)) (define-primitive-object (complex :type complex :lowtag other-pointer-lowtag - :header complex-widetag + :widetag complex-widetag :alloc-trans %make-complex) (real :type real :ref-known (flushable movable) @@ -70,7 +70,7 @@ :init :arg)) (define-primitive-object (array :lowtag other-pointer-lowtag - :header t) + :widetag t) (fill-pointer :type index :ref-trans %array-fill-pointer :ref-known (flushable foldable) @@ -105,14 +105,14 @@ (define-primitive-object (vector :type vector :lowtag other-pointer-lowtag - :header t) + :widetag t) (length :ref-trans sb!c::vector-length :type index) (data :rest-p t :c-type #!-alpha "unsigned long" #!+alpha "u32")) (define-primitive-object (code :type code-component :lowtag other-pointer-lowtag - :header t) + :widetag t) (code-size :type index :ref-known (flushable movable) :ref-trans %code-code-size) @@ -131,7 +131,7 @@ (define-primitive-object (fdefn :type fdefn :lowtag other-pointer-lowtag - :header fdefn-widetag) + :widetag fdefn-widetag) (name :ref-trans fdefn-name) (fun :type (or function null) :ref-trans fdefn-fun) (raw-addr :c-type #!-alpha "char *" #!+alpha "u32")) @@ -140,7 +140,7 @@ ;;; which are also subtypes of Common Lisp's FUNCTION type) (define-primitive-object (simple-fun :type function :lowtag fun-pointer-lowtag - :header simple-fun-header-widetag) + :widetag simple-fun-header-widetag) #!-x86 (self :ref-trans %simple-fun-self :set-trans (setf %simple-fun-self)) #!+x86 (self @@ -178,17 +178,17 @@ :set-trans (setf %simple-fun-type)) (code :rest-p t :c-type "unsigned char")) -(define-primitive-object (return-pc :lowtag other-pointer-lowtag :header t) +(define-primitive-object (return-pc :lowtag other-pointer-lowtag :widetag t) (return-point :c-type "unsigned char" :rest-p t)) (define-primitive-object (closure :lowtag fun-pointer-lowtag - :header closure-header-widetag) + :widetag closure-header-widetag) (fun :init :arg :ref-trans %closure-fun) (info :rest-p t)) (define-primitive-object (funcallable-instance :lowtag fun-pointer-lowtag - :header funcallable-instance-header-widetag + :widetag funcallable-instance-header-widetag :alloc-trans %make-funcallable-instance) #!-x86 (fun @@ -219,7 +219,7 @@ (info :rest-p t)) (define-primitive-object (value-cell :lowtag other-pointer-lowtag - :header value-cell-header-widetag + :widetag value-cell-header-widetag :alloc-trans make-value-cell) (value :set-trans value-cell-set :set-known (unsafe) @@ -229,19 +229,19 @@ #!+alpha (define-primitive-object (sap :lowtag other-pointer-lowtag - :header sap-widetag) + :widetag sap-widetag) (padding) (pointer :c-type "char *" :length 2)) #!-alpha (define-primitive-object (sap :lowtag other-pointer-lowtag - :header sap-widetag) + :widetag sap-widetag) (pointer :c-type "char *")) (define-primitive-object (weak-pointer :type weak-pointer :lowtag other-pointer-lowtag - :header weak-pointer-widetag + :widetag weak-pointer-widetag :alloc-trans make-weak-pointer) (value :ref-trans sb!c::%weak-pointer-value :ref-known (flushable) :init :arg) @@ -282,7 +282,7 @@ (flushable movable)) (define-primitive-object (symbol :lowtag other-pointer-lowtag - :header symbol-header-widetag + :widetag symbol-header-widetag #!-x86 :alloc-trans #!-x86 make-symbol) (value :set-trans %set-symbol-value :init :unbound) @@ -297,13 +297,13 @@ (define-primitive-object (complex-single-float :lowtag other-pointer-lowtag - :header complex-single-float-widetag) + :widetag complex-single-float-widetag) (real :c-type "float") (imag :c-type "float")) (define-primitive-object (complex-double-float :lowtag other-pointer-lowtag - :header complex-double-float-widetag) + :widetag complex-double-float-widetag) (filler) (real :c-type "double" :length 2) (imag :c-type "double" :length 2)) @@ -311,7 +311,7 @@ #!+long-float (define-primitive-object (complex-long-float :lowtag other-pointer-lowtag - :header complex-long-float-widetag) + :widetag complex-long-float-widetag) #!+sparc (filler) (real :c-type "long double" :length #!+x86 3 #!+sparc 4) (imag :c-type "long double" :length #!+x86 3 #!+sparc 4)) diff --git a/src/compiler/generic/target-core.lisp b/src/compiler/generic/target-core.lisp index df174f2..9ac3bee 100644 --- a/src/compiler/generic/target-core.lisp +++ b/src/compiler/generic/target-core.lisp @@ -83,7 +83,7 @@ (setf (code-header-ref code-obj sb!vm:code-trace-table-offset-slot) length) (copy-to-system-area trace-table - (* sb!vm:vector-data-offset sb!vm:word-bits) + (* sb!vm:vector-data-offset sb!vm:n-word-bits) fill-ptr 0 trace-table-bits) diff --git a/src/compiler/generic/vm-fndb.lisp b/src/compiler/generic/vm-fndb.lisp index 92cd6c4..526efd6 100644 --- a/src/compiler/generic/vm-fndb.lisp +++ b/src/compiler/generic/vm-fndb.lisp @@ -228,7 +228,7 @@ (foldable flushable movable)) (defknown %fixnum-digit-with-correct-sign (bignum-element-type) - (signed-byte #.sb!vm:word-bits) + (signed-byte #.sb!vm:n-word-bits) (foldable flushable movable)) (defknown (%ashl %ashr %digit-logical-shift-right) diff --git a/src/compiler/generic/vm-macs.lisp b/src/compiler/generic/vm-macs.lisp index dd5f2ea..58dc351 100644 --- a/src/compiler/generic/vm-macs.lisp +++ b/src/compiler/generic/vm-macs.lisp @@ -45,7 +45,7 @@ (def!struct (primitive-object (:make-load-form-fun just-dump-it-normally)) (name nil :type symbol) - (header nil :type symbol) + (widetag nil :type symbol) (lowtag nil :type symbol) (options nil :type list) (slots nil :type list) @@ -63,10 +63,10 @@ name)) (defmacro define-primitive-object - ((name &key header lowtag alloc-trans (type t)) + ((name &key lowtag widetag alloc-trans (type t)) &rest slot-specs) (collect ((slots) (exports) (constants) (forms) (inits)) - (let ((offset (if header 1 0)) + (let ((offset (if widetag 1 0)) (variable-length nil)) (dolist (spec slot-specs) (when variable-length @@ -110,13 +110,13 @@ (constants `(defconstant ,size ,offset)) (exports size))) (when alloc-trans - (forms `(def-alloc ,alloc-trans ,offset ,variable-length ,header + (forms `(def-alloc ,alloc-trans ,offset ,variable-length ,widetag ,lowtag ',(inits)))) `(progn (eval-when (:compile-toplevel :load-toplevel :execute) (%define-primitive-object ',(make-primitive-object :name name - :header header + :widetag widetag :lowtag lowtag :slots (slots) :size offset diff --git a/src/compiler/generic/vm-tran.lisp b/src/compiler/generic/vm-tran.lisp index 0d5849e..56fa01a 100644 --- a/src/compiler/generic/vm-tran.lisp +++ b/src/compiler/generic/vm-tran.lisp @@ -16,7 +16,7 @@ ;;; FIXME: Add a comment telling whether this holds for all vectors ;;; or only for vectors based on simple arrays (non-adjustable, etc.). (defconstant vector-data-bit-offset - (* sb!vm:vector-data-offset sb!vm:word-bits)) + (* sb!vm:vector-data-offset sb!vm:n-word-bits)) ;;; We need to define these predicates, since the TYPEP source ;;; transform picks whichever predicate was defined last when there @@ -153,7 +153,7 @@ #+nil (macrolet ((frob (type bits) - (let ((elements-per-word (truncate sb!vm:word-bits bits))) + (let ((elements-per-word (truncate sb!vm:n-word-bits bits))) `(progn (deftransform data-vector-ref ((vector index) (,type *)) @@ -161,7 +161,7 @@ (floor index ,',elements-per-word) (ldb ,(ecase sb!vm:target-byte-order (:little-endian '(byte ,bits (* bit ,bits))) - (:big-endian '(byte ,bits (- sb!vm:word-bits + (:big-endian '(byte ,bits (- sb!vm:n-word-bits (* (1+ bit) ,bits))))) (%raw-bits vector (+ word sb!vm:vector-data-offset))))) (deftransform data-vector-set ((vector index new-value) @@ -171,7 +171,7 @@ (setf (ldb ,(ecase sb!vm:target-byte-order (:little-endian '(byte ,bits (* bit ,bits))) (:big-endian - '(byte ,bits (- sb!vm:word-bits + '(byte ,bits (- sb!vm:n-word-bits (* (1+ bit) ,bits))))) (%raw-bits vector (+ word sb!vm:vector-data-offset))) new-value))))))) @@ -212,8 +212,8 @@ (end (+ sb!vm:vector-data-offset (truncate (the index (+ (length bit-array-1) - sb!vm:word-bits -1)) - sb!vm:word-bits)))) + sb!vm:n-word-bits -1)) + sb!vm:n-word-bits)))) ((= index end) result-bit-array) (declare (optimize (speed 3) (safety 0)) (type index index end)) @@ -236,8 +236,8 @@ (end (+ sb!vm:vector-data-offset (truncate (the index (+ (length bit-array) - (1- sb!vm:word-bits))) - sb!vm:word-bits)))) + (1- sb!vm:n-word-bits))) + sb!vm:n-word-bits)))) ((= index end) result-bit-array) (declare (optimize (speed 3) (safety 0)) (type index index end)) diff --git a/src/compiler/generic/vm-type.lisp b/src/compiler/generic/vm-type.lisp index 338d0d2..091475c 100644 --- a/src/compiler/generic/vm-type.lisp +++ b/src/compiler/generic/vm-type.lisp @@ -20,7 +20,7 @@ ;;;; FIXME: I'm not sure where to put this. -- WHN 19990817 -(deftype sb!vm:word () `(unsigned-byte ,sb!vm:word-bits)) +(deftype sb!vm:word () `(unsigned-byte ,sb!vm:n-word-bits)) ;;;; implementation-dependent DEFTYPEs @@ -72,7 +72,7 @@ ;;; internal time format. (Note: not a FIXNUM, ouch..) (sb!xc:deftype internal-time () 'unsigned-byte) -(sb!xc:deftype bignum-element-type () `(unsigned-byte ,sb!vm:word-bits)) +(sb!xc:deftype bignum-element-type () `(unsigned-byte ,sb!vm:n-word-bits)) (sb!xc:deftype bignum-type () 'bignum) (sb!xc:deftype bignum-index () 'index) diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp index c736fe1..6eada1a 100644 --- a/src/compiler/srctran.lisp +++ b/src/compiler/srctran.lisp @@ -2355,7 +2355,7 @@ (if (and (numeric-type-p size) (csubtypep size (specifier-type 'integer))) (let ((size-high (numeric-type-high size))) - (if (and size-high (<= size-high sb!vm:word-bits)) + (if (and size-high (<= size-high sb!vm:n-word-bits)) (specifier-type `(unsigned-byte ,size-high)) (specifier-type 'unsigned-byte))) *universal-type*))) @@ -2370,7 +2370,7 @@ (let ((size-high (numeric-type-high size)) (posn-high (numeric-type-high posn))) (if (and size-high posn-high - (<= (+ size-high posn-high) sb!vm:word-bits)) + (<= (+ size-high posn-high) sb!vm:n-word-bits)) (specifier-type `(unsigned-byte ,(+ size-high posn-high))) (specifier-type 'unsigned-byte))) *universal-type*))) @@ -2390,7 +2390,7 @@ (high (numeric-type-high int)) (low (numeric-type-low int))) (if (and size-high posn-high high low - (<= (+ size-high posn-high) sb!vm:word-bits)) + (<= (+ size-high posn-high) sb!vm:n-word-bits)) (specifier-type (list (if (minusp low) 'signed-byte 'unsigned-byte) (max (integer-length high) @@ -2414,7 +2414,7 @@ (high (numeric-type-high int)) (low (numeric-type-low int))) (if (and size-high posn-high high low - (<= (+ size-high posn-high) sb!vm:word-bits)) + (<= (+ size-high posn-high) sb!vm:n-word-bits)) (specifier-type (list (if (minusp low) 'signed-byte 'unsigned-byte) (max (integer-length high) @@ -2425,19 +2425,19 @@ (deftransform %ldb ((size posn int) (fixnum fixnum integer) - (unsigned-byte #.sb!vm:word-bits)) + (unsigned-byte #.sb!vm:n-word-bits)) "convert to inline logical operations" `(logand (ash int (- posn)) - (ash ,(1- (ash 1 sb!vm:word-bits)) - (- size ,sb!vm:word-bits)))) + (ash ,(1- (ash 1 sb!vm:n-word-bits)) + (- size ,sb!vm:n-word-bits)))) (deftransform %mask-field ((size posn int) (fixnum fixnum integer) - (unsigned-byte #.sb!vm:word-bits)) + (unsigned-byte #.sb!vm:n-word-bits)) "convert to inline logical operations" `(logand int - (ash (ash ,(1- (ash 1 sb!vm:word-bits)) - (- size ,sb!vm:word-bits)) + (ash (ash ,(1- (ash 1 sb!vm:n-word-bits)) + (- size ,sb!vm:n-word-bits)) posn))) ;;; Note: for %DPB and %DEPOSIT-FIELD, we can't use @@ -2448,7 +2448,7 @@ (deftransform %dpb ((new size posn int) * - (unsigned-byte #.sb!vm:word-bits)) + (unsigned-byte #.sb!vm:n-word-bits)) "convert to inline logical operations" `(let ((mask (ldb (byte size 0) -1))) (logior (ash (logand new mask) posn) @@ -2456,7 +2456,7 @@ (deftransform %dpb ((new size posn int) * - (signed-byte #.sb!vm:word-bits)) + (signed-byte #.sb!vm:n-word-bits)) "convert to inline logical operations" `(let ((mask (ldb (byte size 0) -1))) (logior (ash (logand new mask) posn) @@ -2464,7 +2464,7 @@ (deftransform %deposit-field ((new size posn int) * - (unsigned-byte #.sb!vm:word-bits)) + (unsigned-byte #.sb!vm:n-word-bits)) "convert to inline logical operations" `(let ((mask (ash (ldb (byte size 0) -1) posn))) (logior (logand new mask) @@ -2472,7 +2472,7 @@ (deftransform %deposit-field ((new size posn int) * - (signed-byte #.sb!vm:word-bits)) + (signed-byte #.sb!vm:n-word-bits)) "convert to inline logical operations" `(let ((mask (ash (ldb (byte size 0) -1) posn))) (logior (logand new mask) diff --git a/src/compiler/target-disassem.lisp b/src/compiler/target-disassem.lisp index 1b38c05..3b0a14a 100644 --- a/src/compiler/target-disassem.lisp +++ b/src/compiler/target-disassem.lisp @@ -817,7 +817,7 @@ (+ (ash word sb!vm:byte-bits) byte) (+ word (ash byte bit-shift)))) (incf bit-shift sb!vm:byte-bits))) - (format stream "#X~V,'0X" (ash sb!vm:word-bits -2) word))))) + (format stream "#X~V,'0X" (ash sb!vm:n-word-bits -2) word))))) (defvar *default-dstate-hooks* (list #'lra-hook)) diff --git a/src/compiler/x86/array.lisp b/src/compiler/x86/array.lisp index b940fc6..a8e101c 100644 --- a/src/compiler/x86/array.lisp +++ b/src/compiler/x86/array.lisp @@ -121,7 +121,7 @@ ;;;; bit, 2-bit, and 4-bit vectors (macrolet ((def-small-data-vector-frobs (type bits) - (let* ((elements-per-word (floor sb!vm:word-bits bits)) + (let* ((elements-per-word (floor sb!vm:n-word-bits bits)) (bit-shift (1- (integer-length elements-per-word)))) `(progn (define-vop (,(symbolicate 'data-vector-ref/ type)) diff --git a/src/compiler/x86/insts.lisp b/src/compiler/x86/insts.lisp index d9dca7c..f93d920 100644 --- a/src/compiler/x86/insts.lisp +++ b/src/compiler/x86/insts.lisp @@ -1787,7 +1787,7 @@ (values 0 (1+ length) nil nil)) (t (sb!kernel:copy-from-system-area sap (* byte-bits (1+ offset)) - vector (* word-bits + vector (* n-word-bits vector-data-offset) (* length byte-bits)) (collect ((sc-offsets) diff --git a/src/compiler/x86/parms.lisp b/src/compiler/x86/parms.lisp index 39f40e5..37f44d5 100644 --- a/src/compiler/x86/parms.lisp +++ b/src/compiler/x86/parms.lisp @@ -24,7 +24,7 @@ ;;;; machine architecture parameters -(defconstant word-bits 32 +(defconstant n-word-bits 32 #!+sb-doc "Number of bits per word where a word holds one lisp descriptor.") @@ -32,11 +32,11 @@ #!+sb-doc "Number of bits per byte where a byte is the smallest addressable object.") -(defconstant word-shift (1- (integer-length (/ word-bits byte-bits))) +(defconstant word-shift (1- (integer-length (/ n-word-bits byte-bits))) #!+sb-doc "Number of bits to shift between word addresses and byte addresses.") -(defconstant word-bytes (/ word-bits byte-bits) +(defconstant word-bytes (/ n-word-bits byte-bits) #!+sb-doc "Number of bytes in a word.") @@ -77,10 +77,10 @@ (+ (byte-size single-float-significand-byte) 1)) (defconstant double-float-digits - (+ (byte-size double-float-significand-byte) word-bits 1)) + (+ (byte-size double-float-significand-byte) n-word-bits 1)) (defconstant long-float-digits - (+ (byte-size long-float-significand-byte) word-bits 1)) + (+ (byte-size long-float-significand-byte) n-word-bits 1)) ;;; pfw -- from i486 microprocessor programmer's reference manual (defconstant float-invalid-trap-bit (ash 1 0)) diff --git a/version.lisp-expr b/version.lisp-expr index c3fe221..bb3ec26 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; for internal versions, especially for internal versions off the ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.pre7.58" +"0.pre7.59" -- 1.7.10.4