]> git.eshelyaron.com Git - emacs.git/commit
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)
committerEshel Yaron <me@eshelyaron.com>
Mon, 22 Jan 2024 16:54:36 +0000 (17:54 +0100)
commit042b41339aa3d3aae2c69bfb2b48ba665afcc863
tree8a18d439464c7005855530780a52aca53fa54d3a
parent4eb81217cdf23e3f228ef3d95e7b5a0ceb95007c
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.

(cherry picked from commit 50201e03b9c4133296dbd10e6c7ebd5dc2a62d50)
src/fns.c