Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Data Structures | |
struct | st_table_entry |
struct | st_features |
Macros | |
#define | PREFETCH(addr, write_p) |
#define | EXPECT(expr, val) (expr) |
#define | ATTRIBUTE_UNUSED |
#define | st_assert(cond) ((void)(0 && (cond))) |
#define | type_numhash st_hashtype_num |
#define | ST_INIT_VAL 0xafafafafafafafaf |
#define | ST_INIT_VAL_BYTE 0xafa |
#define | malloc ruby_xmalloc |
#define | calloc ruby_xcalloc |
#define | realloc ruby_xrealloc |
#define | free ruby_xfree |
#define | EQUAL(tab, x, y) ((x) == (y) || (*(tab)->type->compare)((x),(y)) == 0) |
#define | PTR_EQUAL(tab, ptr, hash_val, key) ((ptr)->hash == (hash_val) && EQUAL((tab), (key), (ptr)->key)) |
#define | MAX_POWER2 30 |
#define | RESERVED_HASH_VAL (~(st_hash_t) 0) |
#define | RESERVED_HASH_SUBSTITUTION_VAL ((st_hash_t) 0) |
#define | MINIMAL_POWER2 2 |
#define | MAX_POWER2_FOR_TABLES_WITHOUT_BINS 4 |
#define | EMPTY_BIN 0 |
#define | DELETED_BIN 1 |
#define | ENTRY_BASE 2 |
#define | MARK_BIN_EMPTY(tab, i) (set_bin((tab)->bins, get_size_ind(tab), i, EMPTY_BIN)) |
#define | UNDEFINED_ENTRY_IND (~(st_index_t) 0) |
#define | UNDEFINED_BIN_IND (~(st_index_t) 0) |
#define | MARK_BIN_DELETED(tab, i) |
#define | EMPTY_BIN_P(b) ((b) == EMPTY_BIN) |
#define | DELETED_BIN_P(b) ((b) == DELETED_BIN) |
#define | EMPTY_OR_DELETED_BIN_P(b) ((b) <= DELETED_BIN) |
#define | IND_EMPTY_BIN_P(tab, i) (EMPTY_BIN_P(get_bin((tab)->bins, get_size_ind(tab), i))) |
#define | IND_DELETED_BIN_P(tab, i) (DELETED_BIN_P(get_bin((tab)->bins, get_size_ind(tab), i))) |
#define | IND_EMPTY_OR_DELETED_BIN_P(tab, i) (EMPTY_OR_DELETED_BIN_P(get_bin((tab)->bins, get_size_ind(tab), i))) |
#define | MARK_ENTRY_DELETED(e_ptr) ((e_ptr)->hash = RESERVED_HASH_VAL) |
#define | DELETED_ENTRY_P(e_ptr) ((e_ptr)->hash == RESERVED_HASH_VAL) |
#define | COLLISION |
#define | FOUND_BIN |
#define | REBUILD_THRESHOLD 4 |
#define | FNV1_32A_INIT 0x811c9dc5 |
#define | FNV_32_PRIME 0x01000193 |
#define | BIG_CONSTANT(x, y) ((st_index_t)(x)<<32|(st_index_t)(y)) |
#define | ROTL(x, n) ((x)<<(n)|(x)>>(SIZEOF_ST_INDEX_T*CHAR_BIT-(n))) |
#define | C1 (st_index_t)0xcc9e2d51 |
#define | C2 (st_index_t)0x1b873593 |
#define | r1 (17) |
#define | r2 (11) |
#define | r1 (16) |
#define | r2 (13) |
#define | r3 (16) |
#define | data_at(n) (st_index_t)((unsigned char)data[(n)]) |
#define | UNALIGNED_ADD_4 UNALIGNED_ADD(2); UNALIGNED_ADD(1); UNALIGNED_ADD(0) |
#define | UNALIGNED_ADD_ALL UNALIGNED_ADD_4 |
#define | UNALIGNED_ADD(n) |
#define | UNALIGNED_ADD(n) |
#define | SKIP_TAIL 1 |
#define | UNALIGNED_ADD(n) |
Typedefs | |
typedef st_index_t | st_hash_t |
Variables | |
const struct st_hash_type | st_hashtype_num |
static const struct st_hash_type | type_strhash |
static const struct st_hash_type | type_strcasehash |
static const struct st_features | features [] |
#define BIG_CONSTANT | ( | x, | |
y | |||
) | ((st_index_t)(x)<<32|(st_index_t)(y)) |
Definition at line 1635 of file st.c.
Referenced by murmur_finish().
#define C1 (st_index_t)0xcc9e2d51 |
Definition at line 1639 of file st.c.
Referenced by murmur_step().
#define C2 (st_index_t)0x1b873593 |
Definition at line 1640 of file st.c.
Referenced by murmur_step(), and st_hash().
#define calloc ruby_xcalloc |
#define COLLISION |
Definition at line 714 of file st.c.
Referenced by find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), and find_table_entry_ind().
#define data_at | ( | n | ) | (st_index_t)((unsigned char)data[(n)]) |
Referenced by st_hash().
#define DELETED_BIN_P | ( | b | ) | ((b) == DELETED_BIN) |
Definition at line 396 of file st.c.
Referenced by find_table_bin_ptr_and_reserve().
#define DELETED_ENTRY_P | ( | e_ptr | ) | ((e_ptr)->hash == RESERVED_HASH_VAL) |
Definition at line 408 of file st.c.
Referenced by make_tab_empty(), rebuild_table(), st_general_foreach(), st_general_keys(), st_general_values(), and st_shift().
#define EMPTY_BIN_P | ( | b | ) | ((b) == EMPTY_BIN) |
Definition at line 395 of file st.c.
Referenced by find_table_bin_ind(), find_table_bin_ptr_and_reserve(), and find_table_entry_ind().
#define EMPTY_OR_DELETED_BIN_P | ( | b | ) | ((b) <= DELETED_BIN) |
Definition at line 397 of file st.c.
Referenced by find_table_bin_ind(), find_table_bin_ind_direct(), and find_table_entry_ind().
#define ENTRY_BASE 2 |
Definition at line 372 of file st.c.
Referenced by find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), find_table_entry_ind(), make_tab_empty(), rebuild_table(), st_add_direct_with_hash(), st_general_delete(), st_general_foreach(), st_get_key(), st_insert(), st_insert2(), st_lookup(), st_shift(), and st_update().
#define EQUAL | ( | tab, | |
x, | |||
y | |||
) | ((x) == (y) || (*(tab)->type->compare)((x),(y)) == 0) |
#define EXPECT | ( | expr, | |
val | |||
) | (expr) |
Definition at line 118 of file st.c.
Referenced by rebuild_table(), and st_general_foreach().
#define FNV1_32A_INIT 0x811c9dc5 |
Definition at line 1613 of file st.c.
Referenced by strcasehash(), and strhash().
#define FNV_32_PRIME 0x01000193 |
Definition at line 1618 of file st.c.
Referenced by strcasehash().
#define FOUND_BIN |
Definition at line 715 of file st.c.
Referenced by find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), and find_table_entry_ind().
#define free ruby_xfree |
Definition at line 170 of file st.c.
Referenced by rebuild_table(), and st_free_table().
#define IND_DELETED_BIN_P | ( | tab, | |
i | |||
) | (DELETED_BIN_P(get_bin((tab)->bins, get_size_ind(tab), i))) |
Definition at line 402 of file st.c.
Referenced by make_tab_empty().
#define IND_EMPTY_BIN_P | ( | tab, | |
i | |||
) | (EMPTY_BIN_P(get_bin((tab)->bins, get_size_ind(tab), i))) |
Definition at line 401 of file st.c.
Referenced by make_tab_empty(), and rebuild_table().
#define IND_EMPTY_OR_DELETED_BIN_P | ( | tab, | |
i | |||
) | (EMPTY_OR_DELETED_BIN_P(get_bin((tab)->bins, get_size_ind(tab), i))) |
#define malloc ruby_xmalloc |
Definition at line 167 of file st.c.
Referenced by st_copy(), and st_init_table_with_size().
#define MARK_BIN_DELETED | ( | tab, | |
i | |||
) |
Definition at line 386 of file st.c.
Referenced by st_general_delete(), st_general_foreach(), st_shift(), and st_update().
#define MARK_BIN_EMPTY | ( | tab, | |
i | |||
) | (set_bin((tab)->bins, get_size_ind(tab), i, EMPTY_BIN)) |
Definition at line 376 of file st.c.
Referenced by find_table_bin_ptr_and_reserve().
#define MARK_ENTRY_DELETED | ( | e_ptr | ) | ((e_ptr)->hash = RESERVED_HASH_VAL) |
Definition at line 407 of file st.c.
Referenced by st_general_delete(), st_general_foreach(), st_shift(), and st_update().
#define MAX_POWER2 30 |
Definition at line 262 of file st.c.
Referenced by get_power2().
#define MAX_POWER2_FOR_TABLES_WITHOUT_BINS 4 |
Definition at line 324 of file st.c.
Referenced by make_tab_empty(), and st_init_table_with_size().
#define MINIMAL_POWER2 2 |
Definition at line 316 of file st.c.
Referenced by get_power2(), make_tab_empty(), and rebuild_table().
#define PREFETCH | ( | addr, | |
write_p | |||
) |
Definition at line 117 of file st.c.
Referenced by rebuild_table().
#define PTR_EQUAL | ( | tab, | |
ptr, | |||
hash_val, | |||
key | |||
) | ((ptr)->hash == (hash_val) && EQUAL((tab), (key), (ptr)->key)) |
Definition at line 174 of file st.c.
Referenced by find_entry(), find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), and find_table_entry_ind().
#define r1 (17) |
Referenced by BIGNUM_1c(), integer_unpack_num_bdigits_generic(), murmur_finish(), murmur_step(), and random_equal().
#define r1 (16) |
#define r2 (11) |
Referenced by BIGNUM_1c(), bracket(), integer_unpack_num_bdigits_generic(), murmur_finish(), murmur_step(), and random_equal().
#define r2 (13) |
#define r3 (16) |
Referenced by ffi_closure_SYSV(), integer_unpack_num_bdigits_generic(), and murmur_finish().
#define realloc ruby_xrealloc |
#define REBUILD_THRESHOLD 4 |
Definition at line 721 of file st.c.
Referenced by rebuild_table().
#define RESERVED_HASH_SUBSTITUTION_VAL ((st_hash_t) 0) |
#define RESERVED_HASH_VAL (~(st_hash_t) 0) |
#define ROTL | ( | x, | |
n | |||
) | ((x)<<(n)|(x)>>(SIZEOF_ST_INDEX_T*CHAR_BIT-(n))) |
Definition at line 1636 of file st.c.
Referenced by murmur_step(), and st_hash().
#define SKIP_TAIL 1 |
Definition at line 125 of file st.c.
Referenced by find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), find_table_entry_ind(), rebuild_table(), rebuild_table_if_necessary(), st_add_direct_with_hash(), st_general_delete(), st_general_foreach(), st_general_values(), st_insert(), st_insert2(), st_shift(), and st_update().
#define ST_INIT_VAL 0xafafafafafafafaf |
Definition at line 159 of file st.c.
Referenced by make_tab_empty().
#define ST_INIT_VAL_BYTE 0xafa |
Definition at line 160 of file st.c.
Referenced by st_init_table_with_size().
#define type_numhash st_hashtype_num |
Definition at line 137 of file st.c.
Referenced by st_init_numtable(), st_init_numtable_with_size(), and st_memsize().
#define UNALIGNED_ADD | ( | n | ) |
#define UNALIGNED_ADD | ( | n | ) |
#define UNALIGNED_ADD | ( | n | ) |
#define UNALIGNED_ADD_4 UNALIGNED_ADD(2); UNALIGNED_ADD(1); UNALIGNED_ADD(0) |
#define UNALIGNED_ADD_ALL UNALIGNED_ADD_4 |
Referenced by st_hash().
#define UNDEFINED_BIN_IND (~(st_index_t) 0) |
Definition at line 381 of file st.c.
Referenced by find_table_bin_ind(), find_table_bin_ptr_and_reserve(), rebuild_table(), st_add_direct_with_hash(), st_general_delete(), st_general_foreach(), st_insert(), st_insert2(), st_shift(), and st_update().
#define UNDEFINED_ENTRY_IND (~(st_index_t) 0) |
Definition at line 380 of file st.c.
Referenced by find_entry(), find_table_bin_ptr_and_reserve(), find_table_entry_ind(), st_general_delete(), st_general_foreach(), st_get_key(), st_insert(), st_insert2(), st_lookup(), st_shift(), and st_update().
typedef st_index_t st_hash_t |
|
inlinestatic |
|
inlinestatic |
Definition at line 448 of file st.c.
References st_features::bins_words, and st_table::entry_power.
Referenced by initialize_bins(), st_copy(), st_init_table_with_size(), and st_memsize().
Definition at line 306 of file st.c.
References st_hash_type::hash, st_table_entry::hash, st_table_entry::key, RESERVED_HASH_SUBSTITUTION_VAL, RESERVED_HASH_VAL, and st_table::type.
Referenced by st_add_direct(), st_general_delete(), st_get_key(), st_insert(), st_insert2(), st_lookup(), and st_update().
|
inlinestatic |
Definition at line 825 of file st.c.
References st_table::entries, st_table::entries_bound, st_table::entries_start, PTR_EQUAL, and UNDEFINED_ENTRY_IND.
Referenced by st_general_delete(), st_general_foreach(), st_get_key(), st_insert(), st_insert2(), st_lookup(), st_shift(), and st_update().
|
static |
Definition at line 888 of file st.c.
References bin, st_table::bins, COLLISION, EMPTY_BIN_P, EMPTY_OR_DELETED_BIN_P, st_table::entries, ENTRY_BASE, FOUND_BIN, get_bin(), get_size_ind(), hash_bin(), NULL, PTR_EQUAL, secondary_hash(), st_assert, and UNDEFINED_BIN_IND.
Referenced by st_general_delete(), st_general_foreach(), st_memsize(), st_shift(), and st_update().
|
static |
Definition at line 929 of file st.c.
References bin, st_table::bins, COLLISION, EMPTY_OR_DELETED_BIN_P, st_table::entries, ENTRY_BASE, FOUND_BIN, get_bin(), get_size_ind(), hash_bin(), NULL, PTR_EQUAL, secondary_hash(), and st_assert.
Referenced by rebuild_table(), st_add_direct_with_hash(), and st_memsize().
|
static |
Definition at line 972 of file st.c.
References st_table::bins, COLLISION, DELETED_BIN_P, EMPTY_BIN_P, st_table::entries, st_table::entries_bound, st_table::entries_start, ENTRY_BASE, FOUND_BIN, get_allocated_entries(), get_bin(), get_size_ind(), hash_bin(), MARK_BIN_EMPTY, NULL, st_table::num_entries, PTR_EQUAL, secondary_hash(), st_assert, UNDEFINED_BIN_IND, and UNDEFINED_ENTRY_IND.
Referenced by st_insert(), st_insert2(), and st_memsize().
|
static |
Definition at line 847 of file st.c.
References bin, st_table::bins, COLLISION, EMPTY_BIN_P, EMPTY_OR_DELETED_BIN_P, st_table::entries, ENTRY_BASE, FOUND_BIN, get_bin(), get_size_ind(), hash_bin(), NULL, PTR_EQUAL, secondary_hash(), st_assert, and UNDEFINED_ENTRY_IND.
Referenced by st_general_foreach(), st_get_key(), st_lookup(), and st_memsize().
|
inlinestatic |
Definition at line 441 of file st.c.
References st_table::entry_power.
Referenced by find_table_bin_ptr_and_reserve(), make_tab_empty(), rebuild_table(), rebuild_table_if_necessary(), st_copy(), st_init_table_with_size(), st_insert(), st_insert2(), and st_memsize().
|
inlinestatic |
Definition at line 347 of file st.c.
Referenced by find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), find_table_entry_ind(), make_tab_empty(), st_general_delete(), st_general_foreach(), st_shift(), and st_update().
|
inlinestatic |
Definition at line 419 of file st.c.
References st_table::bin_power.
Referenced by bins_mask(), and make_tab_empty().
|
static |
Definition at line 328 of file st.c.
References MAX_POWER2, MINIMAL_POWER2, rb_eRuntimeError, and rb_raise().
Referenced by st_init_table_with_size().
Definition at line 412 of file st.c.
References st_table::size_ind.
Referenced by find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), find_table_entry_ind(), rebuild_table(), st_add_direct_with_hash(), st_general_delete(), st_general_foreach(), st_insert(), st_insert2(), st_shift(), and st_update().
|
inlinestatic |
Definition at line 434 of file st.c.
References bins_mask().
Referenced by find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), find_table_entry_ind(), and secondary_hash().
|
static |
Definition at line 455 of file st.c.
References st_table::bins, and bins_size().
Referenced by make_tab_empty(), and rebuild_table().
|
static |
Definition at line 462 of file st.c.
References assert, st_table::bins, DELETED_ENTRY_P, st_table::entries, st_table::entries_bound, st_table::entries_start, ENTRY_BASE, f, get_allocated_entries(), get_bin(), get_bins_num(), st_table_entry::hash, IND_DELETED_BIN_P, IND_EMPTY_BIN_P, initialize_bins(), st_table_entry::key, MAX_POWER2_FOR_TABLES_WITHOUT_BINS, MINIMAL_POWER2, NULL, st_table::num_entries, st_table_entry::record, st_table::size_ind, snprintf, and ST_INIT_VAL.
Referenced by st_clear(), and st_init_table_with_size().
|
inlinestatic |
Definition at line 1665 of file st.c.
References BIG_CONSTANT, r1, r2, and r3.
Referenced by st_hash(), and st_hash_end().
|
inlinestatic |
Definition at line 1646 of file st.c.
References C1, C2, r1, r2, and ROTL.
Referenced by st_hash(), st_hash_uint(), and st_hash_uint32().
PUREFUNC | ( | static st_index_t | strcasehashst_data_t | ) |
Referenced by st_locale_insensitive_strncasecmp().
|
static |
Definition at line 732 of file st.c.
References st_table::bin_power, st_table::bins, DELETED_ENTRY_P, st_table::entries, st_table::entries_bound, st_table::entries_start, ENTRY_BASE, st_table::entry_power, EXPECT, find_table_bin_ind_direct(), free, get_allocated_entries(), get_size_ind(), st_table_entry::hash, IND_EMPTY_BIN_P, initialize_bins(), st_table_entry::key, MINIMAL_POWER2, NULL, st_table::num_entries, PREFETCH, REBUILD_THRESHOLD, st_table::rebuilds_num, set_bin(), st_table::size_ind, st_assert, st_init_table_with_size(), st_table::type, and UNDEFINED_BIN_IND.
Referenced by rebuild_table_if_necessary().
|
inlinestatic |
Definition at line 1073 of file st.c.
References st_table::entries_bound, get_allocated_entries(), rebuild_table(), and st_assert.
Referenced by st_add_direct_with_hash(), st_insert(), and st_insert2().
|
inlinestatic |
Definition at line 814 of file st.c.
References hash_bin().
Referenced by find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), and find_table_entry_ind().
|
inlinestatic |
Definition at line 358 of file st.c.
Referenced by rebuild_table(), st_add_direct_with_hash(), st_insert(), and st_insert2().
Definition at line 1159 of file st.c.
References do_hash(), and st_add_direct_with_hash().
|
inlinestatic |
Definition at line 1133 of file st.c.
References st_table::bins, st_table::entries, st_table::entries_bound, ENTRY_BASE, find_table_bin_ind_direct(), get_size_ind(), st_table_entry::hash, st_table_entry::key, NULL, st_table::num_entries, rebuild_table_if_necessary(), st_table_entry::record, set_bin(), st_assert, and UNDEFINED_BIN_IND.
Referenced by st_add_direct(), and st_update().
void st_clear | ( | st_table * | tab | ) |
Definition at line 653 of file st.c.
References make_tab_empty(), and st_table::rebuilds_num.
Referenced by id2key(), rb_generic_ivar_table(), rb_hash_clear(), rb_hash_initialize_copy(), rb_struct_s_def(), struct_make_members_list(), and trace_object_allocations_clear().
Definition at line 1219 of file st.c.
References st_table::bins, bins_size(), st_table::entries, get_allocated_entries(), malloc, MEMCPY, and NULL.
Definition at line 1294 of file st.c.
References st_general_delete().
int st_delete_safe | ( | st_table * | tab, |
st_data_t * | key, | ||
st_data_t * | value, | ||
st_data_t never | ATTRIBUTE_UNUSED | ||
) |
Definition at line 1305 of file st.c.
References st_general_delete().
Definition at line 1527 of file st.c.
References FALSE, func, and st_general_foreach().
int st_foreach_check | ( | st_table * | tab, |
int(*)(ANYARGS) | func, | ||
st_data_t | arg, | ||
st_data_t never | ATTRIBUTE_UNUSED | ||
) |
Definition at line 1534 of file st.c.
References func, st_general_foreach(), and TRUE.
void st_free_table | ( | st_table * | tab | ) |
Definition at line 664 of file st.c.
References st_table::bins, st_table::entries, free, and NULL.
Definition at line 1257 of file st.c.
References bin, st_table::bins, do_hash(), st_table::entries, ENTRY_BASE, find_entry(), find_table_bin_ind(), get_bin(), get_size_ind(), st_table_entry::hash, st_table_entry::key, MARK_BIN_DELETED, MARK_ENTRY_DELETED, NULL, st_table::num_entries, st_table_entry::record, st_assert, UNDEFINED_BIN_IND, UNDEFINED_ENTRY_IND, and update_range_for_deleted().
Referenced by st_delete(), and st_delete_safe().
|
inlinestatic |
Definition at line 1443 of file st.c.
References bin, st_table::bins, DELETED_ENTRY_P, st_table::entries, st_table::entries_bound, st_table::entries_start, ENTRY_BASE, EXPECT, find_entry(), find_table_bin_ind(), find_table_entry_ind(), get_bin(), get_size_ind(), st_table_entry::hash, st_table_entry::key, MARK_BIN_DELETED, MARK_ENTRY_DELETED, NULL, st_table::num_entries, st_table::rebuilds_num, st_table_entry::record, st_assert, ST_CHECK, ST_CONTINUE, st_data_t, ST_DELETE, ST_STOP, UNDEFINED_BIN_IND, UNDEFINED_ENTRY_IND, and update_range_for_deleted().
Referenced by st_foreach(), and st_foreach_check().
|
inlinestatic |
Definition at line 1542 of file st.c.
References DELETED_ENTRY_P, st_table::entries, st_table::entries_bound, st_table::entries_start, st_table_entry::key, size, and st_data_t.
Referenced by st_keys(), and st_keys_check().
|
inlinestatic |
Definition at line 1579 of file st.c.
References DELETED_ENTRY_P, st_table::entries, st_table::entries_bound, st_table::entries_start, st_table_entry::record, size, st_assert, and st_data_t.
Referenced by st_values(), and st_values_check().
Definition at line 1051 of file st.c.
References bin, st_table::bins, do_hash(), st_table::entries, ENTRY_BASE, find_entry(), find_table_entry_ind(), st_table_entry::hash, st_table_entry::key, NULL, and UNDEFINED_ENTRY_IND.
Referenced by make_unique_str(), and rb_feature_p().
st_index_t st_hash | ( | const void * | ptr, |
size_t | len, | ||
st_index_t | h | ||
) |
Definition at line 1698 of file st.c.
References C2, CHAR_BIT, data_at, len, murmur_finish(), murmur_step(), ROTL, SIZEOF_ST_INDEX_T, st_data_t, and UNALIGNED_ADD_ALL.
st_index_t st_hash_end | ( | st_index_t | h | ) |
Definition at line 1856 of file st.c.
References murmur_finish().
st_index_t st_hash_start | ( | st_index_t | h | ) |
Definition at line 1864 of file st.c.
Referenced by rb_hash_start().
st_index_t st_hash_uint | ( | st_index_t | h, |
st_index_t | i | ||
) |
Definition at line 1843 of file st.c.
References murmur_step().
st_index_t st_hash_uint32 | ( | st_index_t | h, |
uint32_t | i | ||
) |
Definition at line 1837 of file st.c.
References murmur_step().
st_table* st_init_numtable | ( | void | ) |
Definition at line 608 of file st.c.
References st_init_table(), and type_numhash.
st_table* st_init_numtable_with_size | ( | st_index_t | size | ) |
Definition at line 615 of file st.c.
References st_init_table_with_size(), and type_numhash.
st_table* st_init_strcasetable | ( | void | ) |
Definition at line 638 of file st.c.
References st_init_table().
Referenced by encoding_name(), Init_transcode(), make_transcoder_entry(), rb_enc_init(), and transcode_search_path().
st_table* st_init_strcasetable_with_size | ( | st_index_t | size | ) |
Definition at line 646 of file st.c.
References st_init_table_with_size().
st_table* st_init_strtable | ( | void | ) |
Definition at line 623 of file st.c.
References st_init_table().
st_table* st_init_strtable_with_size | ( | st_index_t | size | ) |
Definition at line 630 of file st.c.
References st_init_table_with_size().
st_table* st_init_table | ( | const struct st_hash_type * | type | ) |
Definition at line 600 of file st.c.
References st_init_table_with_size().
Referenced by st_init_numtable(), st_init_strcasetable(), and st_init_strtable().
st_table* st_init_table_with_size | ( | const struct st_hash_type * | type, |
st_index_t | size | ||
) |
Definition at line 553 of file st.c.
References st_table::bin_power, st_features::bin_power, st_table::bins, bins_size(), st_table::entries, st_table::entry_power, get_allocated_entries(), get_power2(), getenv, make_tab_empty(), malloc, MAX_POWER2_FOR_TABLES_WITHOUT_BINS, NULL, st_table::rebuilds_num, st_table::size_ind, st_features::size_ind, ST_INIT_VAL_BYTE, and st_table::type.
Referenced by rebuild_table(), st_init_numtable_with_size(), st_init_strcasetable_with_size(), st_init_strtable_with_size(), and st_init_table().
Definition at line 1086 of file st.c.
References bin, st_table::bins, do_hash(), st_table::entries, st_table::entries_bound, ENTRY_BASE, find_entry(), find_table_bin_ptr_and_reserve(), get_allocated_entries(), get_size_ind(), st_table_entry::hash, st_table_entry::key, NULL, st_table::num_entries, rebuild_table_if_necessary(), st_table_entry::record, set_bin(), st_assert, UNDEFINED_BIN_IND, and UNDEFINED_ENTRY_IND.
Definition at line 1171 of file st.c.
References bin, st_table::bins, do_hash(), st_table::entries, st_table::entries_bound, ENTRY_BASE, find_entry(), find_table_bin_ptr_and_reserve(), get_allocated_entries(), get_size_ind(), st_table_entry::hash, st_table_entry::key, NULL, rebuild_table_if_necessary(), st_table::rebuilds_num, st_table_entry::record, set_bin(), st_assert, UNDEFINED_BIN_IND, and UNDEFINED_ENTRY_IND.
Referenced by enc_alias_internal().
st_index_t st_keys | ( | st_table * | tab, |
st_data_t * | keys, | ||
st_index_t | size | ||
) |
Definition at line 1564 of file st.c.
References st_general_keys().
st_index_t st_keys_check | ( | st_table * | tab, |
st_data_t * | keys, | ||
st_index_t | size, | ||
st_data_t never | ATTRIBUTE_UNUSED | ||
) |
Definition at line 1901 of file st.c.
References PUREFUNC(), st_data_t, and strcasehash().
Definition at line 1028 of file st.c.
References bin, st_table::bins, do_hash(), st_table::entries, ENTRY_BASE, find_entry(), find_table_entry_ind(), st_table_entry::hash, NULL, st_table_entry::record, and UNDEFINED_ENTRY_IND.
Definition at line 674 of file st.c.
References st_table::bins, bins_size(), find_table_bin_ind(), find_table_bin_ind_direct(), find_table_bin_ptr_and_reserve(), find_table_entry_ind(), get_allocated_entries(), st_table_entry::key, NULL, st_data_t, and type_numhash.
Referenced by autoload_memsize(), com_hash_size(), fiber_memsize(), ibf_dump_memsize(), id2key(), obj_memsize_of(), thread_memsize(), and wmap_memsize().
st_index_t st_numhash | ( | st_data_t | n | ) |
Definition at line 1315 of file st.c.
References bin, st_table::bins, DELETED_ENTRY_P, st_table::entries, st_table::entries_bound, st_table::entries_start, ENTRY_BASE, find_entry(), find_table_bin_ind(), get_bin(), get_size_ind(), st_table_entry::hash, st_table_entry::key, MARK_BIN_DELETED, MARK_ENTRY_DELETED, NULL, st_table::num_entries, st_table_entry::record, st_assert, UNDEFINED_BIN_IND, UNDEFINED_ENTRY_IND, and update_range_for_deleted().
Referenced by rb_hash_shift().
int st_update | ( | st_table * | tab, |
st_data_t | key, | ||
st_update_callback_func * | func, | ||
st_data_t | arg | ||
) |
Definition at line 1371 of file st.c.
References bin, st_table::bins, do_hash(), st_table::entries, ENTRY_BASE, find_entry(), find_table_bin_ind(), get_bin(), get_size_ind(), st_table_entry::hash, st_table_entry::key, MARK_BIN_DELETED, MARK_ENTRY_DELETED, NULL, st_table::num_entries, st_table::rebuilds_num, st_table_entry::record, st_add_direct_with_hash(), st_assert, ST_CONTINUE, st_data_t, ST_DELETE, UNDEFINED_BIN_IND, UNDEFINED_ENTRY_IND, and update_range_for_deleted().
Referenced by cv_i(), generic_ivar_set(), load_unlock(), local_var_list_add(), rb_ary_or(), rb_hash_add_new_element(), register_fstring(), register_sym(), ruby_init_ext(), sv_i(), tbl_update(), wmap_aset(), wmap_finalize(), and zone_str().
st_index_t st_values | ( | st_table * | tab, |
st_data_t * | values, | ||
st_index_t | size | ||
) |
Definition at line 1601 of file st.c.
References st_general_values().
st_index_t st_values_check | ( | st_table * | tab, |
st_data_t * | values, | ||
st_index_t | size, | ||
st_data_t never | ATTRIBUTE_UNUSED | ||
) |
Definition at line 1608 of file st.c.
References st_general_values().
Referenced by rb_hash_values().
|
static |
Definition at line 1927 of file st.c.
References FNV1_32A_INIT, FNV_32_PRIME, and hval.
Referenced by st_locale_insensitive_strncasecmp().
|
static |
Definition at line 1870 of file st.c.
References FNV1_32A_INIT, st_hash(), and strlen().
|
inlinestatic |
Definition at line 1244 of file st.c.
References st_table::entries_start.
Referenced by st_general_delete(), st_general_foreach(), st_shift(), and st_update().
|
static |
Definition at line 264 of file st.c.
Referenced by get_loaded_features_index(), rb_feature_p(), and rb_provide_feature().
const struct st_hash_type st_hashtype_num |
|
static |