Ruby
2.0.0p648(2015-12-16revision53162)
|
Go to the source code of this file.
Data Structures | |
struct | st_table_entry |
struct | st_packed_entry |
Macros | |
#define | STATIC_ASSERT(name, expr) typedef int static_assert_##name##_check[(expr) ? 1 : -1]; |
#define | ST_DEFAULT_MAX_DENSITY 5 |
#define | ST_DEFAULT_INIT_TABLE_SIZE 11 |
#define | ST_DEFAULT_SECOND_TABLE_SIZE 19 |
#define | ST_DEFAULT_PACKED_TABLE_SIZE 18 |
#define | PACKED_UNIT (int)(sizeof(st_packed_entry) / sizeof(st_table_entry*)) |
#define | MAX_PACKED_HASH (int)(ST_DEFAULT_PACKED_TABLE_SIZE * sizeof(st_table_entry*) / sizeof(st_packed_entry)) |
#define | type_numhash st_hashtype_num |
#define | malloc xmalloc |
#define | calloc xcalloc |
#define | realloc xrealloc |
#define | free(x) xfree(x) |
#define | numberof(array) (int)(sizeof(array) / sizeof((array)[0])) |
#define | EQUAL(table, x, y) ((x)==(y) || (*(table)->type->compare)((x),(y)) == 0) |
#define | do_hash(key, table) (st_index_t)(*(table)->type->hash)((key)) |
#define | do_hash_bin(key, table) (do_hash((key), (table))%(table)->num_bins) |
#define | st_alloc_entry() (st_table_entry *)malloc(sizeof(st_table_entry)) |
#define | st_free_entry(entry) free(entry) |
#define | st_alloc_table() (st_table *)malloc(sizeof(st_table)) |
#define | st_dealloc_table(table) free(table) |
#define | st_alloc_bins(size) (st_table_entry **)calloc(size, sizeof(st_table_entry *)) |
#define | st_free_bins(bins, size) free(bins) |
#define | bins as.big.bins |
#define | head as.big.head |
#define | tail as.big.tail |
#define | real_entries as.packed.real_entries |
#define | PACKED_BINS(table) ((table)->as.packed.entries) |
#define | PACKED_ENT(table, i) PACKED_BINS(table)[i] |
#define | PKEY(table, i) PACKED_ENT((table), (i)).key |
#define | PVAL(table, i) PACKED_ENT((table), (i)).val |
#define | PHASH(table, i) PACKED_ENT((table), (i)).hash |
#define | PKEY_SET(table, i, v) (PKEY((table), (i)) = (v)) |
#define | PVAL_SET(table, i, v) (PVAL((table), (i)) = (v)) |
#define | PHASH_SET(table, i, v) (PHASH((table), (i)) = (v)) |
#define | MINSIZE 8 |
#define | PTR_NOT_EQUAL(table, ptr, hash_val, key) ((ptr) != 0 && ((ptr)->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key))) |
#define | COLLISION |
#define | FOUND_ENTRY |
#define | FIND_ENTRY(table, ptr, hash_val, bin_pos) ((ptr) = find_entry((table), key, (hash_val), ((bin_pos) = (hash_val)%(table)->num_bins))) |
#define | collision_check 0 |
#define | collision_check 1 |
#define | FNV1_32A_INIT 0x811c9dc5 |
#define | FNV_32_PRIME 0x01000193 |
#define | UNALIGNED_WORD_ACCESS 0 |
#define | MURMUR 2 |
#define | MurmurMagic_1 (st_index_t)0xc6a4a793 |
#define | MurmurMagic_2 (st_index_t)0x5bd1e995 |
#define | MurmurMagic MurmurMagic_2 |
#define | murmur_step(h, k) murmur((h), (k), 16) |
#define | murmur1(h) murmur_step((h), 24) |
#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 | UNALIGNED_ADD(n) |
Typedefs | |
typedef struct st_table_entry | st_table_entry |
typedef struct st_packed_entry | st_packed_entry |
Variables | |
static const struct st_hash_type | type_strhash |
static const struct st_hash_type | type_strcasehash |
static const unsigned int | primes [] |
#define bins as.big.bins |
Definition at line 106 of file st.c.
Referenced by st_realloc_bins().
#define COLLISION |
Definition at line 373 of file st.c.
Referenced by find_entry().
#define data_at | ( | n | ) | (st_index_t)((unsigned char)data[(n)]) |
#define do_hash | ( | key, | |
table | |||
) | (st_index_t)(*(table)->type->hash)((key)) |
Definition at line 87 of file st.c.
Referenced by st_add_direct(), st_delete(), st_delete_safe(), st_get_key(), st_insert(), st_insert2(), st_lookup(), and st_update().
Definition at line 85 of file st.c.
Referenced by find_packed_index_from(), st_delete(), and st_delete_safe().
#define FIND_ENTRY | ( | table, | |
ptr, | |||
hash_val, | |||
bin_pos | |||
) | ((ptr) = find_entry((table), key, (hash_val), ((bin_pos) = (hash_val)%(table)->num_bins))) |
Definition at line 377 of file st.c.
Referenced by st_foreach(), st_foreach_check(), st_insert(), st_insert2(), and st_update().
#define FNV1_32A_INIT 0x811c9dc5 |
Definition at line 1221 of file st.c.
Referenced by strcasehash(), and strhash().
#define FNV_32_PRIME 0x01000193 |
Definition at line 1226 of file st.c.
Referenced by strcasehash().
#define FOUND_ENTRY |
Definition at line 374 of file st.c.
Referenced by find_entry().
#define head as.big.head |
Definition at line 107 of file st.c.
Referenced by ary_ensure_room_for_unshift(), block_append_gen(), divide_look_behind_alternatives(), fixup_nodes(), gzfile_read_header(), ip_ruby_cmd_receiver_const_get(), iseq_compile_each(), list_concat_gen(), literal_concat_gen(), new_evstr_gen(), onig_chain_reduce(), start_document(), and yyparse().
#define MAX_PACKED_HASH (int)(ST_DEFAULT_PACKED_TABLE_SIZE * sizeof(st_table_entry*) / sizeof(st_packed_entry)) |
Definition at line 40 of file st.c.
Referenced by st_init_table_with_size(), and unpack_entries().
#define MINSIZE 8 |
Definition at line 146 of file st.c.
Referenced by new_size().
#define murmur1 | ( | h | ) | murmur_step((h), 24) |
Definition at line 1315 of file st.c.
Referenced by st_hash_uint().
#define murmur_step | ( | h, | |
k | |||
) | murmur((h), (k), 16) |
Definition at line 1310 of file st.c.
Referenced by st_hash(), st_hash_end(), and st_hash_uint32().
#define MurmurMagic MurmurMagic_2 |
Definition at line 1273 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 83 of file st.c.
Referenced by new_size().
#define PACKED_BINS | ( | table | ) | ((table)->as.packed.entries) |
Definition at line 112 of file st.c.
Referenced by unpack_entries().
#define PACKED_ENT | ( | table, | |
i | |||
) | PACKED_BINS(table)[i] |
Definition at line 113 of file st.c.
Referenced by remove_packed_entry(), and st_cleanup_safe().
#define PACKED_UNIT (int)(sizeof(st_packed_entry) / sizeof(st_table_entry*)) |
#define PHASH | ( | table, | |
i | |||
) | PACKED_ENT((table), (i)).hash |
Definition at line 116 of file st.c.
Referenced by find_packed_index_from(), st_foreach(), and st_foreach_check().
Definition at line 119 of file st.c.
Referenced by add_packed_direct(), and remove_safe_packed_entry().
#define PKEY | ( | table, | |
i | |||
) | PACKED_ENT((table), (i)).key |
Definition at line 114 of file st.c.
Referenced by find_packed_index_from(), st_cleanup_safe(), st_delete(), st_delete_safe(), st_foreach(), st_foreach_check(), st_get_key(), and st_update().
Definition at line 117 of file st.c.
Referenced by add_packed_direct(), and remove_safe_packed_entry().
#define PTR_NOT_EQUAL | ( | table, | |
ptr, | |||
hash_val, | |||
key | |||
) | ((ptr) != 0 && ((ptr)->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key))) |
Definition at line 352 of file st.c.
Referenced by find_entry().
#define PVAL | ( | table, | |
i | |||
) | PACKED_ENT((table), (i)).val |
Definition at line 115 of file st.c.
Referenced by st_delete(), st_delete_safe(), st_foreach(), st_foreach_check(), st_lookup(), and st_update().
Definition at line 118 of file st.c.
Referenced by add_packed_direct(), remove_safe_packed_entry(), st_insert(), st_insert2(), and st_update().
#define real_entries as.packed.real_entries |
Definition at line 109 of file st.c.
Referenced by find_packed_index_from(), remove_packed_entry(), st_delete(), st_delete_safe(), st_get_key(), st_insert(), st_insert2(), st_lookup(), and st_update().
#define realloc xrealloc |
Definition at line 79 of file st.c.
Referenced by st_realloc_bins().
#define st_alloc_bins | ( | size | ) | (st_table_entry **)calloc(size, sizeof(st_table_entry *)) |
Definition at line 95 of file st.c.
Referenced by st_copy(), and st_init_table_with_size().
#define st_alloc_entry | ( | ) | (st_table_entry *)malloc(sizeof(st_table_entry)) |
Definition at line 91 of file st.c.
Referenced by new_entry(), and st_copy().
Definition at line 93 of file st.c.
Referenced by st_copy(), and st_init_table_with_size().
#define st_dealloc_table | ( | table | ) | free(table) |
Definition at line 94 of file st.c.
Referenced by st_copy(), and st_free_table().
#define ST_DEFAULT_INIT_TABLE_SIZE 11 |
Definition at line 36 of file st.c.
Referenced by unpack_entries().
#define ST_DEFAULT_MAX_DENSITY 5 |
Definition at line 35 of file st.c.
Referenced by add_direct().
#define ST_DEFAULT_PACKED_TABLE_SIZE 18 |
Definition at line 38 of file st.c.
Referenced by st_init_table_with_size().
Definition at line 96 of file st.c.
Referenced by st_free_table().
#define st_free_entry | ( | entry | ) | free(entry) |
Definition at line 92 of file st.c.
Referenced by st_cleanup_safe(), st_clear(), st_delete(), st_foreach(), and st_update().
#define tail as.big.tail |
Definition at line 108 of file st.c.
Referenced by block_append_gen(), bm_search(), bm_search_ic(), bm_search_notrev(), bm_search_notrev_ic(), cmdglob(), error_print(), glob_make_pattern(), insert(), ip_ruby_cmd_receiver_const_get(), list_concat_gen(), literal_concat_gen(), new_args_gen(), rb_file_join(), rb_w32_cmdvector(), and start_document().
#define type_numhash st_hashtype_num |
Referenced by st_init_numtable(), and st_init_numtable_with_size().
#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_packed_entry st_packed_entry |
typedef struct st_table_entry st_table_entry |
|
inlinestatic |
Definition at line 488 of file st.c.
References st_table_entry::back, st_table_entry::fore, st_table::head, new_entry(), st_table::num_bins, st_table::num_entries, rehash(), ST_DEFAULT_MAX_DENSITY, and st_table::tail.
Referenced by add_packed_direct(), st_add_direct(), st_insert(), st_insert2(), and st_update().
|
static |
Definition at line 547 of file st.c.
References add_direct(), i, st_table::num_bins, st_table::num_entries, PHASH_SET, PKEY_SET, PVAL_SET, st_table::real_entries, and unpack_entries().
Referenced by st_add_direct(), st_insert(), st_insert2(), and st_update().
|
static |
Definition at line 381 of file st.c.
References st_table::bins, COLLISION, FOUND_ENTRY, st_table_entry::next, and PTR_NOT_EQUAL.
Referenced by st_get_key(), and st_lookup().
|
inlinestatic |
Definition at line 406 of file st.c.
References find_packed_index_from().
Referenced by st_delete(), st_delete_safe(), st_foreach_check(), st_get_key(), st_insert(), st_insert2(), st_lookup(), and st_update().
|
inlinestatic |
Definition at line 396 of file st.c.
References EQUAL, i, PHASH, PKEY, and real_entries.
Referenced by find_packed_index(), and st_foreach_check().
|
inlinestatic |
|
inlinestatic |
Definition at line 1297 of file st.c.
References murmur(), and MurmurMagic.
Referenced by st_hash().
|
inlinestatic |
Definition at line 473 of file st.c.
References st_table::bins, st_table_entry::hash, st_table_entry::key, key, st_table_entry::next, st_table_entry::record, and st_alloc_entry.
Referenced by add_direct(), and unpack_entries().
|
static |
Definition at line 184 of file st.c.
References i, MINSIZE, numberof, rb_eRuntimeError, and rb_raise().
Referenced by onigenc_property_list_add_property(), rehash(), resize_property_list(), and st_init_table_with_size().
|
static |
Referenced by add_direct().
|
static |
Definition at line 643 of file st.c.
References st_table::bins, st_table_entry::fore, st_table_entry::hash, st_table::head, new_size(), st_table_entry::next, st_table::num_bins, and st_realloc_bins().
|
inlinestatic |
Definition at line 712 of file st.c.
References st_table_entry::back, st_table_entry::fore, st_table::head, st_table::num_entries, and st_table::tail.
Referenced by st_delete(), st_delete_safe(), st_foreach(), st_foreach_check(), and st_update().
|
inlinestatic |
Definition at line 123 of file st.c.
References MEMMOVE, st_table::num_entries, PACKED_ENT, st_table::real_entries, and real_entries.
Referenced by st_delete(), st_foreach(), and st_update().
|
inlinestatic |
Definition at line 134 of file st.c.
References st_table::num_entries, PHASH_SET, PKEY_SET, and PVAL_SET.
Referenced by st_delete_safe(), and st_foreach_check().
Definition at line 629 of file st.c.
References add_direct(), add_packed_direct(), do_hash, st_table::entries_packed, and st_table::num_bins.
Referenced by boot_defclass(), define_final0(), generic_ivar_set(), make_transcoder_entry(), method_entry_i(), move_refined_method(), rb_alias_variable(), rb_autoload(), rb_copy_generic_ivar(), rb_define_class(), rb_define_module(), rb_global_entry(), rb_ivar_set(), register_symid_str(), set_syserr(), transcode_search_path(), transcode_search_path_i(), w_object(), and w_symbol().
Definition at line 802 of file st.c.
References st_table::bins, st_table::entries_packed, i, st_table_entry::key, last, st_table_entry::next, st_table::num_bins, st_table::num_entries, PACKED_ENT, PKEY, st_table::real_entries, and st_free_entry.
Referenced by hash_foreach_ensure().
void st_clear | ( | st_table * | table | ) |
Definition at line 308 of file st.c.
References st_table::bins, st_table::entries_packed, st_table::head, i, st_table_entry::next, st_table::num_bins, st_table::num_entries, st_table::real_entries, st_free_entry, and st_table::tail.
Referenced by rb_hash_clear(), rb_hash_initialize_copy(), rb_thread_atfork_internal(), and st_free_table().
Definition at line 663 of file st.c.
References st_table_entry::back, st_table::bins, st_table::entries_packed, st_table_entry::fore, st_table_entry::hash, st_table::head, MEMCPY, st_table_entry::next, st_table::num_bins, st_alloc_bins, st_alloc_entry, st_alloc_table, st_dealloc_table, st_free_table(), and st_table::tail.
Referenced by init_copy(), rb_copy_generic_ivar(), rb_hash_dup(), rb_hash_initialize_copy(), rb_hash_s_create(), rb_hash_to_h(), rb_mod_init_copy(), and rb_singleton_class_clone_and_attach().
Definition at line 729 of file st.c.
References st_table::bins, do_hash, st_table::entries_packed, EQUAL, find_packed_index(), i, st_table_entry::key, st_table_entry::next, st_table::num_bins, PKEY, PVAL, real_entries, st_table_entry::record, remove_entry(), remove_packed_entry(), and st_free_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 766 of file st.c.
References st_table::bins, do_hash, st_table::entries_packed, EQUAL, find_packed_index(), i, st_table_entry::key, st_table_entry::next, st_table::num_bins, PKEY, PVAL, real_entries, st_table_entry::record, remove_entry(), and remove_safe_packed_entry().
Definition at line 1006 of file st.c.
References st_table::bins, st_table::entries_packed, FIND_ENTRY, st_table_entry::fore, st_table_entry::hash, hash(), st_table::head, i, st_table_entry::key, key, last, st_table_entry::next, st_table::num_bins, PHASH, PKEY, PVAL, st_table::real_entries, st_table_entry::record, remove_entry(), remove_packed_entry(), ST_CHECK, ST_CONTINUE, ST_DELETE, st_free_entry, ST_STOP, and val.
Referenced by class_instance_method_list(), clear_coverage(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), enc_names(), exit_handler(), extract_keywords(), fc_i(), get_loaded_features_index(), include_modules_at(), mark_const_tbl(), mark_hash(), mark_m_tbl(), mark_marshal_compat_t(), mark_set(), mark_tbl(), proc_waitall(), rb_ary_uniq(), rb_ary_uniq_bang(), rb_check_deadlock(), rb_check_exec_env(), rb_check_exec_options(), rb_clear_trace_func(), rb_coverage_result(), rb_econv_asciicompat_encoding(), rb_enc_aliases(), rb_enc_name_list(), rb_execarg_extract_options(), rb_execarg_fixup(), rb_feature_p(), rb_free_const_table(), rb_free_m_table(), rb_mod_init_copy(), rb_obj_singleton_methods(), rb_objspace_call_finalizer(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), rb_sym_all_symbols(), rb_thread_atfork_internal(), rb_thread_fd_close(), rb_thread_keys(), rb_thread_list(), rb_thread_terminate_all(), rb_vm_check_redefinition_by_prepend(), rb_vm_mark(), rb_waitpid(), reachable_objects_from(), thgroup_list(), transcode_search_path(), validate_labels(), wmap_free(), wmap_mark(), and wmap_memsize().
Definition at line 914 of file st.c.
References st_table::bins, st_table::entries_packed, FIND_ENTRY, find_packed_index(), find_packed_index_from(), st_table_entry::fore, st_table_entry::hash, hash(), st_table::head, i, st_table_entry::key, key, last, st_table_entry::next, st_table::num_bins, PHASH, PKEY, PVAL, st_table::real_entries, st_table_entry::record, remove_entry(), remove_safe_packed_entry(), ST_CHECK, ST_CONTINUE, ST_DELETE, ST_STOP, and val.
Referenced by hash2kv(), hash2kv_enc(), hash_foreach_call(), st_foreach_safe(), and tk_symbolkey2str().
void st_free_table | ( | st_table * | table | ) |
Definition at line 334 of file st.c.
References st_table::bins, st_table::num_bins, st_clear(), st_dealloc_table, and st_free_bins.
Referenced by ary_recycle_hash(), autoload_free(), class_instance_method_list(), clear_dump_arg(), clear_load_arg(), cvar_list(), exit_handler(), fiber_free(), flatten(), free_enc2cp(), generic_ivar_remove(), init_copy(), Init_win32ole(), iseq_build_from_ary_body(), iseq_data_to_ary(), iseq_load(), obj_free(), rb_const_list(), rb_copy_generic_ivar(), rb_free_const_table(), rb_free_generic_ivar(), rb_free_m_table(), rb_hash_initialize_copy(), rb_hash_rehash(), rb_mod_init_copy(), rb_obj_singleton_methods(), rb_objspace_call_finalizer(), ruby_vm_destruct(), st_copy(), thread_free(), transcode_search_path(), and wmap_free().
Definition at line 442 of file st.c.
References do_hash, st_table::entries_packed, find_entry(), find_packed_index(), i, st_table_entry::key, st_table::num_bins, PKEY, and real_entries.
st_index_t st_hash | ( | const void * | ptr, |
size_t | len, | ||
st_index_t | h | ||
) |
Definition at line 1319 of file st.c.
References CHAR_BIT, murmur_finish(), murmur_step, MurmurMagic, SIZEOF_ST_INDEX_T, and UNALIGNED_ADD_ALL.
st_index_t st_hash_end | ( | st_index_t | h | ) |
Definition at line 1483 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 1446 of file st.c.
References murmur_step.
st_table* st_init_numtable | ( | void | ) |
Definition at line 272 of file st.c.
References st_init_table(), and type_numhash.
Referenced by class_instance_method_list(), constat_handle(), fiber_init(), find_class_path(), flatten(), generic_ivar_set(), init_constants(), init_enc2cp(), Init_Exception(), init_heap(), Init_marshal(), Init_var_tables(), Init_VM(), Init_win32ole(), insn_make_insn_table(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), marshal_dump(), marshal_load(), mod_cvar_at(), rb_autoload(), rb_class_boot(), rb_const_set(), rb_cvar_set(), rb_include_class_new(), rb_iseq_build_from_ary(), rb_ivar_set(), rb_mod_const_at(), rb_mod_init_copy(), rb_module_new(), rb_obj_freeze(), rb_obj_singleton_methods(), rb_prepend_module(), rb_singleton_class_attached(), rb_singleton_class_clone_and_attach(), rb_thread_local_aset(), rb_waitpid(), reachable_objects_from(), socklist_insert(), vm_init_redefined_flag(), and wmap_allocate().
st_table* st_init_numtable_with_size | ( | st_index_t | size | ) |
Definition at line 278 of file st.c.
References st_init_table_with_size(), and type_numhash.
Referenced by Init_sym().
st_table* st_init_strcasetable | ( | void | ) |
Definition at line 296 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 302 of file st.c.
References st_init_table_with_size().
st_table* st_init_strtable | ( | void | ) |
Definition at line 284 of file st.c.
References st_init_table().
Referenced by Init_load(), load_lock(), ruby_init_ext(), and zone_str().
st_table* st_init_strtable_with_size | ( | st_index_t | size | ) |
Definition at line 290 of file st.c.
References st_init_table_with_size().
st_table* st_init_table | ( | const struct st_hash_type * | type | ) |
Definition at line 266 of file st.c.
References st_init_table_with_size().
Referenced by rb_hash_tbl(), 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 229 of file st.c.
References st_table::bins, st_table::entries_packed, getenv(), st_table::head, MAX_PACKED_HASH, new_size(), st_table::num_bins, st_table::num_entries, size, st_alloc_bins, st_alloc_table, ST_DEFAULT_PACKED_TABLE_SIZE, st_table::tail, st_table::type, and type.
Referenced by Init_sym(), rb_hash_rehash(), st_init_numtable_with_size(), st_init_strcasetable_with_size(), st_init_strtable_with_size(), and st_init_table().
Definition at line 564 of file st.c.
References add_direct(), add_packed_direct(), do_hash, st_table::entries_packed, FIND_ENTRY, find_packed_index(), i, PVAL_SET, real_entries, and st_table_entry::record.
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 595 of file st.c.
References add_direct(), add_packed_direct(), do_hash, st_table::entries_packed, FIND_ENTRY, find_packed_index(), i, key, PVAL_SET, real_entries, and st_table_entry::record.
Definition at line 414 of file st.c.
References do_hash, st_table::entries_packed, find_entry(), find_packed_index(), i, st_table::num_bins, PVAL, real_entries, and st_table_entry::record.
Definition at line 342 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(), vm_memsize(), and wmap_memsize().
Definition at line 1575 of file st.c.
Referenced by STATIC_ASSERT().
st_index_t st_numhash | ( | st_data_t | n | ) |
Definition at line 1581 of file st.c.
Referenced by STATIC_ASSERT().
|
inlinestatic |
int st_update | ( | st_table * | table, |
st_data_t | key, | ||
st_update_callback_func * | func, | ||
st_data_t | arg | ||
) |
Definition at line 839 of file st.c.
References add_direct(), add_packed_direct(), st_table::bins, do_hash, st_table::entries_packed, FIND_ENTRY, find_packed_index(), st_table_entry::fore, i, st_table_entry::key, key, last, st_table_entry::next, st_table::num_bins, PKEY, PVAL, PVAL_SET, real_entries, st_table_entry::record, remove_entry(), remove_packed_entry(), ST_CONTINUE, ST_DELETE, and st_free_entry.
Referenced by kwmerge_i(), load_unlock(), ruby_init_ext(), wmap_finalize(), and zone_str().
STATIC_ASSERT | ( | st_packed_entry | , |
sizeof(st_packed_entry) | = = sizeof(st_table_entry*[PACKED_UNIT]) |
||
) |
Definition at line 42 of file st.c.
References st_numcmp(), and st_numhash().
|
static |
Definition at line 1555 of file st.c.
References FNV1_32A_INIT, and FNV_32_PRIME.
|
static |
Definition at line 1498 of file st.c.
References FNV1_32A_INIT, st_hash(), and strlen().
|
static |
Definition at line 512 of file st.c.
References st_table::as, st_table_entry::back, st_table::bins, st_table::entries_packed, st_table_entry::fore, st_packed_entry::hash, hash(), st_table::head, i, st_packed_entry::key, key, MAX_PACKED_HASH, MEMCPY, MEMZERO, new_entry(), NULL, st_table::num_bins, st_table::packed, PACKED_BINS, ST_DEFAULT_INIT_TABLE_SIZE, st_realloc_bins(), st_table::tail, st_packed_entry::val, and val.
Referenced by add_packed_direct().
|
static |