aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorVibhav Pant2017-02-09 18:43:31 +0530
committerVibhav Pant2017-02-09 18:43:31 +0530
commit3189f954ebdf739831a40e1b336505da60ea66c6 (patch)
tree0c4d55a8976b40371dee69d55e5ee66fec1b0086 /src/bytecode.c
parentdde800c8c9ea198996229d03df1fc45c7d057339 (diff)
downloademacs-3189f954ebdf739831a40e1b336505da60ea66c6.tar.gz
emacs-3189f954ebdf739831a40e1b336505da60ea66c6.zip
bytecode.c (exec_byte_code): don't check hash code in linear search.
* src/bytecode.c (exec_byte_code): Don't check that the hash code is not nil when linear scanning the jump table. Hash tables for are declared with :size as the exact number of cases, so each entry i should have a hash code. When BYTE_CODE_SAFE, do it as a sanity check.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 9bb7bd4e685..fb10a6d6914 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1430,8 +1430,10 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
1430 FIXME: 5 is arbitrarily chosen. */ 1430 FIXME: 5 is arbitrarily chosen. */
1431 for (i = 0; i < HASH_TABLE_SIZE (h); i++) 1431 for (i = 0; i < HASH_TABLE_SIZE (h); i++)
1432 { 1432 {
1433 if (!NILP (HASH_HASH (h, i)) && 1433#ifdef BYTE_CODE_SAFE
1434 (EQ (v1, HASH_KEY (h, i)) || 1434 eassert (!NILP (HASH_HASH (h, i)));
1435#endif
1436 if ((EQ (v1, HASH_KEY (h, i)) ||
1435 (h->test.cmpfn && 1437 (h->test.cmpfn &&
1436 h->test.cmpfn (&h->test, v1, HASH_KEY (h, i))))) 1438 h->test.cmpfn (&h->test, v1, HASH_KEY (h, i)))))
1437 { 1439 {