Make better use of fixnum range in sxhash etc
authorMattias Engdegård <mattiase@acm.org>
Fri, 19 Jan 2024 15:45:51 +0000 (16:45 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sun, 21 Jan 2024 10:21:51 +0000 (11:21 +0100)
commit50201e03b9c4133296dbd10e6c7ebd5dc2a62d50
tree7a703926319f43833c026652c8e669f08eb916a3
parent7a87ca09a73d61b46bfcaca317095ce7545bd3f3
Make better use of fixnum range in sxhash etc

Recent hash table changes reduced the range of sxhash, sxhash-eq etc
to [0,2**32) on platforms with 62-bit fixnums.  This change makes them
use the full fixnum range again.  Hash table hashing is unaffected.

* src/fns.c (sxhash_eq, sxhash_eql): New.
(hash_hash_to_fixnum): Replace with...
(reduce_emacs_uint_to_fixnum): ...this.
(hashfn_eq, hashfn_eql, Fsxhash_eq, Fsxhash_eql, Fsxhash_equal)
(Fsxhash_equal_including_properties): Use the new functions.
src/fns.c