Ruby
2.1.10p492(2016-04-01revision54464)
|
#include "ruby/defines.h"
Go to the source code of this file.
Data Structures | |
struct | st_hash_type |
struct | st_table |
Macros | |
#define | ST_DATA_T_DEFINED |
#define | CHAR_BIT 8 |
#define | SIZEOF_ST_INDEX_T SIZEOF_VOIDP |
#define | ST_INDEX_BITS (sizeof(st_index_t) * CHAR_BIT) |
#define | ST_DATA_COMPATIBLE_P(type) 0 |
#define | st_is_member(table, key) st_lookup((table),(key),(st_data_t *)0) |
#define | st_strcasecmp st_locale_insensitive_strcasecmp |
#define | st_strncasecmp st_locale_insensitive_strncasecmp |
#define | st_hash_start(h) ((st_index_t)(h)) |
Typedefs | |
typedef struct st_table | st_table |
typedef st_data_t | st_index_t |
typedef int | st_compare_func(st_data_t, st_data_t) |
typedef st_index_t | st_hash_func(st_data_t) |
typedef char | st_check_for_sizeof_st_index_t[SIZEOF_VOIDP==(int) sizeof(st_index_t) ? 1 :-1] |
typedef int | st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing) |
Enumerations | |
enum | st_retval { ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK } |
Variables | |
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long | st_data_t |
#define ST_DATA_COMPATIBLE_P | ( | type | ) | 0 |
Definition at line 66 of file st.h.
Referenced by rb_hash_keys(), and rb_hash_values().
#define st_hash_start | ( | h | ) | ((st_index_t)(h)) |
Definition at line 143 of file st.h.
Referenced by rb_hash_start().
#define ST_INDEX_BITS (sizeof(st_index_t) * CHAR_BIT) |
#define st_strcasecmp st_locale_insensitive_strcasecmp |
#define st_strncasecmp st_locale_insensitive_strncasecmp |
typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP==(int) sizeof(st_index_t) ? 1 :-1] |
typedef st_index_t st_hash_func(st_data_t) |
typedef st_data_t st_index_t |
enum st_retval |
Definition at line 629 of file st.c.
References add_direct(), add_packed_direct(), do_hash, st_table::entries_packed, key, and st_table::num_bins.
Referenced by define_final0(), generic_ivar_set(), make_transcoder_entry(), make_unique_str(), method_entry_i(), move_refined_method(), rb_alias_variable(), rb_autoload(), rb_copy_generic_ivar(), 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 830 of file st.c.
References st_table::bins, st_table::entries_packed, 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 * | ) |
Definition at line 308 of file st.c.
References st_table::bins, st_table::entries_packed, st_table::head, 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(), st_free_table(), and trace_object_allocations_clear().
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 rb_copy_generic_ivar(), rb_hash_dup(), rb_hash_initialize_copy(), rb_hash_s_create(), rb_hash_to_h(), and rb_st_copy().
Referenced by autoload_delete(), constat_delete(), delete_unique_str(), find_class_path(), flatten(), freeobj_i(), generic_ivar_remove(), r_fixup_compat(), rb_ary_and(), rb_const_remove(), rb_const_set(), rb_cvar_get(), rb_cvar_set(), rb_execarg_fixup(), rb_free_generic_ivar(), rb_hash_delete_key(), rb_mod_init_copy(), rb_mod_remove_cvar(), rb_obj_remove_instance_variable(), rb_objspace_call_finalizer(), rb_str_free(), rb_undefine_finalizer(), rb_waitpid(), remove_method(), run_final(), socklist_delete(), st_delete_wrap(), unknown_keyword_error(), and wmap_finalize().
Referenced by rb_hash_delete_key().
Definition at line 1034 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, 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_data_t, ST_DELETE, st_free_entry, ST_STOP, and val.
Referenced by class_instance_method_list(), clear_coverage(), collect_values_of_values(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), enc_names(), exit_handler(), fc_i(), get_loaded_features_index(), include_modules_at(), Init_String(), mark_const_tbl(), mark_hash(), mark_m_tbl_wrapper(), mark_marshal_compat_t(), mark_set(), mark_tbl(), object_allocations_reporter(), proc_waitall(), 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_foreach_name(), rb_enc_name_list(), rb_execarg_extract_options(), rb_execarg_fixup(), rb_extract_keywords(), rb_feature_p(), rb_free_const_table(), rb_free_m_tbl(), rb_local_constants(), rb_mod_init_copy(), rb_obj_singleton_methods(), rb_objspace_call_finalizer(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), rb_st_copy(), 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(), rgengc_unprotect_logging_exit_func(), thgroup_list(), trace_object_allocations_clear(), transcode_search_path(), validate_labels(), wmap_each(), wmap_each_key(), wmap_each_value(), wmap_free(), wmap_inspect(), wmap_keys(), wmap_mark(), wmap_memsize(), and wmap_values().
Definition at line 942 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, 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_data_t, 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 * | ) |
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_tbl(), 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().
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 1429 of file st.c.
References CHAR_BIT, murmur_finish(), murmur_step, MurmurMagic, SIZEOF_ST_INDEX_T, st_data_t, t(), and UNALIGNED_ADD_ALL.
st_index_t st_hash_end | ( | st_index_t | h | ) |
Definition at line 1593 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 1556 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(), compat_allocator_table(), constat_handle(), fiber_init(), find_class_path(), flatten(), generic_ivar_set(), get_traceobj_arg(), init_enc2cp(), Init_Exception(), Init_heap(), 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_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_obj_freeze(), rb_obj_singleton_methods(), rb_singleton_class_attached(), rb_singleton_class_clone_and_attach(), rb_waitpid(), RCLASS_M_TBL_INIT(), reachable_objects_from(), ruby_register_rollback_func_for_ensure(), socklist_insert(), threadptr_local_aset(), vm_init_redefined_flag(), and wmap_allocate().
st_table* st_init_numtable_with_size | ( | st_index_t | ) |
Definition at line 278 of file st.c.
References size, 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(), and type_strcasehash.
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 | ) |
Definition at line 302 of file st.c.
References size, st_init_table_with_size(), and type_strcasehash.
st_table* st_init_strtable | ( | void | ) |
Definition at line 284 of file st.c.
References st_init_table(), and type_strhash.
Referenced by get_traceobj_arg(), Init_load(), load_lock(), rb_gc_unprotect_logging(), ruby_init_ext(), and zone_str().
st_table* st_init_strtable_with_size | ( | st_index_t | ) |
Definition at line 290 of file st.c.
References size, st_init_table_with_size(), and type_strhash.
st_table* st_init_table | ( | const struct st_hash_type * | ) |
Definition at line 266 of file st.c.
References st_init_table_with_size(), and type.
Referenced by hash_tbl(), rb_fstring(), st_init_numtable(), st_init_strcasetable(), and st_init_strtable().
st_table* st_init_table_with_size | ( | const struct st_hash_type * | , |
st_index_t | |||
) |
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().
Referenced by add_opt_method(), clone_const(), constat_handle(), cv_i(), delete_unique_str(), enc_register_at(), enc_set_default_encoding(), features_index_add_single(), flatten(), generic_ivar_set(), Init_VM(), insn_make_insn_table(), iseq_compile_each(), iseq_load(), load_lock(), make_unique_str(), newobj_i(), obj_alloc_by_klass(), ole_vstr2wc(), r_entry0(), r_prepare(), r_symreal(), rb_autoload(), rb_const_set(), rb_copy_generic_ivar(), rb_execarg_fixup(), rb_gc_copy_finalizer(), rb_gc_unprotect_logging(), rb_hash_rehash_i(), rb_marshal_define_compat(), rb_method_entry_make(), rb_obj_freeze(), rb_st_insert_id_and_value(), rb_thread_atfork_internal(), rb_waitpid(), reachable_object_from_i(), register_label(), ruby_register_rollback_func_for_ensure(), socklist_insert(), sv_i(), thread_create_core(), threadptr_local_aset(), val2dispatch(), w_encoding(), w_object(), and wmap_aset().
Referenced by enc_alias_internal().
st_index_t st_keys | ( | st_table * | table, |
st_data_t * | keys, | ||
st_index_t | size | ||
) |
Definition at line 1130 of file st.c.
References get_keys(), and size.
st_index_t st_keys_check | ( | st_table * | table, |
st_data_t * | keys, | ||
st_index_t | size, | ||
st_data_t | never | ||
) |
Definition at line 1136 of file st.c.
References get_keys(), and size.
Referenced by rb_hash_keys().
Referenced by add_opt_method(), autoload_data(), autoload_defined_p(), autoload_delete(), classname(), constat_handle(), constat_reset(), cv_i(), cvar_lookup_at(), define_final0(), delete_unique_str(), eql_i(), fc_path(), features_index_add_single(), flatten(), freeobj_i(), generic_ivar_defined(), generic_ivar_get(), generic_ivar_remove(), generic_ivar_set(), get_syserr(), get_transcoder_entry(), iseq_build_from_ary_body(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), load_lock(), lookup_allocation_info(), lookup_method_table(), lookup_rollback_func(), make_transcoder_entry(), make_unique_str(), method_entry_i(), newobj_i(), obj_alloc_by_klass(), ole_vstr2wc(), r_entry0(), r_fixup_compat(), r_object0(), r_symlink(), rb_alias_variable(), rb_ary_diff(), rb_autoload(), rb_check_id(), rb_check_id_cstr(), rb_class_path_cached(), rb_const_defined_0(), rb_const_get_0(), rb_const_set(), rb_copy_generic_ivar(), rb_econv_asciicompat_encoding(), rb_enc_registered(), rb_f_untrace_var(), rb_feature_p(), rb_gc_copy_finalizer(), rb_gc_unprotect_logging(), rb_generic_ivar_memsize(), rb_generic_ivar_table(), rb_global_entry(), rb_hash_aref(), rb_hash_fetch_m(), rb_hash_has_key(), rb_hash_lookup2(), rb_id2str(), rb_intern3(), rb_intern_str(), rb_ivar_count(), rb_ivar_defined(), rb_ivar_foreach(), rb_ivar_lookup(), rb_ivar_set(), rb_mark_generic_ivar(), rb_method_entry_make(), rb_obj_frozen_p(), rb_obj_remove_instance_variable(), rb_thread_key_p(), rb_thread_variable_p(), rb_tmp_class_path(), rb_vm_check_redefinition_opt_method(), register_label(), remove_method(), set_const_visibility(), set_syserr(), socklist_lookup(), sv_i(), syserr_initialize(), threadptr_local_aref(), transcode_search_path(), transcode_search_path_i(), val2dispatch(), vm_get_ev_const(), vm_getivar(), vm_setivar(), w_class(), w_encoding(), w_object(), w_symbol(), and wmap_aref().
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(), obj_memsize_of(), rb_generic_ivar_memsize(), thread_memsize(), vm_memsize(), and wmap_memsize().
Definition at line 1685 of file st.c.
Referenced by STATIC_ASSERT().
st_index_t st_numhash | ( | st_data_t | ) |
Definition at line 1691 of file st.c.
Referenced by STATIC_ASSERT().
Referenced by rb_hash_shift().
int st_update | ( | st_table * | table, |
st_data_t | key, | ||
st_update_callback_func * | func, | ||
st_data_t | arg | ||
) |
Definition at line 867 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, 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_data_t, ST_DELETE, and st_free_entry.
Referenced by kwmerge_i(), load_unlock(), rb_ary_or(), rb_fstring(), ruby_init_ext(), tbl_update(), wmap_aset(), wmap_finalize(), and zone_str().
st_index_t st_values | ( | st_table * | table, |
st_data_t * | values, | ||
st_index_t | size | ||
) |
Definition at line 1171 of file st.c.
References get_values(), and size.
st_index_t st_values_check | ( | st_table * | table, |
st_data_t * | values, | ||
st_index_t | size, | ||
st_data_t | never | ||
) |
Definition at line 1177 of file st.c.
References get_values(), and size.
Referenced by rb_hash_values().
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t |
Definition at line 20 of file st.h.
Referenced by add_opt_method(), autoload_data(), autoload_defined_p(), autoload_delete(), class_instance_method_list(), classname(), clone_const(), constat_delete(), constat_handle(), constat_reset(), cv_i(), cvar_lookup_at(), define_final0(), delete_unique_str(), enc_alias_internal(), enc_dup_name(), enc_names(), enc_register_at(), enc_set_default_encoding(), eql_i(), fc_i(), fc_path(), features_index_add_single(), find_class_path(), flatten(), freeobj_i(), generic_ivar_defined(), generic_ivar_get(), generic_ivar_remove(), generic_ivar_set(), get_keys(), get_syserr(), get_transcoder_entry(), get_values(), hash_foreach_call(), hash_foreach_ensure(), include_modules_at(), Init_VM(), Init_w32_codepage(), iseq_build_from_ary_body(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), kwmerge_i(), load_lock(), load_unlock(), lookup_allocation_info(), lookup_method_table(), lookup_rollback_func(), make_transcoder_entry(), make_unique_str(), mark_const_tbl(), mark_hash(), mark_m_tbl_wrapper(), mark_set(), mark_tbl(), mod_cvar_at(), move_refined_method(), newobj_i(), obj_alloc_by_klass(), obj_ivar_each(), object_allocations_reporter(), ole_vstr2wc(), onig_st_insert_strend(), onig_st_lookup_strend(), parse_exp(), r_copy_ivar(), r_entry0(), r_fixup_compat(), r_object0(), r_prepare(), r_symlink(), r_symreal(), rb_alias_variable(), rb_ary_and(), rb_ary_or(), rb_autoload(), rb_check_deadlock(), rb_check_exec_env(), rb_check_exec_options(), rb_check_id(), rb_check_id_cstr(), rb_class_path_cached(), rb_clear_trace_func(), rb_const_defined_0(), rb_const_get_0(), rb_const_remove(), rb_const_set(), rb_copy_generic_ivar(), rb_cvar_get(), rb_cvar_set(), rb_econv_asciicompat_encoding(), rb_enc_aliases(), rb_enc_name_list(), rb_enc_registered(), rb_execarg_extract_options(), rb_execarg_fixup(), rb_extract_keywords(), rb_f_untrace_var(), rb_feature_p(), rb_free_generic_ivar(), rb_fstring(), rb_gc_copy_finalizer(), rb_gc_unprotect_logging(), rb_generic_ivar_memsize(), rb_generic_ivar_table(), rb_get_kwargs(), rb_global_entry(), rb_hash_aref(), rb_hash_delete_key(), rb_hash_fetch_m(), rb_hash_lookup2(), rb_hash_rehash_i(), rb_id2str(), rb_intern3(), rb_intern_str(), rb_ivar_count(), rb_ivar_defined(), rb_ivar_foreach(), rb_ivar_lookup(), rb_ivar_set(), rb_mark_generic_ivar(), rb_marshal_define_compat(), rb_method_entry_make(), rb_mod_const_at(), rb_mod_init_copy(), rb_mod_remove_cvar(), rb_obj_freeze(), rb_obj_remove_instance_variable(), rb_obj_singleton_methods(), rb_objspace_call_finalizer(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), rb_st_copy(), rb_st_insert_id_and_value(), rb_str_free(), rb_thread_atfork_internal(), rb_thread_terminate_all(), rb_tmp_class_path(), rb_undefine_finalizer(), rb_vm_check_redefinition_by_prepend(), rb_vm_check_redefinition_opt_method(), rb_waitpid(), reachable_objects_from(), register_init_ext(), register_label(), register_symid_str(), remove_method(), ruby_init_ext(), ruby_register_rollback_func_for_ensure(), run_final(), set_const_visibility(), set_syserr(), socklist_delete(), socklist_insert(), socklist_lookup(), st_foreach(), st_foreach_check(), st_foreach_safe(), st_hash(), st_update(), sv_i(), syserr_initialize(), tbl_update(), thgroup_list(), thread_create_core(), threadptr_local_aref(), time_mload(), transcode_search_path(), transcode_search_path_i(), unknown_keyword_error(), unpack_entries(), val2dispatch(), validate_labels(), vm_get_ev_const(), vm_getivar(), vm_setivar(), w_class(), w_encoding(), w_ivar(), w_object(), w_objivar(), w_symbol(), wmap_aref(), wmap_aset(), wmap_aset_update(), wmap_each(), wmap_each_key(), wmap_each_value(), wmap_final_func(), wmap_finalize(), wmap_keys(), wmap_mark(), wmap_memsize(), wmap_values(), zone_str(), and zone_str_update().