diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-06-20 06:23:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-06-20 06:23:11 -0700 |
commit | 96ea20112aee6ba8d4b5aa5d6a8a0d6b5d3dd2e0 (patch) | |
tree | 57b11dfcde971e620b5376ebab80d9160893f3cf /tests/012/parse.tl | |
parent | 96f428d5e3f77c21ba625fdbe3ca1fd3afda1755 (diff) | |
download | txr-96ea20112aee6ba8d4b5aa5d6a8a0d6b5d3dd2e0.tar.gz txr-96ea20112aee6ba8d4b5aa5d6a8a0d6b5d3dd2e0.tar.bz2 txr-96ea20112aee6ba8d4b5aa5d6a8a0d6b5d3dd2e0.zip |
hash: experimental switch to open addressing.
* hash.h (struct hash_iter): chain and cons members removed;
index member added.
* hash.c (struct hash_ops): acons_new_c_fun member removed.
(hash_ops_init): Reduced to three arguments.
(hash_grow): Function removed.
(hash_find_slot, hash_lookup, hash_grow, hash_insert,
hash_remove): New static functions.
(hash_mark): Iterate the simple open table, which directly
contains pointers to the hash entry cons cells, rather
than lists of these.
(hash_acons_new_c, hash_aconsql_new_c, hash_aconsq_new_c):
Static functions removed.
(hash_eq_ops, hash_eql_ops, hash_equal_ops): Initializer
macro calls reduced to three arguments.
(copy_hash_chain): Function removed.
(copy_hash): copy_hash_chain logic altered to duplicate
the hash cells like copy_hash_chain did.
(gethash_c, gethash_e, remhash): Retargeted to the new
static functions that do open addressing with linear
probing.
(hash_iter_mark): No cons member to mark any more.
(hash_iter_init, us_hash_iter_init): Initialization updated
to new representation.
(hash_iter_next_impl, hash_iter_peek): Rewritten to traverse simple table.
Loses second argument.
(hash_iter_next, hash_next): Don't pass second argument
to hash_iter_next_impl.
(do_weak_tables): Adjusted to walk open table.
Diffstat (limited to 'tests/012/parse.tl')
0 files changed, 0 insertions, 0 deletions