"STRUCTURE-INITARG-NOT-KEYWORD" "CONSTANT-MODIFIED"
;; ..and DEFTYPEs..
+ "MAX-HASH" "HASH"
"INDEX" "LOAD/STORE-INDEX"
"SIGNED-BYTE-WITH-A-BITE-OUT"
"UNSIGNED-BYTE-WITH-A-BITE-OUT"
;;; something not EQ to anything we might legitimately READ
(defparameter *eof-object* (make-symbol "EOF-OBJECT"))
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (defconstant max-hash sb!xc:most-positive-fixnum))
+
+(def!type hash ()
+ `(integer 0 ,max-hash))
+
;;; a type used for indexing into arrays, and for related quantities
;;; like lengths of lists
;;;
`(let* ((,vec (package-hashtable-table ,table))
(,hash (package-hashtable-hash ,table))
(,len (length ,vec))
- (,h2 (1+ (the index (rem (the index ,sxhash)
+ (,h2 (1+ (the index (rem (the hash ,sxhash)
(the index (- ,len 2)))))))
(declare (type index ,len ,h2))
- (prog ((,index-var (rem (the index ,sxhash) ,len))
+ (prog ((,index-var (rem (the hash ,sxhash) ,len))
,symbol-var ,ehash)
(declare (type (or index null) ,index-var))
LOOP
(let* ((length (length string))
(hash (%sxhash-simple-string string))
(ehash (entry-hash length hash)))
- (declare (type index length hash))
+ (declare (type index length)
+ (type hash hash))
(with-symbol (index symbol table string length hash ehash)
(setf (aref (package-hashtable-hash table) index) 1)
(setf (aref (package-hashtable-table table) index) nil)
(type index length))
(let* ((hash (%sxhash-simple-substring string length))
(ehash (entry-hash length hash)))
- (declare (type index hash ehash))
+ (declare (type hash hash ehash))
(with-symbol (found symbol (package-internal-symbols package)
string length hash ehash)
(when found
(let* ((length (length string))
(hash (%sxhash-simple-string string))
(ehash (entry-hash length hash)))
- (declare (type index length hash))
+ (declare (type index length)
+ (type hash hash))
(with-symbol (found symbol (package-external-symbols package)
string length hash ehash)
(values symbol found))))
(in-package "SB!IMPL")
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (defconstant max-hash sb!xc:most-positive-fixnum))
-
-(deftype hash ()
- `(integer 0 ,max-hash))
-
(defun pointer-hash (key)
(pointer-hash key))
;;;; the SXHASH function
;; simple cases
-(declaim (ftype (sfunction (integer) (integer 0 #.sb!xc:most-positive-fixnum))
- sxhash-bignum))
-(declaim (ftype (sfunction (t) (integer 0 #.sb!xc:most-positive-fixnum))
- sxhash-instance))
+(declaim (ftype (sfunction (integer) hash) sxhash-bignum))
+(declaim (ftype (sfunction (t) hash) sxhash-instance))
(defun sxhash (x)
;; profiling SXHASH is hard, but we might as well try to make it go
(foldable flushable))
(defknown hash-table-size (hash-table) index (flushable))
(defknown hash-table-test (hash-table) symbol (foldable flushable))
-(defknown sxhash (t) (integer 0 #.sb!xc:most-positive-fixnum)
- (#-sb-xc-host foldable flushable))
-(defknown psxhash (t &optional t) (integer 0 #.sb!xc:most-positive-fixnum)
- (#-sb-xc-host foldable flushable))
+(defknown sxhash (t) hash (#-sb-xc-host foldable flushable))
+(defknown psxhash (t &optional t) hash (#-sb-xc-host foldable flushable))
\f
;;;; from the "Arrays" chapter
(or index null)
(foldable flushable))
-(defknown %sxhash-simple-string (simple-string) index
+(defknown %sxhash-simple-string (simple-string) hash
(foldable flushable))
-(defknown %sxhash-simple-substring (simple-string index) index
+(defknown %sxhash-simple-substring (simple-string index) hash
(foldable flushable))
-(defknown symbol-hash (symbol) (integer 0 #.sb!xc:most-positive-fixnum)
+(defknown symbol-hash (symbol) hash
(flushable movable))
-(defknown %set-symbol-hash (symbol (integer 0 #.sb!xc:most-positive-fixnum))
+(defknown %set-symbol-hash (symbol hash)
t (unsafe))
(defknown vector-length (vector) index (flushable))
;;; 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.25.7"
+"1.0.25.8"