Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "internal.h"
#include "ruby/st.h"
#include "ruby/util.h"
#include "id_table.h"
#include "constant.h"
#include "id.h"
#include "ccan/list/list.h"
Go to the source code of this file.
Data Structures | |
struct | gen_ivtbl |
struct | ivar_update |
struct | fc_result |
struct | trace_var |
struct | rb_global_variable |
struct | trace_data |
struct | gen_ivar_compat_tbl |
struct | obj_ivar_tag |
struct | gen_ivar_tag |
struct | givar_copy |
struct | autoload_state |
struct | autoload_data_i |
struct | autoload_const_set_args |
Macros | |
#define | rb_is_constant_id rb_is_const_id |
#define | rb_is_constant_name rb_is_const_name |
#define | id_for_var(obj, name, part, type) id_for_var_message(obj, name, type, "`%1$s' is not allowed as "#part" "#type" variable name") |
#define | id_for_var_message(obj, name, type, message) check_id_type(obj, &(name), rb_is_##type##_id, rb_is_##type##_name, message, strlen(message)) |
#define | check_autoload_table(av) (struct st_table *)rb_check_typeddata((av), &autoload_data_type) |
#define | check_autoload_data(av) (struct autoload_data_i *)rb_check_typeddata((av), &autoload_data_i_type) |
#define | CVAR_FOREACH_ANCESTORS(klass, v, r) |
#define | CVAR_LOOKUP(v, r) |
Typedefs | |
typedef VALUE(* | path_cache_func) (VALUE obj, VALUE name) |
Variables | |
struct rb_id_table * | rb_global_tbl |
static ID | autoload |
static ID | classpath |
static ID | tmp_classpath |
static ID | classid |
static st_table * | generic_iv_tbl |
static st_table * | generic_iv_tbl_compat |
static const rb_data_type_t | autoload_data_type |
static const rb_data_type_t | autoload_data_i_type |
#define check_autoload_data | ( | av | ) | (struct autoload_data_i *)rb_check_typeddata((av), &autoload_data_i_type) |
Definition at line 1929 of file variable.c.
Referenced by check_autoload_required(), const_tbl_update(), rb_autoload_load(), rb_autoload_p(), and rb_autoloading_value().
#define check_autoload_table | ( | av | ) | (struct st_table *)rb_check_typeddata((av), &autoload_data_type) |
Definition at line 1872 of file variable.c.
Referenced by autoload_data(), autoload_delete(), and rb_autoload_str().
#define CVAR_FOREACH_ANCESTORS | ( | klass, | |
v, | |||
r | |||
) |
Definition at line 2876 of file variable.c.
#define CVAR_LOOKUP | ( | v, | |
r | |||
) |
Definition at line 2883 of file variable.c.
Referenced by rb_cvar_defined(), rb_cvar_get(), and rb_cvar_set().
#define id_for_var | ( | obj, | |
name, | |||
part, | |||
type | |||
) | id_for_var_message(obj, name, type, "`%1$s' is not allowed as "#part" "#type" variable name") |
Definition at line 1692 of file variable.c.
Referenced by rb_mod_remove_const(), and rb_obj_remove_instance_variable().
#define id_for_var_message | ( | obj, | |
name, | |||
type, | |||
message | |||
) | check_id_type(obj, &(name), rb_is_##type##_id, rb_is_##type##_name, message, strlen(message)) |
Definition at line 1694 of file variable.c.
Referenced by rb_mod_remove_cvar().
#define rb_is_constant_id rb_is_const_id |
Definition at line 1690 of file variable.c.
#define rb_is_constant_name rb_is_const_name |
Definition at line 1691 of file variable.c.
Definition at line 2101 of file variable.c.
References check_before_mod_set(), const_tbl_update(), autoload_const_set_args::id, autoload_const_set_args::mod, and autoload_const_set_args::value.
Referenced by autoload_reset().
Definition at line 1876 of file variable.c.
References autoload, check_autoload_table, RCLASS_IV_TBL, st_data_t, st_lookup, and val.
Referenced by check_autoload_required(), const_tbl_update(), and rb_autoloading_value().
Definition at line 2082 of file variable.c.
References NULL, Qundef, rb_autoloading_value(), rb_const_lookup(), and rb_const_entry_struct::value.
Referenced by rb_autoload_load(), and rb_autoload_p().
Definition at line 1991 of file variable.c.
References autoload, check_autoload_table, id, st_table::num_entries, RCLASS_IV_TBL, st_data_t, st_delete, st_lookup, and val.
Referenced by const_tbl_update(), and rb_const_remove().
|
static |
Definition at line 1854 of file variable.c.
References st_free_table.
|
static |
Definition at line 1910 of file variable.c.
References autoload_data_i::feature, rb_gc_mark(), and autoload_data_i::value.
|
static |
Definition at line 1918 of file variable.c.
|
static |
Definition at line 1848 of file variable.c.
References rb_mark_tbl().
|
static |
Definition at line 1860 of file variable.c.
References st_memsize().
Definition at line 2008 of file variable.c.
References rb_feature_provided().
Referenced by check_autoload_required().
Definition at line 2112 of file variable.c.
References autoload_state::ele, autoload_data_i::feature, rb_funcall(), rb_intern, rb_vm_top_self(), and autoload_state::result.
Referenced by rb_autoload_load().
Definition at line 2124 of file variable.c.
References autoload_const_set(), autoload_state::ele, autoload_state::head, autoload_state::id, autoload_const_set_args::id, autoload_state::mod, autoload_const_set_args::mod, autoload_state::node, Qfalse, Qundef, rb_ensure(), rb_safe_level(), rb_set_safe_level_force(), rb_thread_wakeup_alive(), reset_safe(), autoload_state::result, RTEST, autoload_data_i::safe_level, autoload_data_i::state, autoload_state::thread, autoload_data_i::value, autoload_const_set_args::value, and autoload_state::waitq.
Referenced by rb_autoload_load().
Definition at line 2170 of file variable.c.
References Qfalse, rb_thread_sleep_deadly(), and autoload_state::thread.
Referenced by rb_autoload_load().
Definition at line 2186 of file variable.c.
References autoload_state::node, Qfalse, rb_thread_to_be_killed(), autoload_state::thread, and autoload_state::waitq.
Referenced by rb_autoload_load().
Definition at line 2022 of file variable.c.
References autoload_data(), autoload_provided(), check_autoload_data, Check_Type, autoload_data_i::feature, rb_eArgError, rb_ensure(), rb_raise(), rb_safe_level(), rb_set_safe_level_force(), rb_thread_current(), reset_safe(), RSTRING_LEN, RSTRING_PTR, autoload_data_i::state, T_STRING, and autoload_state::thread.
Referenced by rb_autoload_load(), rb_autoload_p(), and rb_const_defined_0().
Definition at line 2610 of file variable.c.
References rb_check_frozen.
Referenced by autoload_const_set(), rb_const_set(), and rb_cvar_set().
|
static |
Definition at line 1697 of file variable.c.
References id, rb_check_id(), rb_fstring_new(), and rb_name_err_raise_str.
Returns +classpath+ of klass, if it is named, or +nil+ for anonymous +class+/+module+.
The last part of named +classpath+ is never anonymous, but anonymous +class+/+module+ names may be contained. If the path is "permanent", that means it has no anonymous names, *permanent
is set to 1.
Definition at line 178 of file variable.c.
References classid, classpath, find_class_path(), NIL_P, fc_result::path, Qnil, rb_bug(), rb_check_id(), rb_cObject, rb_id2str, RB_TYPE_P, RCLASS_IV_TBL, st_data_t, st_lookup, T_STRING, and tmp_classpath.
Referenced by rb_cmperr(), rb_mod_name(), rb_tmp_class_path(), and ruby_th_dtrace_setup().
|
static |
Definition at line 2671 of file variable.c.
References autoload_data(), autoload_delete(), check_autoload_data, CONST_PUBLIC, rb_const_entry_struct::file, rb_const_entry_struct::flag, autoload_const_set_args::id, rb_const_entry_struct::line, autoload_const_set_args::mod, NIL_P, PRIsVALUE, Qundef, QUOTE_ID, rb_class_name(), rb_clear_constant_cache(), rb_cObject, rb_compile_warn(), rb_id_table_insert(), rb_id_table_lookup(), rb_thread_current(), rb_warn(), RCLASS_CONST_TBL, RSTRING_PTR, setup_const_entry(), autoload_data_i::state, autoload_state::thread, val, rb_const_entry_struct::value, autoload_data_i::value, autoload_const_set_args::value, and ZALLOC.
Referenced by autoload_const_set(), and rb_const_set().
Definition at line 2989 of file variable.c.
References cv_i_update(), key, rb_is_class_id(), ST_CONTINUE, st_data_t, and st_update().
Referenced by mod_cvar_at().
Definition at line 2415 of file variable.c.
References ST_CONTINUE, and ST_STOP.
Definition at line 2957 of file variable.c.
References id, rb_intern, rb_is_class_id(), rb_name_err_raise, and rb_str_new_cstr().
Referenced by rb_cv_get(), rb_cv_set(), and rb_define_class_variable().
Definition at line 3026 of file variable.c.
References ID2SYM, rb_ary_push(), ST_CONTINUE, and sym.
Referenced by cvar_list().
Definition at line 2865 of file variable.c.
References FL_SINGLETON, FL_TEST, rb_ivar_get(), RB_TYPE_P, RCLASS_SUPER, T_CLASS, and T_MODULE.
|
static |
Definition at line 3034 of file variable.c.
References cv_list_i(), st_table::num_entries, rb_ary_new2, st_foreach_safe(), and st_free_table.
Referenced by rb_mod_class_variables().
Definition at line 2858 of file variable.c.
References RCLASS_IV_TBL, st_data_t, and st_lookup.
|
static |
Definition at line 97 of file variable.c.
References fc_path(), ID_TABLE_CONTINUE, ID_TABLE_STOP, key, fc_result::klass, list, fc_result::name, fc_result::path, fc_result::preferred, fc_result::prev, rb_id_table_foreach(), rb_is_const_id(), RB_TYPE_P, RCLASS_CONST_TBL, T_CLASS, T_MODULE, fc_result::track, and rb_const_entry_struct::value.
Referenced by find_class_path().
Definition at line 70 of file variable.c.
References classpath, fc_result::name, OBJ_FREEZE, fc_result::path, fc_result::prev, rb_cObject, rb_id2str, rb_str_append(), rb_str_cat2(), rb_str_dup(), RCLASS_IV_TBL, st_data_t, st_lookup, and fc_result::track.
Referenced by fc_i().
Traverse constant namespace and find +classpath+ for klass.
If preferred is not 0, choice the path whose base name is set to it. If +classpath+ is found, the hidden instance variable classpath is set to the found path, and tmp_classpath is removed. The path is frozen.
Definition at line 144 of file variable.c.
References classpath, fc_i(), fc_result::klass, fc_result::name, fc_result::path, fc_result::preferred, fc_result::prev, Qnil, rb_class_ivar_set(), rb_cObject, rb_id_table_foreach(), RCLASS_CONST_TBL, RCLASS_IV_TBL, st_data_t, st_delete, st_init_numtable, tmp_classpath, and fc_result::track.
Referenced by classname().
Definition at line 951 of file variable.c.
References gen_ivtbl::ivptr, gen_ivar_compat_tbl::ivtbl, gen_ivtbl::numiv, Qundef, st_add_direct, ST_CONTINUE, st_data_t, gen_ivar_compat_tbl::tbl, and val.
Referenced by rb_generic_ivar_table().
Definition at line 1529 of file variable.c.
References gen_ivtbl_resize(), ivar_update::index, ivar_update::iv_extended, ivar_update::iv_index_tbl, givar_copy::iv_index_tbl, iv_index_tbl_extend(), iv_index_tbl_newsize(), gen_ivtbl::ivptr, givar_copy::ivtbl, gen_ivtbl::numiv, givar_copy::obj, Qundef, RB_OBJ_WRITTEN, ST_CONTINUE, ivar_update::u, and val.
Referenced by rb_copy_generic_ivar().
Definition at line 1508 of file variable.c.
References gen_ivar_tag::arg, func, gen_ivar_tag::func, gen_ivar_each_i(), gen_ivtbl_get(), gen_ivar_tag::ivtbl, key, rb_obj_class(), RCLASS_IV_INDEX_TBL, st_data_t, st_foreach_safe(), and val.
Referenced by rb_copy_generic_ivar(), and rb_ivar_foreach().
Definition at line 1494 of file variable.c.
References gen_ivar_tag::arg, gen_ivar_tag::func, gen_ivtbl::ivptr, gen_ivar_tag::ivtbl, gen_ivtbl::numiv, Qundef, ST_CONTINUE, and val.
Referenced by gen_ivar_each().
|
static |
Definition at line 1050 of file variable.c.
Referenced by gen_ivtbl_resize(), and rb_generic_ivar_memsize().
Definition at line 1210 of file variable.c.
References gen_ivtbl::ivptr, gen_ivtbl::numiv, and Qundef.
Referenced by rb_copy_generic_ivar(), and rb_ivar_count().
Definition at line 965 of file variable.c.
References st_data_t, and st_lookup.
Referenced by gen_ivar_each(), generic_ivar_defined(), generic_ivar_delete(), generic_ivar_get(), generic_ivar_remove(), rb_copy_generic_ivar(), rb_generic_ivar_memsize(), rb_generic_ivar_table(), rb_ivar_count(), and rb_mark_generic_ivar().
Definition at line 1163 of file variable.c.
References gen_ivtbl::ivptr, gen_ivtbl::numiv, and rb_gc_mark().
Referenced by rb_mark_generic_ivar().
Definition at line 1056 of file variable.c.
References gen_ivtbl_bytes(), gen_ivtbl::ivptr, len, memcpy, gen_ivtbl::numiv, Qundef, xmalloc, and xrealloc.
Referenced by gen_ivar_copy(), generic_ivar_update(), and rb_copy_generic_ivar().
Definition at line 1124 of file variable.c.
References gen_ivtbl_get(), gen_ivtbl::ivptr, gen_ivtbl::numiv, Qfalse, Qtrue, Qundef, rb_obj_class(), RCLASS_IV_INDEX_TBL, st_data_t, and st_lookup.
Referenced by rb_ivar_defined().
Definition at line 1009 of file variable.c.
References gen_ivtbl_get(), gen_ivtbl::ivptr, gen_ivtbl::numiv, Qundef, rb_obj_class(), RCLASS_IV_INDEX_TBL, st_data_t, and st_lookup.
Referenced by rb_ivar_delete().
Definition at line 1030 of file variable.c.
References gen_ivtbl_get(), gen_ivtbl::ivptr, gen_ivtbl::numiv, Qundef, rb_obj_class(), RCLASS_IV_INDEX_TBL, st_data_t, and st_lookup.
Referenced by rb_ivar_lookup().
Definition at line 1141 of file variable.c.
References gen_ivtbl_get(), gen_ivtbl::ivptr, key, gen_ivtbl::numiv, Qundef, rb_obj_class(), RCLASS_IV_INDEX_TBL, st_data_t, and st_lookup.
Referenced by rb_obj_remove_instance_variable().
Definition at line 1348 of file variable.c.
References generic_ivar_update(), ivar_update::iv_extended, ivar_update::iv_index_tbl, iv_index_tbl_extend(), iv_index_tbl_make(), Qundef, RB_OBJ_WRITTEN, st_data_t, st_update(), ivar_update::u, and val.
Referenced by rb_ivar_set().
Definition at line 1096 of file variable.c.
References FL_EXIVAR, FL_SET, gen_ivtbl_resize(), ivar_update::index, iv_index_tbl_newsize(), ivar_update::ivtbl, gen_ivtbl::numiv, ST_CONTINUE, st_data_t, ST_STOP, and ivar_update::u.
Referenced by generic_ivar_set().
Definition at line 600 of file variable.c.
References ALLOCA_N, buf, id, len, memcpy, rb_intern, rb_intern2(), and strlen().
Referenced by rb_define_hooked_variable(), rb_gv_get(), and rb_gv_set().
|
static |
Definition at line 866 of file variable.c.
References ID2SYM, ID_TABLE_CONTINUE, and rb_ary_push().
Referenced by rb_f_global_variables().
void Init_var_tables | ( | void | ) |
Definition at line 48 of file variable.c.
References autoload, classid, classpath, rb_global_tbl, rb_id_table_create(), rb_intern_const, st_init_numtable, and tmp_classpath.
|
static |
Definition at line 1334 of file variable.c.
References id, ivar_update::index, ivar_update::iv_extended, ivar_update::iv_index_tbl, st_table::num_entries, rb_eArgError, rb_raise(), st_add_direct, st_data_t, st_lookup, and ivar_update::u.
Referenced by gen_ivar_copy(), generic_ivar_set(), and rb_ivar_set().
Definition at line 1321 of file variable.c.
References rb_obj_class(), RCLASS_IV_INDEX_TBL, and st_init_numtable.
Referenced by generic_ivar_set(), rb_copy_generic_ivar(), and rb_ivar_set().
|
static |
Definition at line 1083 of file variable.c.
References ivar_update::index, ivar_update::iv_extended, ivar_update::iv_index_tbl, st_table::num_entries, and ivar_update::u.
Referenced by gen_ivar_copy(), generic_ivar_update(), and rb_ivar_set().
Definition at line 288 of file variable.c.
References make_temporary_path(), rb_ivar_set(), and tmp_classpath.
Referenced by rb_class2name(), rb_class_path(), rb_set_class_path(), and rb_set_class_path_string().
Definition at line 1652 of file variable.c.
References ID2SYM, key, rb_ary_push(), rb_is_instance_id(), and ST_CONTINUE.
Referenced by rb_obj_instance_variables().
Definition at line 2483 of file variable.c.
References ID2SYM, rb_ary_push(), RB_CONST_PUBLIC_P, ST_CONTINUE, and sym.
Referenced by rb_const_list().
Definition at line 238 of file variable.c.
References OBJ_FREEZE, fc_result::path, PRIsVALUE, Qfalse, Qnil, and rb_sprintf().
Referenced by ivar_cache(), and null_cache().
|
static |
Definition at line 577 of file variable.c.
References trace_var::data, rb_global_variable::data, ID_TABLE_CONTINUE, rb_global_variable::marker, trace_var::next, rb_gc_mark_maybe(), rb_global_variable::trace, and rb_global_entry::var.
Referenced by rb_gc_mark_global_tbl().
|
static |
Definition at line 3001 of file variable.c.
References cv_i(), RCLASS_IV_TBL, st_data_t, st_foreach_safe(), and st_init_numtable.
Referenced by mod_cvar_of(), and rb_mod_class_variables().
|
static |
Definition at line 3014 of file variable.c.
References mod, mod_cvar_at(), and RCLASS_SUPER.
Referenced by rb_mod_class_variables().
NORETURN | ( | static void | uninitialized_constantVALUE, VALUE | ) |
Referenced by rb_obj_remove_instance_variable().
Definition at line 303 of file variable.c.
References make_temporary_path().
Referenced by rb_class_path_no_cache().
Definition at line 1471 of file variable.c.
References obj_ivar_tag::arg, func, obj_ivar_tag::func, key, obj_ivar_tag::obj, obj_ivar_i(), ROBJECT_IV_INDEX_TBL, st_data_t, st_foreach_safe(), and val.
Referenced by rb_ivar_foreach().
Definition at line 1458 of file variable.c.
References obj_ivar_tag::arg, obj_ivar_tag::func, obj_ivar_tag::obj, Qundef, ROBJECT_IVPTR, ROBJECT_NUMIV, ST_CONTINUE, and val.
Referenced by obj_ivar_each().
Definition at line 2850 of file variable.c.
References RB_TYPE_P, RBASIC, and T_ICLASS.
Referenced by rb_cvar_get(), and rb_cvar_set().
Definition at line 911 of file variable.c.
References ALLOC, rb_global_variable::block_trace, rb_global_variable::counter, rb_global_entry::id, trace_var::next, rb_eRuntimeError, rb_global_entry(), rb_global_tbl, rb_id_table_insert(), rb_id_table_lookup(), rb_raise(), rb_global_variable::trace, rb_global_entry::var, and xfree().
Referenced by Init_load(), and m_core_set_variable_alias().
Definition at line 1315 of file variable.c.
References Qnil, and rb_ivar_delete().
Definition at line 1273 of file variable.c.
References Qnil, and rb_ivar_lookup().
Referenced by adjust_backtrace_in_eval(), append_method(), call_verify_certificate_identity(), ecerr_destination_encoding(), ecerr_destination_encoding_name(), ecerr_error_bytes(), ecerr_error_char(), ecerr_incomplete_input(), ecerr_readagain_bytes(), ecerr_source_encoding(), ecerr_source_encoding_name(), exc_backtrace(), exc_backtrace_locations(), exc_cause(), exc_equal(), exc_setup_cause(), exc_to_s(), exit_status(), exit_success_p(), gzfile_error_inspect(), ignore_closed_stream(), inspect_enumerator(), lazy_init_yielder(), lazy_zip_arrays_func(), lazy_zip_func(), loop_stop(), mustbe_callable(), name_err_local_variables(), name_err_name(), name_err_receiver(), nometh_err_args(), nometh_err_private_call_p(), ossl_asn1_get_asn1type(), ossl_call_client_cert_cb(), ossl_call_session_remove_cb(), ossl_cipher_is_authenticated(), ossl_cipher_update(), ossl_ssl_initialize(), ossl_ssl_read_internal(), ossl_ssl_setup(), ossl_ssl_verify_callback(), ossl_ssl_write_internal(), ossl_sslctx_add_extra_chain_cert_i(), ossl_sslctx_setup(), ossl_start_ssl(), ossl_x509attr_set_value(), private_iv_get(), process_options(), pst_pid(), rb_error_frozen_object(), rb_mod_refine(), rb_mod_to_s(), rb_refinement_module_get_refined_class(), rb_singleton_class_has_metaclass_p(), rb_singleton_class_internal_p(), rb_syntax_error_append(), readline_attempted_completion_function(), readline_s_get_completion_case_fold(), readline_s_get_completion_proc(), readline_s_set_output(), reg_compile_gen(), ruby_th_dtrace_setup(), setup_exception(), sliceafter_i(), slicebefore_i(), slicewhen_i(), sockopt_data(), sockopt_family_m(), sockopt_level(), sockopt_optname(), ssl_renegotiation_cb(), stop_result(), struct_ivar_get(), syserr_eqq(), syserr_errno(), uncaught_throw_to_s(), used_modules_i(), using_module_recursive(), vm_call0_body(), vm_getivar(), and writer().
Definition at line 1933 of file variable.c.
References rb_autoload_str(), rb_eArgError, rb_fstring_cstr(), and rb_raise().
Definition at line 2198 of file variable.c.
References autoload_defined_p(), autoload_require(), autoload_reset(), autoload_sleep(), autoload_sleep_done(), check_autoload_data, check_autoload_required(), autoload_state::ele, autoload_state::head, id, autoload_state::id, mod, autoload_state::mod, autoload_state::node, Qfalse, rb_ensure(), RB_GC_GUARD, rb_sourcefile(), rb_thread_current(), result, autoload_data_i::state, autoload_state::thread, and autoload_state::waitq.
Referenced by rb_const_search(), and vm_get_ev_const().
Definition at line 2248 of file variable.c.
References autoload_defined_p(), check_autoload_data, check_autoload_required(), autoload_data_i::feature, Qnil, and RCLASS_SUPER.
Referenced by rb_mod_autoload_p().
Definition at line 1942 of file variable.c.
References autoload, check_autoload_table, Check_Type, DATA_PTR, autoload_data_i::feature, FL_TAINT, FL_UNSET, OBJ_TAINTED, PRIsVALUE, Qnil, Qundef, QUOTE_ID, rb_const_lookup(), rb_const_set(), rb_eArgError, rb_eNameError, rb_fstring(), rb_is_const_id(), RB_OBJ_WRITTEN, rb_raise(), rb_safe_level(), rb_str_dup(), RCLASS_IV_TBL, RSTRING_LEN, autoload_data_i::safe_level, st_add_direct, st_data_t, st_init_numtable, st_insert, st_lookup, autoload_data_i::state, T_STRING, TypedData_Make_Struct, TypedData_Wrap_Struct, rb_const_entry_struct::value, and autoload_data_i::value.
Referenced by rb_autoload(), and rb_mod_autoload().
Definition at line 2062 of file variable.c.
References autoload_data(), check_autoload_data, Qundef, rb_thread_current(), autoload_data_i::state, autoload_state::thread, and autoload_data_i::value.
Referenced by autoload_defined_p(), rb_const_defined_0(), rb_const_search(), and vm_get_ev_const().
Definition at line 449 of file variable.c.
References ivar_cache(), NIL_P, NULL, fc_result::path, rb_class_real(), rb_tmp_class_path(), and RSTRING_PTR.
Referenced by dump_object(), pst_inspect(), rb_clear_method_cache_by_class(), rb_obj_alloc(), rb_obj_classname(), and rb_profile_frame_classpath().
Definition at line 3147 of file variable.c.
References Qundef, RB_OBJ_WRITTEN, RCLASS_IV_TBL, result, st_data_t, and st_insert.
Referenced by find_class_path(), rb_cvar_set(), rb_ivar_set(), and rb_singleton_class_attached().
Definition at line 443 of file variable.c.
References rb_class_path(), and rb_class_real().
Referenced by cannot_be_coerced_into_BigDecimal(), const_tbl_update(), dir_inspect(), exc_inspect(), exc_to_s(), Init_class_hierarchy(), method_inspect(), mString_to_json_raw_object(), name_err_mesg_to_str(), r_object0(), rb_any_to_s(), rb_const_search(), rb_const_warn_if_deprecated(), rb_cvar_get(), rb_cvar_set(), rb_io_inspect(), rb_mod_define_method(), rb_mod_freeze(), rb_mod_initialize_clone(), rb_mod_to_s(), rb_obj_inspect(), rb_threadptr_error_print(), umethod_bind(), w_extended(), and wmap_inspect().
Definition at line 294 of file variable.c.
References ivar_cache(), NIL_P, fc_result::path, rb_str_dup(), and rb_tmp_class_path().
Referenced by class2path(), inspect_enumerator(), inspect_struct(), match_inspect(), ossl_cipher_init(), rb_class_name(), rb_define_class_id_under(), rb_profile_frame_classpath(), rb_thread_current_status(), rb_thread_inspect(), and vm_cref_dump().
Definition at line 318 of file variable.c.
References classpath, Qnil, RCLASS_IV_TBL, st_data_t, st_lookup, and tmp_classpath.
Referenced by newobj_i(), rb_const_set(), and rb_raw_obj_info().
Definition at line 309 of file variable.c.
References NIL_P, null_cache(), fc_result::path, rb_str_dup(), and rb_tmp_class_path().
Referenced by rb_vm_inc_const_missing_count(), and ruby_th_dtrace_setup().
Definition at line 2580 of file variable.c.
References FALSE, rb_const_defined_0(), and TRUE.
Referenced by console_dev(), Init_cparse(), Init_strscan(), rb_define_class(), rb_define_module(), rb_mod_const_defined(), and vm_get_ev_const().
|
static |
Definition at line 2544 of file variable.c.
References BUILTIN_TYPE, check_autoload_required(), Qfalse, Qtrue, Qundef, rb_autoloading_value(), rb_cObject, rb_const_lookup(), RB_CONST_PRIVATE_P, RCLASS_SUPER, T_MODULE, and rb_const_entry_struct::value.
Referenced by rb_const_defined(), rb_const_defined_at(), rb_const_defined_from(), rb_public_const_defined(), rb_public_const_defined_at(), and rb_public_const_defined_from().
Definition at line 2586 of file variable.c.
References FALSE, rb_const_defined_0(), and TRUE.
Referenced by debug_lines(), new_struct(), rb_const_remove(), rb_define_class_id_under(), rb_define_module_id_under(), rb_mod_const_defined(), and vm_search_const_defined_class().
Definition at line 2574 of file variable.c.
References FALSE, rb_const_defined_0(), and TRUE.
Definition at line 2335 of file variable.c.
References FALSE, rb_const_get_0(), and TRUE.
Referenced by console_dev(), cState_from_state_s(), float_arg(), function_call(), generic_to_value(), Init_cparse(), Init_generator(), Init_objspace(), Init_parser(), Init_psych_parser(), process_options(), rb_define_class(), rb_define_module(), rb_execarg_parent_start1(), rb_mod_const_defined(), rb_mod_const_get(), rb_vm_fstring_table(), save_env(), set_argv(), syserr_eqq(), syserr_initialize(), vm_get_ev_const(), vm_set_main_stack(), and with_gvl_callback().
Definition at line 2277 of file variable.c.
References ID2SYM, Qundef, rb_const_missing(), and rb_const_search().
Referenced by rb_const_get(), rb_const_get_at(), rb_const_get_from(), rb_public_const_get(), rb_public_const_get_at(), and rb_public_const_get_from().
Definition at line 2341 of file variable.c.
References FALSE, rb_const_get_0(), and TRUE.
Referenced by debug_lines(), Init_cparse(), mark(), path_unlink(), rb_define_class_id_under(), rb_define_module_id_under(), rb_mod_const_defined(), and rb_mod_const_get().
Definition at line 2329 of file variable.c.
References FALSE, rb_const_get_0(), and TRUE.
VALUE rb_const_list | ( | void * | data | ) |
Definition at line 2492 of file variable.c.
References list_i(), st_table::num_entries, rb_ary_new2, st_foreach_safe(), and st_free_table.
Referenced by rb_mod_constants(), and rb_mod_s_constants().
rb_const_entry_t* rb_const_lookup | ( | VALUE | klass, |
ID | id | ||
) |
Definition at line 3171 of file variable.c.
References rb_id_table_lookup(), RCLASS_CONST_TBL, and val.
Referenced by autoload_defined_p(), rb_autoload_str(), rb_const_defined_0(), rb_const_remove(), rb_const_search(), rb_deprecate_constant(), set_const_visibility(), and vm_get_ev_const().
Definition at line 1794 of file variable.c.
References rb_funcallv, rb_intern, and rb_vm_inc_const_missing_count().
Referenced by rb_const_get_0(), and rb_mod_const_get().
Definition at line 2387 of file variable.c.
References autoload_delete(), ID2SYM, Qnil, Qundef, rb_check_frozen, rb_clear_constant_cache(), rb_const_defined_at(), rb_const_lookup(), rb_id_table_delete(), rb_name_err_raise, RCLASS_CONST_TBL, val, rb_const_entry_struct::value, and xfree().
Referenced by console_dev(), rb_mod_remove_const(), and ruby_init_prelude().
|
static |
Definition at line 2285 of file variable.c.
References BUILTIN_TYPE, ID2SYM, PRIsVALUE, Qundef, QUOTE_ID, rb_autoload_load(), rb_autoloading_value(), rb_class_name(), rb_cObject, rb_const_lookup(), RB_CONST_PRIVATE_P, rb_const_warn_if_deprecated(), rb_name_err_raise, rb_warn(), RCLASS_SUPER, RTEST, T_MODULE, rb_const_entry_struct::value, and autoload_data_i::value.
Referenced by rb_const_get_0(), and rb_path_to_class().
Definition at line 2616 of file variable.c.
References check_before_mod_set(), classpath, CONST_PUBLIC, const_tbl_update(), id, autoload_const_set_args::id, autoload_const_set_args::mod, NIL_P, OBJ_FREEZE, PRIsVALUE, QUOTE_ID, rb_class_path_cached(), rb_clear_constant_cache(), rb_cObject, rb_eTypeError, rb_id2str, rb_id_table_create(), rb_id_table_insert(), rb_ivar_set(), rb_name_class(), rb_raise(), rb_str_append(), rb_str_cat2(), rb_str_dup(), RB_TYPE_P, RCLASS_CONST_TBL, RCLASS_IV_TBL, setup_const_entry(), st_data_t, st_lookup, T_CLASS, T_MODULE, tmp_classpath, val, autoload_const_set_args::value, and ZALLOC.
Referenced by boot_defclass(), console_dev(), Init_class_hierarchy(), Init_strscan(), rb_autoload_str(), rb_define_class(), rb_define_class_id_under(), rb_define_const(), rb_define_module(), rb_define_module_id_under(), rb_mod_const_set(), and ruby_init_loadpath_safe().
void rb_const_warn_if_deprecated | ( | const rb_const_entry_t * | ce, |
VALUE | klass, | ||
ID | id | ||
) |
Definition at line 2263 of file variable.c.
References PRIsVALUE, QUOTE_ID, rb_class_name(), rb_cObject, RB_CONST_DEPRECATED_P, and rb_warn().
Referenced by rb_const_search(), and vm_get_ev_const().
Definition at line 1549 of file variable.c.
References FL_EXIVAR, FL_SET, FL_TEST, FL_UNSET, gen_ivar_copy(), gen_ivar_each(), gen_ivtbl_count(), gen_ivtbl_get(), gen_ivtbl_resize(), givar_copy::iv_index_tbl, iv_index_tbl_make(), gen_ivtbl::ivptr, givar_copy::ivtbl, gen_ivtbl::numiv, givar_copy::obj, Qundef, rb_check_frozen, rb_free_generic_ivar(), st_data_t, and st_insert.
Referenced by d_lite_jisx0301(), d_lite_marshal_dump(), d_lite_marshal_load(), init_copy(), nucomp_marshal_dump(), nurat_marshal_dump(), rb_clone_setup(), rb_dup_setup(), rb_hash_dup(), time_mdump(), and time_mload().
Definition at line 2975 of file variable.c.
References cv_intern(), and rb_cvar_get().
Definition at line 2968 of file variable.c.
References cv_intern(), and rb_cvar_set().
Definition at line 2949 of file variable.c.
References CVAR_LOOKUP, Qfalse, and Qtrue.
Referenced by rb_mod_cvar_defined(), rb_mod_remove_cvar(), and vm_defined().
Definition at line 2922 of file variable.c.
References BUILTIN_TYPE, CVAR_LOOKUP, id, ID2SYM, original_module(), PRIsVALUE, QUOTE_ID, rb_class_name(), rb_name_err_raise, rb_warning(), RCLASS_IV_TBL, RTEST, ruby_verbose, st_data_t, st_delete, T_CLASS, and autoload_data_i::value.
Referenced by accept_charset(), rb_cv_get(), and rb_mod_cvar_get().
Definition at line 2889 of file variable.c.
References BUILTIN_TYPE, check_before_mod_set(), CVAR_LOOKUP, id, original_module(), PRIsVALUE, QUOTE_ID, rb_class_ivar_set(), rb_class_name(), rb_warning(), RCLASS_IV_TBL, RTEST, ruby_verbose, st_data_t, st_delete, st_init_numtable, and T_CLASS.
Referenced by rb_cv_set(), rb_define_class_variable(), and rb_mod_cvar_set().
Definition at line 2982 of file variable.c.
References cv_intern(), and rb_cvar_set().
Definition at line 2734 of file variable.c.
References rb_const_set(), rb_intern, rb_is_const_id(), and rb_warn().
Referenced by alias_global_const(), exp1(), Init_bigdecimal(), Init_Bignum(), Init_Complex(), init_constants(), Init_cparse(), Init_date_core(), Init_dbm(), Init_etc(), Init_fcntl(), Init_fiddle(), Init_fiddle_function(), Init_fiddle_handle(), Init_fiddle_pointer(), Init_File(), Init_GC(), Init_gdbm(), Init_IO(), Init_marshal(), Init_nkf(), Init_Numeric(), Init_openssl(), Init_ossl_asn1(), Init_ossl_config(), Init_ossl_ocsp(), Init_ossl_pkcs7(), Init_ossl_ssl(), Init_ossl_x509name(), Init_psych_parser(), Init_readline(), Init_Regexp(), Init_sizeof(), Init_Thread(), Init_VM(), Init_win32ole(), Init_win32ole_variant(), Init_win32ole_variant_m(), Init_zlib(), InitVM_process(), InitVM_Random(), InitVM_transcode(), ole_const_load(), parser_compile_error(), rb_define_global_const(), rb_file_const(), ripper_init_eventids1_table(), ripper_init_eventids2_table(), set_encoding_const(), and set_syserr().
Definition at line 2745 of file variable.c.
References rb_cObject, and rb_define_const().
Referenced by Init_Hash(), Init_IO(), Init_version(), Init_VM(), InitVM_Object(), parser_compile_error(), restore_load_file(), and ruby_prog_init().
void rb_define_hooked_variable | ( | const char * | name, |
VALUE * | var, | ||
VALUE(*)(ANYARGS) | getter, | ||
void(*)(ANYARGS) | setter | ||
) |
Definition at line 616 of file variable.c.
References rb_global_variable::data, rb_global_variable::getter, global_id(), rb_global_variable::marker, Qnil, RB_GC_GUARD, rb_global_entry(), rb_gvar_var_getter(), rb_gvar_var_marker(), rb_gvar_var_setter(), rb_global_variable::setter, and rb_global_entry::var.
Referenced by Init_IO(), Init_load(), Init_String(), rb_define_readonly_variable(), rb_define_variable(), rb_define_virtual_variable(), and ruby_prog_init().
Definition at line 641 of file variable.c.
References rb_define_hooked_variable(), and rb_gvar_readonly_setter().
Referenced by Init_IO().
Definition at line 635 of file variable.c.
References rb_define_hooked_variable().
Referenced by Init_IO(), and ruby_prog_init().
void rb_define_virtual_variable | ( | const char * | name, |
VALUE(*)(ANYARGS) | getter, | ||
void(*)(ANYARGS) | setter | ||
) |
Definition at line 647 of file variable.c.
References rb_global_variable::getter, rb_define_hooked_variable(), rb_gvar_readonly_setter(), rb_gvar_val_getter(), and rb_global_variable::setter.
Referenced by Init_eval(), Init_IO(), Init_load(), Init_Regexp(), Init_safe(), Init_Time(), and InitVM_process().
Definition at line 2792 of file variable.c.
References CONST_DEPRECATED, rb_const_entry_struct::flag, id, len, NULL, rb_check_id_cstr(), rb_const_lookup(), rb_frozen_class_p(), rb_fstring_new(), rb_name_err_raise, and strlen().
Referenced by Init_Bignum(), Init_Numeric(), and InitVM_Object().
VALUE rb_f_global_variables | ( | void | ) |
Definition at line 883 of file variable.c.
References buf, gvar_i(), ID2SYM, NIL_P, rb_ary_new(), rb_ary_push(), rb_backref_get(), rb_global_tbl, rb_id_table_foreach(), rb_intern2(), rb_match_count(), rb_match_nth_defined(), rb_sprintf(), rb_str_intern(), and sym.
Referenced by Init_eval().
Definition at line 687 of file variable.c.
References ALLOC, trace_var::data, trace_var::func, trace_var::next, NIL_P, OBJ_TAINTED, Qnil, rb_block_proc(), rb_eSecurityError, rb_f_untrace_var(), rb_global_entry(), rb_raise(), rb_scan_args(), rb_to_id(), rb_trace_eval(), trace_var::removed, rb_global_variable::trace, and rb_global_entry::var.
Referenced by Init_eval().
Definition at line 746 of file variable.c.
References rb_global_variable::block_trace, trace_var::data, id, trace_var::next, NIL_P, PRIsVALUE, Qnil, QUOTE, QUOTE_ID, rb_ary_new(), rb_ary_new3, rb_ary_push(), rb_check_id(), rb_global_tbl, rb_id_table_lookup(), rb_name_error(), rb_name_error_str(), rb_scan_args(), remove_trace(), trace_var::removed, and rb_global_entry::var.
Referenced by Init_eval(), and rb_f_trace_var().
void rb_free_generic_ivar | ( | VALUE | obj | ) |
Definition at line 1183 of file variable.c.
References key, RUBY_FUNC_EXPORTED, st_data_t, st_delete, st_free_table, and xfree().
Referenced by obj_free(), and rb_copy_generic_ivar().
void rb_gc_mark_global_tbl | ( | void | ) |
Definition at line 593 of file variable.c.
References mark_global_entry(), rb_global_tbl, and rb_id_table_foreach_values().
Referenced by gc_mark_roots().
RUBY_FUNC_EXPORTED size_t rb_generic_ivar_memsize | ( | VALUE | obj | ) |
Definition at line 1200 of file variable.c.
References gen_ivtbl_bytes(), gen_ivtbl_get(), and gen_ivtbl::numiv.
Referenced by obj_memsize_of().
Definition at line 978 of file variable.c.
References FL_EXIVAR, FL_TEST, gen_ivar_compat_tbl_i(), gen_ivtbl_get(), gen_ivar_compat_tbl::ivtbl, rb_obj_class(), RCLASS_IV_INDEX_TBL, st_add_direct, st_clear(), st_data_t, st_foreach_safe(), st_init_numtable, st_lookup, and gen_ivar_compat_tbl::tbl.
struct rb_global_entry* rb_global_entry | ( | ID | id | ) |
Definition at line 481 of file variable.c.
References ALLOC, rb_global_variable::block_trace, rb_global_variable::counter, rb_global_variable::data, rb_global_variable::getter, id, rb_global_entry::id, rb_global_variable::marker, rb_global_tbl, rb_gvar_undef_getter(), rb_gvar_undef_marker(), rb_gvar_undef_setter(), rb_id_table_insert(), rb_id_table_lookup(), rb_global_variable::setter, rb_global_variable::trace, and rb_global_entry::var.
Referenced by compile_named_capture_assign(), ibf_load_gentry(), iseq_build_from_ary_body(), rb_alias_variable(), rb_define_hooked_variable(), rb_f_trace_var(), rb_gv_get(), rb_gv_set(), and vm_defined().
Definition at line 850 of file variable.c.
References global_id(), rb_global_entry(), and rb_gvar_get().
Referenced by mSyslog_open().
Definition at line 841 of file variable.c.
References global_id(), rb_global_entry(), and rb_gvar_set().
Referenced by process_sflag().
VALUE rb_gvar_defined | ( | struct rb_global_entry * | entry | ) |
Definition at line 859 of file variable.c.
References rb_global_variable::getter, Qfalse, Qtrue, rb_gvar_undef_getter(), and rb_global_entry::var.
Referenced by vm_defined().
VALUE rb_gvar_get | ( | struct rb_global_entry * | entry | ) |
Definition at line 791 of file variable.c.
References rb_global_variable::data, rb_global_variable::getter, rb_global_entry::id, and rb_global_entry::var.
Referenced by rb_gv_get().
void rb_gvar_readonly_setter | ( | VALUE | v, |
ID | id, | ||
void * | d, | ||
struct rb_global_variable * | g | ||
) |
Definition at line 571 of file variable.c.
References PRIsVALUE, QUOTE_ID, and rb_name_error().
Referenced by Init_IO(), Init_load(), rb_define_readonly_variable(), rb_define_virtual_variable(), and ruby_prog_init().
VALUE rb_gvar_set | ( | struct rb_global_entry * | entry, |
VALUE | val | ||
) |
Definition at line 824 of file variable.c.
References rb_global_variable::block_trace, rb_global_variable::data, rb_global_entry::id, rb_ensure(), rb_global_variable::setter, rb_global_variable::trace, trace_data::trace, trace_en(), trace_ev(), trace_data::val, val, and rb_global_entry::var.
Referenced by rb_gv_set().
VALUE rb_gvar_undef_getter | ( | ID | id, |
void * | data, | ||
struct rb_global_variable * | var | ||
) |
Definition at line 509 of file variable.c.
References PRIsVALUE, Qnil, QUOTE_ID, and rb_warning().
Referenced by rb_global_entry(), and rb_gvar_defined().
void rb_gvar_undef_marker | ( | VALUE * | var | ) |
Definition at line 527 of file variable.c.
Referenced by rb_global_entry().
void rb_gvar_undef_setter | ( | VALUE | val, |
ID | id, | ||
void * | d, | ||
struct rb_global_variable * | var | ||
) |
Definition at line 517 of file variable.c.
References rb_global_variable::data, rb_global_variable::getter, rb_global_variable::marker, rb_gvar_val_getter(), rb_gvar_val_marker(), rb_gvar_val_setter(), and rb_global_variable::setter.
Referenced by rb_global_entry().
VALUE rb_gvar_val_getter | ( | ID | id, |
void * | data, | ||
struct rb_global_variable * | var | ||
) |
Definition at line 532 of file variable.c.
Referenced by rb_define_virtual_variable(), and rb_gvar_undef_setter().
void rb_gvar_val_marker | ( | VALUE * | var | ) |
Definition at line 544 of file variable.c.
References rb_gc_mark_maybe().
Referenced by rb_gvar_undef_setter().
void rb_gvar_val_setter | ( | VALUE | val, |
ID | id, | ||
void * | data, | ||
struct rb_global_variable * | var | ||
) |
Definition at line 538 of file variable.c.
References rb_global_variable::data.
Referenced by rb_gvar_undef_setter().
VALUE rb_gvar_var_getter | ( | ID | id, |
void * | data, | ||
struct rb_global_variable * | gvar | ||
) |
Definition at line 551 of file variable.c.
References Qnil, and rb_global_entry::var.
Referenced by rb_define_hooked_variable().
void rb_gvar_var_marker | ( | VALUE * | var | ) |
Definition at line 565 of file variable.c.
References rb_gc_mark_maybe().
Referenced by rb_define_hooked_variable().
void rb_gvar_var_setter | ( | VALUE | val, |
ID | id, | ||
void * | data, | ||
struct rb_global_variable * | g | ||
) |
Definition at line 559 of file variable.c.
Referenced by rb_define_hooked_variable().
Definition at line 3130 of file variable.c.
References rb_intern, and rb_ivar_get().
Referenced by function_call(), localjump_reason(), localjump_xvalue(), ossl_x509extfactory_create_ext(), ossl_x509stctx_initialize(), ossl_x509stctx_verify(), ossl_x509store_verify(), parse(), set_state_ivars(), and with_gvl_callback().
Definition at line 3138 of file variable.c.
References rb_intern, and rb_ivar_set().
Referenced by build_exception(), Init_md5(), Init_rmd160(), Init_sha1(), Init_VM(), initialize(), initialize_params(), make_localjump_error(), ossl_x509extfactory_alloc(), ossl_x509extfactory_set_crl(), ossl_x509extfactory_set_issuer_cert(), ossl_x509extfactory_set_subject_cert(), ossl_x509extfactory_set_subject_req(), ossl_x509stctx_initialize(), ossl_x509store_initialize(), ossl_x509store_set_time(), ossl_x509store_set_vfy_cb(), ossl_x509store_verify(), parse_keyword_arg_i(), and raise_from_check().
st_index_t rb_ivar_count | ( | VALUE | obj | ) |
Definition at line 1613 of file variable.c.
References BUILTIN_TYPE, count, FL_EXIVAR, FL_TEST, gen_ivtbl_count(), gen_ivtbl_get(), gen_ivtbl::ivptr, st_table::num_entries, Qundef, RCLASS_IV_TBL, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, SPECIAL_CONST_P, T_CLASS, T_MODULE, and T_OBJECT.
Referenced by rb_obj_inspect().
Definition at line 1421 of file variable.c.
References BUILTIN_TYPE, FL_EXIVAR, FL_TEST, generic_ivar_defined(), Qfalse, Qtrue, Qundef, RCLASS_IV_TBL, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, SPECIAL_CONST_P, st_data_t, st_lookup, T_CLASS, T_MODULE, T_OBJECT, and val.
Referenced by copy_ivar_i(), exc_setup_cause(), get_digest_base_metadata(), rb_obj_ivar_defined(), setup_exception(), and vm_defined().
Definition at line 1279 of file variable.c.
References BUILTIN_TYPE, FL_EXIVAR, FL_TEST, generic_ivar_delete(), len, Qundef, rb_check_frozen, RCLASS_IV_TBL, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, st_data_t, st_delete, st_lookup, T_CLASS, T_MODULE, T_OBJECT, and val.
Referenced by rb_attr_delete().
Definition at line 1591 of file variable.c.
References BUILTIN_TYPE, FL_EXIVAR, FL_TEST, func, gen_ivar_each(), obj_ivar_each(), RCLASS_IV_TBL, SPECIAL_CONST_P, st_foreach_safe(), T_CLASS, T_MODULE, and T_OBJECT.
Referenced by has_ivars(), inspect_obj(), r_copy_ivar(), rb_obj_instance_variables(), w_ivar(), and w_objivar().
Definition at line 1260 of file variable.c.
References PRIsVALUE, Qnil, Qundef, QUOTE_ID, rb_ivar_lookup(), rb_warning(), RTEST, and ruby_verbose.
Referenced by add_event_call_back(), call_trace_func(), chunk_i(), cState_aref(), cvar_front_klass(), echild_status(), enc_get_index_str(), error_handle(), esignal_signo(), EVENTSINK_Invoke(), fev_get_handler(), fev_off_event(), fole_s_show_help(), folemethod_event(), folemethod_name(), foleparam_name(), folerecord_to_h(), folerecord_typename(), foletype_name(), folevariable_name(), get_digest_base_metadata(), get_strpath(), initialize_params(), lazy_drop_size(), lazy_size(), lazy_take_size(), method_inspect(), nucomp_loader(), nurat_loader(), olerecord_ivar_get(), olerecord_ivar_set(), pst_to_i(), range_loader(), rb_frozen_class_p(), rb_inflate_add_dictionary(), rb_iv_get(), rb_method_name_error(), rb_mod_to_s(), rb_obj_ivar_get(), rb_profile_frame_classpath(), rb_singleton_class_get(), rb_thread_variable_get(), rb_thread_variable_p(), rb_thread_variable_set(), rb_thread_variables(), reduce(), ruby_cleanup(), singleton_class_of(), sliceafter_i(), slicebefore_i(), slicewhen_i(), sysexit_status(), uncaught_throw_tag(), uncaught_throw_value(), vm_getivar(), and zstream_run().
Definition at line 1225 of file variable.c.
References BUILTIN_TYPE, FL_EXIVAR, FL_TEST, generic_ivar_get(), len, Qundef, RCLASS_IV_TBL, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, SPECIAL_CONST_P, st_data_t, st_lookup, T_CLASS, T_MODULE, T_OBJECT, and val.
Referenced by name_err_receiver(), rb_attr_get(), rb_ivar_get(), and str_associated().
Definition at line 1364 of file variable.c.
References ALLOC_N, BUILTIN_TYPE, generic_ivar_set(), ivar_update::index, ivar_update::iv_extended, ivar_update::iv_index_tbl, iv_index_tbl_extend(), iv_index_tbl_make(), iv_index_tbl_newsize(), len, MEMCPY, Qundef, rb_check_frozen, rb_class_ivar_set(), RB_OBJ_WRITE, RBASIC, RCLASS_IV_TBL, REALLOC_N, ROBJECT, ROBJECT_EMBED, ROBJECT_EMBED_LEN_MAX, ROBJECT_IVPTR, ROBJECT_NUMIV, st_init_numtable, T_CLASS, T_MODULE, T_OBJECT, ivar_update::u, and val.
Referenced by add_event_call_back(), adjust_backtrace_in_eval(), copy_ivar_i(), create_win32ole_param(), create_win32ole_variable(), cState_aset(), enc_set_index(), enum_chunk(), enum_chunk_while(), enum_slice_after(), enum_slice_before(), enum_slice_when(), enumerable_lazy(), esignal_init(), exc_initialize(), exc_set_backtrace(), exc_setup_cause(), exit_initialize(), fev_initialize(), fev_set_handler(), gzfile_raise(), initialize(), initialize_params(), int_ossl_asn1_decode0_prim(), iseq_compile_each(), ivar_cache(), lazy_init_block(), lazy_initialize(), lazy_set_args(), lazy_zip_arrays_func(), lazy_zip_func(), make_econv_exception(), mustbe_callable(), name_err_initialize(), name_err_local_variables(), next_i(), nometh_err_initialize(), nucomp_marshal_load(), nurat_marshal_load(), olemethod_set_member(), oleparam_ole_param_from_index(), olerecord_set_ivar(), oletype_set_member(), ossl_cipher_init(), ossl_cipher_is_authenticated(), ossl_cipher_pkcs5_keyivgen(), ossl_cipher_set_key(), ossl_ssl_initialize(), ossl_ssl_set_session(), ossl_ssl_verify_callback(), ossl_sslctx_add_extra_chain_cert_i(), ossl_sslctx_session_get_cb(), ossl_sslctx_session_new_cb(), ossl_sslctx_setup(), ossl_start_ssl(), ossl_tmp_dh_callback(), parse_main(), pipe_open(), process_options(), r_ivar(), raise_argument_error(), raise_loaderror(), range_dumper(), rb_const_set(), rb_inflate_s_allocate(), rb_io_init_copy(), rb_iv_set(), rb_last_status_set(), rb_mod_refine(), rb_name_class(), rb_name_err_new(), rb_obj_ivar_set(), rb_set_class_path(), rb_set_class_path_string(), rb_threadptr_setup_exception(), readline_s_get_completion_proc(), readline_s_set_completion_case_fold(), readline_s_set_completion_proc(), readline_s_set_output(), ruby_init_loadpath_safe(), ruby_thread_init(), set_strpath(), setup_exception(), sockopt_initialize(), ssl_renegotiation_cb(), str_associate(), struct_ivar_get(), struct_set_members(), syserr_initialize(), time_mdump(), time_mload(), uncaught_throw_init(), vm_call0_body(), and vm_setivar().
Definition at line 2444 of file variable.c.
References rb_ary_new2, rb_id_table_foreach(), rb_id_table_size(), rb_local_constants_i(), and RCLASS_CONST_TBL.
Referenced by rb_mod_constants().
|
static |
Definition at line 2435 of file variable.c.
References ID2SYM, ID_TABLE_CONTINUE, rb_ary_push(), RB_CONST_PRIVATE_P, and rb_is_const_id().
Referenced by rb_local_constants().
void rb_mark_generic_ivar | ( | VALUE | obj | ) |
Definition at line 1173 of file variable.c.
References gen_ivtbl_get(), and gen_ivtbl_mark().
Referenced by gc_mark_children().
Definition at line 3068 of file variable.c.
References cvar_list(), mod_cvar_at(), mod_cvar_of(), Qtrue, rb_scan_args(), and RTEST.
Referenced by InitVM_Object().
void* rb_mod_const_at | ( | VALUE | mod, |
void * | data | ||
) |
Definition at line 2457 of file variable.c.
References rb_id_table_foreach(), RCLASS_CONST_TBL, st_init_numtable, and sv_i().
Referenced by rb_mod_const_of(), and rb_mod_s_constants().
Definition at line 1839 of file variable.c.
References rb_vm_pop_cfunc_frame(), uninitialized_constant(), and UNREACHABLE.
Referenced by InitVM_Object(), and rb_mod_const_get().
void* rb_mod_const_of | ( | VALUE | mod, |
void * | data | ||
) |
Definition at line 2470 of file variable.c.
References mod, rb_cObject, rb_mod_const_at(), and RCLASS_SUPER.
Referenced by rb_mod_constants(), and rb_mod_s_constants().
Definition at line 2524 of file variable.c.
References Qtrue, rb_const_list(), rb_local_constants(), rb_mod_const_of(), rb_scan_args(), and RTEST.
Referenced by InitVM_Object(), and rb_mod_s_constants().
Definition at line 2843 of file variable.c.
References CONST_DEPRECATED, and set_const_visibility().
Referenced by InitVM_Object().
Definition at line 228 of file variable.c.
References classname(), NIL_P, fc_result::path, and rb_str_dup().
Referenced by InitVM_Object().
Definition at line 2815 of file variable.c.
References CONST_PRIVATE, CONST_VISIBILITY_MASK, and set_const_visibility().
Referenced by InitVM_Object().
Definition at line 2829 of file variable.c.
References CONST_PUBLIC, CONST_VISIBILITY_MASK, and set_const_visibility().
Referenced by InitVM_Object().
Definition at line 2375 of file variable.c.
References id_for_var, rb_const_remove(), and rb_name_err_raise.
Referenced by InitVM_Object(), and new_struct().
Definition at line 3109 of file variable.c.
References id, ID2SYM, id_for_var_message, rb_check_frozen, rb_cvar_defined(), rb_name_err_raise, RCLASS_IV_TBL, st_data_t, st_delete, and val.
Referenced by InitVM_Object().
Definition at line 437 of file variable.c.
References classid, ID2SYM, and rb_ivar_set().
Referenced by boot_defclass(), rb_const_set(), rb_define_class(), and rb_define_module_id().
Definition at line 458 of file variable.c.
References CLASS_OF, and rb_class2name().
Referenced by addrinfo_inspect(), check_type_val2variant(), econv_inspect(), init_copy(), int_to_f(), iseqw_inspect(), method_inspect(), nurat_coerce(), pack_pack(), parser_compile_error(), path_inspect(), proc_to_s_(), range_bsearch(), range_each(), range_step(), rb_builtin_class_name(), rb_digest_instance_inspect(), rb_digest_instance_method_unimpl(), rb_f_kill(), rb_Hash(), rb_hash_set_default_proc(), rb_int_cmp(), rb_int_digits(), rb_mod_define_method(), rb_obj_clone2(), rb_stat_inspect(), rb_str_index_m(), rb_str_rindex_m(), rb_str_rpartition(), rescue_callback(), setup_exception(), should_be_finalizable(), sockopt_inspect(), uscore_get(), using_module_recursive(), and vm_to_proc().
Definition at line 1681 of file variable.c.
References ivar_i(), rb_ary_new(), and rb_ivar_foreach().
Definition at line 1734 of file variable.c.
References BUILTIN_TYPE, FL_EXIVAR, FL_TEST, generic_ivar_remove(), id, id_for_var, NORETURN(), Qnil, Qundef, rb_check_frozen, rb_name_err_raise, RCLASS_IV_TBL, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, st_data_t, st_delete, st_lookup, T_CLASS, T_MODULE, T_OBJECT, uninitialized_constant(), UNREACHABLE, and val.
Referenced by InitVM_Object().
Definition at line 431 of file variable.c.
References rb_path_to_class(), and rb_str_new_cstr().
Referenced by convert_UTF8_to_JSON(), convert_UTF8_to_JSON_ASCII(), dump_output(), Init_bubblebabble(), Init_generator(), Init_md5(), Init_ossl_digest(), Init_parser(), Init_rmd160(), Init_sha1(), Init_sha2(), and w32error_make_error().
Definition at line 389 of file variable.c.
References FALSE, id, fc_result::path, PRIsVALUE, Qundef, QUOTE, rb_check_id_cstr(), rb_cObject, rb_const_search(), rb_eArgError, rb_enc_asciicompat, rb_enc_get(), rb_eTypeError, RB_GC_GUARD, rb_raise(), rb_str_subseq(), RB_TYPE_P, RSTRING_LEN, RSTRING_PTR, T_CLASS, T_MODULE, and TRUE.
Referenced by class2path(), path2class(), r_object0(), and rb_path2class().
Definition at line 2598 of file variable.c.
References FALSE, rb_const_defined_0(), and TRUE.
Definition at line 2604 of file variable.c.
References FALSE, rb_const_defined_0(), and TRUE.
Definition at line 2592 of file variable.c.
References rb_const_defined_0(), and TRUE.
Referenced by vm_get_ev_const().
Definition at line 2353 of file variable.c.
References FALSE, rb_const_get_0(), and TRUE.
Definition at line 2359 of file variable.c.
References FALSE, rb_const_get_0(), and TRUE.
Definition at line 2347 of file variable.c.
References rb_const_get_0(), and TRUE.
Referenced by vm_get_ev_const().
Definition at line 336 of file variable.c.
References never_cache(), and rb_tmp_class_path().
Referenced by ignored_block(), and rb_vm_bugreport().
Definition at line 366 of file variable.c.
References classid, classpath, ivar_cache(), OBJ_FREEZE, rb_cObject, rb_ivar_set(), rb_str_cat2(), rb_str_dup(), rb_str_intern(), rb_str_new2, rb_str_new_cstr(), rb_tmp_class_path(), and tmp_classpath.
Referenced by Init_IO().
Definition at line 343 of file variable.c.
References classid, classpath, ivar_cache(), OBJ_FREEZE, rb_cObject, rb_ivar_set(), rb_str_append(), rb_str_cat2(), rb_str_dup(), rb_str_intern(), rb_str_new_frozen(), rb_tmp_class_path(), and tmp_classpath.
Referenced by rb_define_class_id_under(), and rb_define_module_id_under().
Definition at line 3163 of file variable.c.
References st_copy, st_data_t, st_foreach, and tbl_copy_i().
Referenced by rb_mod_init_copy(), and rb_singleton_class_clone_and_attach().
|
static |
Definition at line 259 of file variable.c.
References classname(), NIL_P, fc_result::path, Qfalse, rb_cModule, rb_obj_class(), RB_TYPE_P, RBASIC, RCLASS_IV_TBL, st_data_t, st_lookup, T_MODULE, and tmp_classpath.
Referenced by rb_class2name(), rb_class_path(), rb_class_path_no_cache(), rb_search_class_path(), rb_set_class_path(), and rb_set_class_path_string().
Definition at line 658 of file variable.c.
References rb_ary_new3, and rb_eval_cmd().
Referenced by rb_f_trace_var().
|
static |
Definition at line 714 of file variable.c.
References trace_var::next, trace_var::removed, rb_global_variable::trace, and xfree().
Referenced by rb_f_untrace_var(), and trace_en().
Definition at line 2015 of file variable.c.
References rb_set_safe_level_force().
Referenced by autoload_reset(), and check_autoload_required().
|
static |
Definition at line 2751 of file variable.c.
References argc, rb_const_entry_struct::flag, id, ID2SYM, PRIsVALUE, QUOTE_ID, rb_check_id(), rb_clear_constant_cache(), rb_const_lookup(), rb_frame_callee(), rb_frozen_class_p(), rb_name_err_raise, rb_warning(), and val.
Referenced by rb_mod_deprecate_constant(), rb_mod_private_constant(), and rb_mod_public_constant().
|
static |
Definition at line 2725 of file variable.c.
References rb_const_entry_struct::file, rb_const_entry_struct::flag, rb_const_entry_struct::line, RB_OBJ_WRITE, rb_source_location(), and rb_const_entry_struct::value.
Referenced by const_tbl_update(), and rb_const_set().
|
static |
Definition at line 2423 of file variable.c.
References cv_i_update(), ID_TABLE_CONTINUE, rb_is_const_id(), st_data_t, and st_update().
Referenced by rb_mod_const_at().
Definition at line 3156 of file variable.c.
References Qundef, RB_OBJ_WRITTEN, and ST_CONTINUE.
Referenced by rb_st_copy().
|
static |
Definition at line 816 of file variable.c.
References rb_global_variable::block_trace, Qnil, and remove_trace().
Referenced by rb_gvar_set().
|
static |
Definition at line 803 of file variable.c.
References trace_var::data, trace_var::func, trace_var::next, Qnil, trace_data::trace, and trace_data::val.
Referenced by rb_gvar_set().
Definition at line 1783 of file variable.c.
References rb_class_real(), rb_cObject, and rb_name_err_raise.
Referenced by rb_mod_const_missing(), and rb_obj_remove_instance_variable().
|
static |
Definition at line 24 of file variable.c.
Referenced by autoload_data(), autoload_delete(), Init_var_tables(), and rb_autoload_str().
|
static |
Definition at line 1923 of file variable.c.
|
static |
Definition at line 1866 of file variable.c.
|
static |
Definition at line 24 of file variable.c.
Referenced by classname(), Init_var_tables(), rb_name_class(), rb_set_class_path(), and rb_set_class_path_string().
|
static |
Definition at line 24 of file variable.c.
Referenced by classname(), fc_path(), find_class_path(), Init_var_tables(), rb_class_path_cached(), rb_const_set(), rb_profile_frame_qualified_method_name(), rb_set_class_path(), and rb_set_class_path_string().
|
static |
Definition at line 29 of file variable.c.
|
static |
Definition at line 30 of file variable.c.
struct rb_id_table* rb_global_tbl |
Definition at line 23 of file variable.c.
Referenced by Init_var_tables(), rb_alias_variable(), rb_f_global_variables(), rb_f_untrace_var(), rb_gc_mark_global_tbl(), and rb_global_entry().
|
static |
Definition at line 24 of file variable.c.
Referenced by classname(), find_class_path(), Init_var_tables(), ivar_cache(), rb_class_path_cached(), rb_const_set(), rb_set_class_path(), rb_set_class_path_string(), and rb_tmp_class_path().