]> git.eshelyaron.com Git - emacs.git/commit
Avoid overexposing fixnums for hash codes
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 Jul 2019 04:27:33 +0000 (21:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 Jul 2019 04:28:18 +0000 (21:28 -0700)
commitf378ed1a0b1ca2ceed5afabcf5f303ae339039ba
tree767e994477690e2681cb7fe027af7d708efd6cc6
parent97477edaf2044e51696f46b166b43801893156a3
Avoid overexposing fixnums for hash codes

Following a suggestion by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00530.html
* doc/lispref/hash.texi (Creating Hash, Defining Hash):
* src/fns.c (Fsxhash_eq, Fsxhash_eql, Fsxhash_equal, Fmake_hash_table):
Don’t insist that hash codes be fixnums, reverting
the recent doc changes to the contrary.
* src/bytecode.c (exec_byte_code): Special-case only the eq case,
as the others aren’t worth tuning now that we treat bignum hashes
like fixnums.
* src/fns.c (hashfn_user_defined): If the hash code is a bignum,
reduce its hash down to a fixnum.
doc/lispref/hash.texi
src/bytecode.c
src/fns.c