Ruby
1.9.3p551(2014-11-13revision48407)
|
Go to the source code of this file.
Data Structures | |
struct | st_table_entry |
Typedefs | |
typedef struct st_table_entry | st_table_entry |
Variables | |
static struct st_hash_type | type_numhash |
static struct st_hash_type | type_strhash |
static struct st_hash_type | type_strcasehash |
static const unsigned int | primes [] |
Definition at line 389 of file st.c.
Referenced by st_add_direct(), st_insert(), and st_insert2().
Definition at line 69 of file st.c.
Referenced by get_special_folder(), name_add(), onig_reg_init(), scan_env_add_mem_entry(), st_copy(), and st_init_table_with_size().
Definition at line 70 of file st.c.
Referenced by st_copy(), and st_init_table_with_size().
#define data_at | ( | n | ) | (st_index_t)((unsigned char)data[(n)]) |
Definition at line 75 of file st.c.
Referenced by st_add_direct(), st_get_key(), st_insert(), st_insert2(), and st_lookup().
Definition at line 76 of file st.c.
Referenced by st_delete(), st_delete_safe(), and st_shift().
Definition at line 72 of file st.c.
Referenced by st_delete(), and st_delete_safe().
Definition at line 309 of file st.c.
Referenced by st_foreach(), st_get_key(), st_insert(), st_insert2(), and st_lookup().
#define FNV1_32A_INIT 0x811c9dc5 |
Definition at line 1015 of file st.c.
Referenced by strcasehash(), and strhash().
#define FNV_32_PRIME 0x01000193 |
Definition at line 1020 of file st.c.
Referenced by strcasehash().
#define MAX_PACKED_NUMHASH (ST_DEFAULT_INIT_TABLE_SIZE/2) |
Definition at line 164 of file st.c.
Referenced by st_init_table_with_size(), and unpack_entries().
#define MINSIZE 8 |
Definition at line 82 of file st.c.
Referenced by new_size().
#define MORE_PACKABLE_P | ( | table | ) |
Definition at line 385 of file st.c.
Referenced by st_add_direct(), st_insert(), and st_insert2().
#define murmur1 | ( | h | ) | murmur_step((h), 24) |
Definition at line 1109 of file st.c.
Referenced by st_hash_uint().
#define murmur_step | ( | h, | |
k | |||
) | murmur((h), (k), 16) |
Definition at line 1104 of file st.c.
Referenced by st_hash(), st_hash_end(), and st_hash_uint32().
#define MurmurMagic MurmurMagic_2 |
Definition at line 1067 of file st.c.
Referenced by murmur(), murmur_finish(), and st_hash().
#define MurmurMagic_1 (st_index_t)0xc6a4a793 |
#define MurmurMagic_2 (st_index_t)0x5bd1e995 |
Definition at line 67 of file st.c.
Referenced by new_size().
Definition at line 607 of file st.c.
Referenced by st_delete(), st_delete_safe(), st_foreach(), and st_shift().
#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().
typedef struct st_table_entry st_table_entry |
|
inlinestatic |
Definition at line 1072 of file st.c.
References m, MurmurMagic, and r.
Referenced by murmur_finish().
|
inlinestatic |
Definition at line 1091 of file st.c.
References murmur(), and MurmurMagic.
Referenced by st_hash().
|
static |
Definition at line 120 of file st.c.
References i, MINSIZE, numberof, primes, rb_eRuntimeError, and rb_raise().
Referenced by onigenc_property_list_add_property(), rehash(), resize_property_list(), and st_init_table_with_size().
Definition at line 536 of file st.c.
References st_table::bins, st_table_entry::fore, st_table_entry::hash, st_table::head, i, new_size(), st_table_entry::next, st_table::num_bins, ptr, and xrealloc.
Definition at line 513 of file st.c.
References ADD_DIRECT, st_table::bins, do_hash, st_table::entries_packed, i, MORE_PACKABLE_P, st_table::num_bins, st_table::num_entries, and unpack_entries().
Definition at line 738 of file st.c.
References st_table::bins, st_table::entries_packed, free, i, st_table_entry::key, last, st_table_entry::next, st_table::num_bins, st_table::num_entries, and ptr.
Definition at line 241 of file st.c.
References st_table::bins, st_table::entries_packed, free, st_table::head, i, st_table_entry::next, st_table::num_bins, st_table::num_entries, ptr, and st_table::tail.
Referenced by rb_hash_clear(), rb_thread_atfork_internal(), and st_free_table().
Definition at line 558 of file st.c.
References alloc, st_table_entry::back, st_table::bins, Calloc, st_table::entries_packed, st_table_entry::fore, free, st_table_entry::hash, st_table::head, memcpy(), st_table_entry::next, st_table::num_bins, ptr, st_free_table, and st_table::tail.
Definition at line 624 of file st.c.
References st_table::bins, do_hash_bin, st_table::entries_packed, EQUAL, free, i, st_table_entry::key, memmove(), st_table_entry::next, st_table::num_entries, ptr, st_table_entry::record, and REMOVE_ENTRY.
int st_delete_safe | ( | register st_table * | table, |
register st_data_t * | key, | ||
st_data_t * | value, | ||
st_data_t | never | ||
) |
Definition at line 663 of file st.c.
References st_table::bins, do_hash_bin, st_table::entries_packed, EQUAL, i, st_table_entry::key, st_table_entry::next, st_table::num_entries, ptr, st_table_entry::record, and REMOVE_ENTRY.
Definition at line 774 of file st.c.
References arg, st_table::bins, st_table::entries_packed, FIND_ENTRY, st_table_entry::fore, free, st_table_entry::hash, st_table::head, i, st_table_entry::key, key, last, memmove(), st_table_entry::next, st_table::num_bins, st_table::num_entries, ptr, st_table_entry::record, REMOVE_ENTRY, retval, ST_CHECK, ST_CONTINUE, ST_DELETE, ST_STOP, and val.
Definition at line 266 of file st.c.
References st_table::bins, free, and st_clear().
Definition at line 354 of file st.c.
References st_table::bins, do_hash, st_table::entries_packed, FIND_ENTRY, i, st_table_entry::key, st_table::num_entries, and ptr.
st_index_t st_hash | ( | const void * | ptr, |
size_t | len, | ||
st_index_t | h | ||
) |
Definition at line 1113 of file st.c.
References CHAR_BIT, d, data, int, murmur_finish(), murmur_step, MurmurMagic, ptr, SIZEOF_ST_INDEX_T, t, and UNALIGNED_ADD_ALL.
st_index_t st_hash_end | ( | st_index_t | h | ) |
Definition at line 1277 of file st.c.
References murmur_step.
st_index_t st_hash_start | ( | st_index_t | h | ) |
st_index_t st_hash_uint | ( | st_index_t | h, |
st_index_t | i | ||
) |
st_index_t st_hash_uint32 | ( | st_index_t | h, |
uint32_t | i | ||
) |
Definition at line 1240 of file st.c.
References murmur_step.
Definition at line 205 of file st.c.
References st_init_table.
st_table* st_init_numtable_with_size | ( | st_index_t | size | ) |
Definition at line 211 of file st.c.
References st_init_table_with_size.
Definition at line 229 of file st.c.
References st_init_table.
Referenced by Init_transcode(), make_transcoder_entry(), rb_enc_init(), transcode_search_path(), and w_encoding().
st_table* st_init_strcasetable_with_size | ( | st_index_t | size | ) |
Definition at line 235 of file st.c.
References st_init_table_with_size.
Definition at line 217 of file st.c.
References st_init_table.
st_table* st_init_strtable_with_size | ( | st_index_t | size | ) |
Definition at line 223 of file st.c.
References st_init_table_with_size.
st_table* st_init_table | ( | const struct st_hash_type * | type | ) |
Definition at line 199 of file st.c.
References st_init_table_with_size.
st_table* st_init_table_with_size | ( | const struct st_hash_type * | type, |
st_index_t | size | ||
) |
Definition at line 167 of file st.c.
References alloc, st_table::bins, Calloc, e, st_table::entries_packed, getenv(), st_table::head, MAX_PACKED_NUMHASH, new_size(), st_table::num_bins, st_table::num_entries, size, st_table::tail, tbl, st_table::type, and type.
Definition at line 435 of file st.c.
References ADD_DIRECT, st_table::bins, do_hash, st_table::entries_packed, FIND_ENTRY, i, MORE_PACKABLE_P, st_table::num_entries, ptr, st_table_entry::record, unpack_entries(), and value.
int st_insert2 | ( | register st_table * | table, |
register st_data_t | key, | ||
st_data_t | value, | ||
st_data_t(*)(st_data_t) | func | ||
) |
Definition at line 473 of file st.c.
References ADD_DIRECT, st_table::bins, do_hash, st_table::entries_packed, FIND_ENTRY, i, key, MORE_PACKABLE_P, st_table::num_entries, ptr, st_table_entry::record, unpack_entries(), and value.
Definition at line 325 of file st.c.
References st_table::bins, do_hash, st_table::entries_packed, FIND_ENTRY, i, st_table::num_entries, ptr, and st_table_entry::record.
Definition at line 274 of file st.c.
References st_table::entries_packed, st_table::num_bins, and st_table::num_entries.
Referenced by autoload_memsize(), fiber_memsize(), memsize_of(), rb_generic_ivar_memsize(), thread_memsize(), and vm_memsize().
st_index_t st_numhash | ( | st_data_t | n | ) |
Definition at line 699 of file st.c.
References st_table::bins, do_hash_bin, st_table::entries_packed, free, st_table::head, st_table_entry::key, memmove(), st_table_entry::next, st_table::num_entries, ptr, st_table_entry::record, and REMOVE_ENTRY.
|
static |
Definition at line 1349 of file st.c.
References c, FNV1_32A_INIT, FNV_32_PRIME, and hval.
|
static |
Definition at line 1292 of file st.c.
References FNV1_32A_INIT, st_hash(), and strlen().
Definition at line 417 of file st.c.
References st_table::bins, st_table::entries_packed, i, MAX_PACKED_NUMHASH, memcpy(), memset(), st_table::num_bins, st_table::num_entries, st_insert, and table.
Referenced by st_add_direct(), st_insert(), and st_insert2().
Definition at line 87 of file st.c.
Referenced by new_size().
|
static |
|
static |