diff options
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/lisp.h b/src/lisp.h index 6e0252621a6..027fd07d720 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1980,13 +1980,12 @@ struct Lisp_Hash_Table /* Vector used to chain entries. If entry I is free, next[I] is the entry number of the next free item. If entry I is non-free, - next[I] is the index of the next entry in the collision chain. */ + next[I] is the index of the next entry in the collision chain, + or -1 if there is such entry. */ Lisp_Object next; - /* Index of first free entry in free list. */ - Lisp_Object next_free; - - /* Bucket vector. A non-nil entry is the index of the first item in + /* Bucket vector. An entry of -1 indicates no item is present, + and a nonnegative entry is the index of the first item in a collision chain. This vector's size can be larger than the hash table size to reduce collisions. */ Lisp_Object index; @@ -1998,6 +1997,9 @@ struct Lisp_Hash_Table /* Number of key/value entries in the table. */ ptrdiff_t count; + /* Index of first free entry in free list, or -1 if none. */ + ptrdiff_t next_free; + /* True if the table can be purecopied. The table cannot be changed afterwards. */ bool pure; @@ -2050,14 +2052,6 @@ HASH_VALUE (struct Lisp_Hash_Table *h, ptrdiff_t idx) return AREF (h->key_and_value, 2 * idx + 1); } -/* Value is the index of the next entry following the one at IDX - in hash table H. */ -INLINE Lisp_Object -HASH_NEXT (struct Lisp_Hash_Table *h, ptrdiff_t idx) -{ - return AREF (h->next, idx); -} - /* Value is the hash code computed for entry IDX in hash table H. */ INLINE Lisp_Object HASH_HASH (struct Lisp_Hash_Table *h, ptrdiff_t idx) @@ -2065,14 +2059,6 @@ HASH_HASH (struct Lisp_Hash_Table *h, ptrdiff_t idx) return AREF (h->hash, idx); } -/* Value is the index of the element in hash table H that is the - start of the collision list at index IDX in the index vector of H. */ -INLINE Lisp_Object -HASH_INDEX (struct Lisp_Hash_Table *h, ptrdiff_t idx) -{ - return AREF (h->index, idx); -} - /* Value is the size of hash table H. */ INLINE ptrdiff_t HASH_TABLE_SIZE (struct Lisp_Hash_Table *h) |