1.0.25.8: fix sxhash bug
[sbcl.git] / src / code / target-package.lisp
index 9c10525..4fa7582 100644 (file)
@@ -469,10 +469,10 @@ error if any of PACKAGES is not a valid package designator."
     `(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
@@ -503,7 +503,8 @@ error if any of PACKAGES is not a valid package designator."
   (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)
@@ -763,7 +764,7 @@ implementation it is ~S." *default-package-use-list*)
            (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
@@ -802,7 +803,8 @@ implementation it is ~S." *default-package-use-list*)
   (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))))