* fixed some bugs revealed by Paul Dietz' test suite:
** interval arithmetic during type derivation used inexact integer
to single-float coercions.
- ** artihmetic operations involving large integers and single
+ ** arithmetic operations involving large integers and single
floats give the same results in compiled and interpreted code.
** deriving the result type of COERCE no longer signals an error
if the derived type of the second argument is a MEMBER type
"BIT-VECTOR-="
"READ-EVALUATED-FORM"
"MAKE-UNPRINTABLE-OBJECT"
+ "POWER-OF-TWO-CEILING"
;; ..and macros..
"COLLECT"
(%shrink-vector string size)
string)))
,@body))))
+
+;;; The smallest power of two that is equal to or greater than X.
+(defun power-of-two-ceiling (x)
+ (declare (index x))
+ (ash 1 (integer-length (1- x))))
(t
(eq-hash key))))
-(defun ceil-power-of-two (num)
- (declare (type index num))
- (ash 1 (integer-length num)))
-
(declaim (inline index-for-hashing))
(defun index-for-hashing (hash length)
(declare (type hash hash length))
;; Note that this has not yet been audited for
;; correctness. It just seems to work. -- CSR, 2002-11-02
(scaled-size (truncate (/ (float size+1) rehash-threshold)))
- (length (ceil-power-of-two (max scaled-size
- (1+ +min-hash-table-size+))))
+ (length (power-of-two-ceiling (max scaled-size
+ (1+ +min-hash-table-size+))))
(index-vector (make-array length
:element-type
'(unsigned-byte #.sb!vm:n-word-bits)
(old-hash-vector (hash-table-hash-vector table))
(old-size (length old-next-vector))
(new-size
- (ceil-power-of-two
+ (power-of-two-ceiling
(let ((rehash-size (hash-table-rehash-size table)))
(etypecase rehash-size
(fixnum
;; bits at the low end.
(logand (1- vector-length) (- line-size)))
-;;; The smallest power of two that is equal to or greater then X.
-(declaim (inline power-of-two-ceiling))
-(defun power-of-two-ceiling (x)
- (ash 1 (integer-length (1- x))))
-
(defun cache-statistics (cache)
(let* ((vector (cache-vector cache))
(size (length vector))
;;; 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.18.6"
+"1.0.18.7"