diff options
| author | Vibhav Pant | 2017-02-09 21:56:57 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2017-02-09 21:56:57 +0530 |
| commit | 2d10d4ad1a24727b9c1db6664bc8f92eaa3fd4c8 (patch) | |
| tree | db0c686868669287b0719e617cc29460feef26fa /src/bytecode.c | |
| parent | 13eabbd80b121d0b86de55321bd5dda5d99fb857 (diff) | |
| download | emacs-2d10d4ad1a24727b9c1db6664bc8f92eaa3fd4c8.tar.gz emacs-2d10d4ad1a24727b9c1db6664bc8f92eaa3fd4c8.zip | |
src/bytecode.c (exec_byte_code): Remove unneeded assert.
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 299c651b90e..ed1eb178468 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, | |||
| 1426 | ptrdiff_t i; | 1426 | ptrdiff_t i; |
| 1427 | struct Lisp_Hash_Table *h = XHASH_TABLE(jmp_table); | 1427 | struct Lisp_Hash_Table *h = XHASH_TABLE(jmp_table); |
| 1428 | 1428 | ||
| 1429 | #ifdef BYTE_CODE_SAFE | ||
| 1430 | /* Hash tables for switch are declared with :size set to exact | ||
| 1431 | number of cases, so this should always be true. */ | ||
| 1432 | eassert (HASH_TABLE_SIZE (h) == h->count); | ||
| 1433 | #endif | ||
| 1434 | |||
| 1435 | if (h->count <= 5) | 1429 | if (h->count <= 5) |
| 1436 | { /* Do a linear search if there are not many cases | 1430 | { /* Do a linear search if there are not many cases |
| 1437 | FIXME: 5 is arbitrarily chosen. */ | 1431 | FIXME: 5 is arbitrarily chosen. */ |
| @@ -1440,6 +1434,10 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1440 | #ifdef BYTE_CODE_SAFE | 1434 | #ifdef BYTE_CODE_SAFE |
| 1441 | eassert (!NILP (HASH_HASH (h, i))); | 1435 | eassert (!NILP (HASH_HASH (h, i))); |
| 1442 | #endif | 1436 | #endif |
| 1437 | /* Hash tables for switch are declared with :size set to the | ||
| 1438 | exact number of cases, thus | ||
| 1439 | HASH_TABLE_SIZE (h) == h->count. */ | ||
| 1440 | |||
| 1443 | if ((EQ (v1, HASH_KEY (h, i)) || | 1441 | if ((EQ (v1, HASH_KEY (h, i)) || |
| 1444 | (h->test.cmpfn && | 1442 | (h->test.cmpfn && |
| 1445 | h->test.cmpfn (&h->test, v1, HASH_KEY (h, i))))) | 1443 | h->test.cmpfn (&h->test, v1, HASH_KEY (h, i))))) |