[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/byte-switch 2d10d4a: src/bytecode.c (exec_byte_cod
From: |
Vibhav Pant |
Subject: |
[Emacs-diffs] feature/byte-switch 2d10d4a: src/bytecode.c (exec_byte_code): Remove unneeded assert. |
Date: |
Thu, 9 Feb 2017 11:27:18 -0500 (EST) |
branch: feature/byte-switch
commit 2d10d4ad1a24727b9c1db6664bc8f92eaa3fd4c8
Author: Vibhav Pant <address@hidden>
Commit: Vibhav Pant <address@hidden>
src/bytecode.c (exec_byte_code): Remove unneeded assert.
---
src/bytecode.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/bytecode.c b/src/bytecode.c
index 299c651..ed1eb17 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1426,12 +1426,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector,
Lisp_Object maxdepth,
ptrdiff_t i;
struct Lisp_Hash_Table *h = XHASH_TABLE(jmp_table);
-#ifdef BYTE_CODE_SAFE
- /* Hash tables for switch are declared with :size set to exact
- number of cases, so this should always be true. */
- eassert (HASH_TABLE_SIZE (h) == h->count);
-#endif
-
if (h->count <= 5)
{ /* Do a linear search if there are not many cases
FIXME: 5 is arbitrarily chosen. */
@@ -1440,6 +1434,10 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector,
Lisp_Object maxdepth,
#ifdef BYTE_CODE_SAFE
eassert (!NILP (HASH_HASH (h, i)));
#endif
+ /* Hash tables for switch are declared with :size set to
the
+ exact number of cases, thus
+ HASH_TABLE_SIZE (h) == h->count. */
+
if ((EQ (v1, HASH_KEY (h, i)) ||
(h->test.cmpfn &&
h->test.cmpfn (&h->test, v1, HASH_KEY (h, i)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] feature/byte-switch 2d10d4a: src/bytecode.c (exec_byte_code): Remove unneeded assert.,
Vibhav Pant <=