From: Juho Snellman Date: Fri, 13 Apr 2007 22:37:36 +0000 (+0000) Subject: 1.0.4.83: fix SXHASH for bignums X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=23559db8775ce827e00803a7dcca0a0840773a98;p=sbcl.git 1.0.4.83: fix SXHASH for bignums * (logAND x (ash x -7)) doesn't give a very good hash... * Reported by Faré Rideau on #lisp --- diff --git a/NEWS b/NEWS index ddd86f9..73d1b01 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,8 @@ changes in sbcl-1.0.5 relative to sbcl-1.0.4: * bug fix: an &environment argument with the correct variable information is passed to macros that are expanded during byte compilation (reported by Samium Gromoff) + * bug fix: a logical error was causing the hash function for bignums to + have excessive amounts of collisions (reported by Faré Rideau) * improvement: the x86-64/darwin port now passes all tests and should be considered non-experimental. * improvement: a style-warning is signaled for CASE (etc) clauses with diff --git a/src/code/bignum.lisp b/src/code/bignum.lisp index 819ef3a..901cf04 100644 --- a/src/code/bignum.lisp +++ b/src/code/bignum.lisp @@ -1929,6 +1929,6 @@ (let ((xi (%bignum-ref x i))) (mixf result (logand most-positive-fixnum - xi - (ash xi -7))))) + (logxor xi + (ash xi -7)))))) result)) diff --git a/src/code/early-fasl.lisp b/src/code/early-fasl.lisp index de3ffd1..243915e 100644 --- a/src/code/early-fasl.lisp +++ b/src/code/early-fasl.lisp @@ -76,7 +76,7 @@ ;;; versions which break binary compatibility. But it certainly should ;;; be incremented for release versions which break binary ;;; compatibility. -(def!constant +fasl-file-version+ 72) +(def!constant +fasl-file-version+ 73) ;;; (description of versions before 0.9.0.1 deleted in 0.9.17) ;;; 56: (2005-05-22) Something between 0.9.0.1 and 0.9.0.14. My money is ;;; on 0.9.0.6 (MORE CASE CONSISTENCY). @@ -102,6 +102,7 @@ ;;; 70: (2006-09-13) changes to *PSEUDO-ATOMIC* on x86 and x86-64 ;;; 71: (2006-11-19) CLOS calling convention changes ;;; 72: (2006-12-05) Added slot to the primitive function type +;;; 73: (2007-04-13) Changed a hash function ;;; the conventional file extension for our fasl files (declaim (type simple-string *fasl-file-type*)) diff --git a/version.lisp-expr b/version.lisp-expr index 806d71a..1136f4f 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.4.82" +"1.0.4.83"