Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "internal.h"
#include "ruby/st.h"
#include "ruby/util.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
#include "constant.h"
#include "id.h"
#include "probes.h"
Go to the source code of this file.
Data Structures | |
struct | conv_method_tbl |
struct | dig_method |
Macros | |
#define | id_eq idEq |
#define | id_eql idEqlP |
#define | id_match idEqTilde |
#define | id_inspect idInspect |
#define | id_init_copy idInitialize_copy |
#define | id_init_clone idInitialize_clone |
#define | id_init_dup idInitialize_dup |
#define | id_const_missing idConst_missing |
#define | CLASS_OR_MODULE_P(obj) |
#define | id_for_var(obj, name, part, type) id_for_setter(obj, name, type, "`%1$s' is not allowed as "#part" "#type" variable name") |
#define | id_for_setter(obj, name, type, message) check_setter_id(obj, &(name), rb_is_##type##_id, rb_is_##type##_name, message, strlen(message)) |
#define | M(n) {#n, (unsigned short)idTo_##n} |
#define | IMPLICIT_CONVERSIONS 7 |
#define | OutOfRange() |
#define | fix2dbl_without_to_f(x) (double)FIX2LONG(x) |
#define | big2dbl_without_to_f(x) rb_big2dbl(x) |
#define | int2dbl_without_to_f(x) (FIXNUM_P(x) ? fix2dbl_without_to_f(x) : big2dbl_without_to_f(x)) |
#define | rat2dbl_without_to_f(x) |
#define | special_const_to_float(val, pre, post) |
#define | rb_intern(str) rb_intern_const(str) |
Variables | |
VALUE | rb_cBasicObject |
VALUE | rb_mKernel |
VALUE | rb_cObject |
VALUE | rb_cModule |
VALUE | rb_cClass |
VALUE | rb_cData |
VALUE | rb_cNilClass |
VALUE | rb_cTrueClass |
VALUE | rb_cFalseClass |
static const char | wrong_constant_name [] = "wrong constant name %1$s" |
static const char | invalid_attribute_name [] = "invalid attribute name `%1$s'" |
static const struct conv_method_tbl | conv_method_names [] |
static ID | id_to_f |
static ID | id_dig |
#define big2dbl_without_to_f | ( | x | ) | rb_big2dbl(x) |
Definition at line 2897 of file object.c.
Referenced by rb_num2dbl(), rb_num_to_dbl(), and to_float().
#define CLASS_OR_MODULE_P | ( | obj | ) |
Definition at line 46 of file object.c.
Referenced by rb_class_inherited_p(), rb_mod_cmp(), rb_mod_ge(), and rb_mod_to_s().
#define fix2dbl_without_to_f | ( | x | ) | (double)FIX2LONG(x) |
Definition at line 2896 of file object.c.
Referenced by rb_num2dbl(), rb_num_to_dbl(), and to_float().
#define id_const_missing idConst_missing |
Definition at line 44 of file object.c.
Referenced by rb_mod_const_get().
#define id_eq idEq |
Definition at line 37 of file object.c.
Referenced by rb_equal(), and rb_obj_not_equal().
#define id_for_setter | ( | obj, | |
name, | |||
type, | |||
message | |||
) | check_setter_id(obj, &(name), rb_is_##type##_id, rb_is_##type##_name, message, strlen(message)) |
Definition at line 1946 of file object.c.
Referenced by id_for_attr(), and rb_mod_const_set().
#define id_for_var | ( | obj, | |
name, | |||
part, | |||
type | |||
) | id_for_setter(obj, name, type, "`%1$s' is not allowed as "#part" "#type" variable name") |
Definition at line 1944 of file object.c.
Referenced by rb_mod_cvar_defined(), rb_mod_cvar_get(), rb_mod_cvar_set(), rb_obj_ivar_defined(), rb_obj_ivar_get(), and rb_obj_ivar_set().
#define id_init_clone idInitialize_clone |
Definition at line 42 of file object.c.
Referenced by rb_obj_clone2().
#define id_init_copy idInitialize_copy |
Definition at line 41 of file object.c.
Referenced by rb_obj_init_dup_clone().
#define id_init_dup idInitialize_dup |
Definition at line 43 of file object.c.
Referenced by rb_obj_dup().
#define id_inspect idInspect |
Definition at line 40 of file object.c.
Referenced by rb_inspect().
#define id_match idEqTilde |
Definition at line 39 of file object.c.
Referenced by rb_obj_not_match().
#define IMPLICIT_CONVERSIONS 7 |
Definition at line 2578 of file object.c.
Referenced by convert_type().
#define int2dbl_without_to_f | ( | x | ) | (FIXNUM_P(x) ? fix2dbl_without_to_f(x) : big2dbl_without_to_f(x)) |
#define M | ( | n | ) | {#n, (unsigned short)idTo_##n} |
Referenced by gc_profile_record_get().
#define OutOfRange | ( | ) |
Referenced by rb_cstr_to_dbl().
#define rat2dbl_without_to_f | ( | x | ) |
Definition at line 2900 of file object.c.
Referenced by rb_num2dbl(), rb_num_to_dbl(), and to_float().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by convert_type().
#define special_const_to_float | ( | val, | |
pre, | |||
post | |||
) |
Definition at line 2904 of file object.c.
Referenced by conversion_to_float(), and implicit_conversion_to_float().
|
inlinestatic |
Definition at line 3028 of file object.c.
References rb_method_basic_definition_p().
Referenced by rb_num_to_dbl().
|
static |
Definition at line 1949 of file object.c.
References id, name, rb_check_id(), rb_fstring_new(), and rb_name_err_raise_str.
Definition at line 617 of file object.c.
References BUILTIN_TYPE, class_search_ancestor(), rb_eTypeError, rb_raise(), SPECIAL_CONST_P, T_CLASS, T_ICLASS, and T_MODULE.
Referenced by rb_class_search_ancestor(), rb_obj_is_instance_of(), and rb_obj_is_kind_of().
Definition at line 699 of file object.c.
References RCLASS_M_TBL, and RCLASS_SUPER.
Referenced by class_or_module_required(), rb_class_inherited_p(), rb_class_search_ancestor(), and rb_obj_is_kind_of().
|
static |
Definition at line 2621 of file object.c.
References PRIsVALUE, rb_eTypeError, rb_obj_class(), and rb_raise().
Referenced by convert_type(), rb_check_convert_type(), rb_convert_type(), and rb_to_integer().
|
inlinestatic |
Definition at line 2915 of file object.c.
References special_const_to_float.
Referenced by rb_num_to_dbl(), and to_float().
Definition at line 2581 of file object.c.
References conv_method_names, conversion_mismatch(), conv_method_tbl::id, IMPLICIT_CONVERSIONS, msg, NIL_P, NORETURN(), NULL, numberof, PRIsVALUE, Qfalse, Qnil, Qtrue, Qundef, rb_check_funcall(), rb_eTypeError, rb_intern, rb_obj_class(), and rb_raise().
Referenced by rb_check_convert_type(), rb_check_to_integer(), rb_convert_to_integer(), rb_convert_type(), and rb_to_integer().
|
static |
Definition at line 3199 of file object.c.
References dig_method::basic, dig_method::klass, rb_method_basic_definition_p(), and RBASIC_CLASS.
Referenced by rb_obj_dig().
Definition at line 1332 of file object.c.
References rb_usascii_str_new2.
Referenced by InitVM_Object().
FUNC_MINIMIZED | ( | static VALUE | rb_f_floatVALUE obj, VALUE arg | ) |
Referenced by rb_Float().
Definition at line 1979 of file object.c.
References id, id_for_setter, and rb_intern_str.
Referenced by rb_mod_attr(), rb_mod_attr_accessor(), rb_mod_attr_reader(), and rb_mod_attr_writer().
|
inlinestatic |
Definition at line 2921 of file object.c.
References special_const_to_float.
Referenced by rb_num2dbl().
Definition at line 285 of file object.c.
References FL_EXIVAR, FL_TAINT, OBJ_FROZEN, rb_copy_generic_ivar(), rb_copy_wb_protected_attribute(), rb_eTypeError, rb_gc_copy_finalizer(), rb_obj_classname(), rb_obj_copy_ivar(), rb_raise(), RB_TYPE_P, RBASIC, T_MASK, and T_OBJECT.
Referenced by rb_obj_clone2(), and rb_obj_dup().
void Init_Object | ( | void | ) |
Definition at line 3633 of file object.c.
References InitVM, and rb_intern_const.
Definition at line 535 of file object.c.
References CLASS_OF, PRIsVALUE, rb_id2str, rb_is_instance_id(), rb_str_cat2(), rb_str_catf(), RSTRING_PTR, and ST_CONTINUE.
Referenced by inspect_obj().
Definition at line 558 of file object.c.
References inspect_i(), OBJ_INFECT, rb_ivar_foreach(), rb_str_cat2(), and RSTRING_PTR.
Referenced by rb_obj_inspect().
Definition at line 1232 of file object.c.
References rb_usascii_str_new2.
Referenced by InitVM_Object().
Definition at line 1185 of file object.c.
References rb_usascii_str_new().
Referenced by InitVM_Object().
|
static |
Definition at line 3210 of file object.c.
References CLASS_OF, PRIsVALUE, rb_eTypeError, and rb_raise().
Referenced by rb_obj_dig().
NORETURN | ( | static void | conversion_mismatchVALUE, const char *, const char *, VALUE | ) |
Referenced by convert_type().
Definition at line 2996 of file object.c.
References PRIsVALUE, rb_cNumeric, rb_convert_type(), rb_eTypeError, rb_obj_class(), rb_obj_is_kind_of(), rb_raise(), and T_FLOAT.
Referenced by rb_num_to_dbl(), and rb_to_float().
Definition at line 500 of file object.c.
References CLASS_OF, OBJ_INFECT, PRIsVALUE, rb_class_name(), rb_sprintf(), and rb_str_escape().
Referenced by InitVM_Object(), name_err_mesg_to_str(), rb_hash_fetch_m(), rb_int2str(), rb_io_inspect(), rb_mod_to_s(), rb_obj_as_string(), rb_obj_basic_to_s_p(), rb_obj_inspect(), rb_reg_inspect(), and wmap_inspect_i().
Definition at line 3126 of file object.c.
References NIL_P, rb_ary_new3, rb_check_array_type(), rb_check_convert_type(), and T_ARRAY.
Referenced by console_echo_p(), dir_entries(), range_last(), rb_f_array(), and readline_attempted_completion_function().
Definition at line 2643 of file object.c.
References conversion_mismatch(), convert_type(), FALSE, NIL_P, Qnil, T_DATA, TYPE, and val.
Referenced by ary_join_1(), check_exec_redirect_fd(), cState_configure(), rb_Array(), rb_check_array_type(), rb_check_hash_type(), rb_check_regexp_type(), rb_check_string_type(), rb_check_to_float(), rb_gzwriter_initialize(), rb_hash_set_default_proc(), rb_io_check_io(), rb_stat(), and vm_to_proc().
Definition at line 3016 of file object.c.
References Qnil, rb_check_convert_type(), rb_cNumeric, rb_obj_is_kind_of(), RB_TYPE_P, T_FLOAT, and val.
Referenced by rand_random(), and rand_range().
Definition at line 2693 of file object.c.
References rb_check_to_integer().
Referenced by exit_initialize(), num_exact(), rand_random(), rand_range(), and rb_file_initialize().
Definition at line 2673 of file object.c.
References convert_type(), FALSE, FIXNUM_P, Qnil, rb_cInteger, rb_obj_is_kind_of(), RB_TYPE_P, T_BIGNUM, and val.
Referenced by esignal_init(), range_include(), range_step(), rb_check_to_int(), rb_io_extract_modeenc(), rb_io_s_sysopen(), and sockopt_s_linger().
Definition at line 1872 of file object.c.
References FL_WB_PROTECTED, NEWOBJ_OF, RGENGC_WB_PROTECTED_OBJECT, and T_OBJECT.
Referenced by InitVM_Object().
Definition at line 1593 of file object.c.
References CLASS_OR_MODULE_P, class_search_ancestor(), Qfalse, Qnil, Qtrue, rb_eTypeError, rb_raise(), RB_TYPE_P, RCLASS_ORIGIN, and T_ICLASS.
Referenced by InitVM_Object(), r_object0(), rb_file_exists_p(), rb_mod_cmp(), rb_mod_define_method(), rb_mod_ge(), rb_mod_lt(), and rb_threadptr_pending_interrupt_include_p().
Definition at line 1790 of file object.c.
References rb_cBasicObject, rb_check_inheritable(), rb_class_inherited(), rb_cObject, rb_eTypeError, rb_make_metaclass(), rb_mod_initialize(), rb_raise(), rb_scan_args(), RBASIC, RCLASS_SET_SUPER(), and RCLASS_SUPER.
Referenced by InitVM_Object().
Definition at line 1891 of file object.c.
References rb_obj_alloc(), and rb_obj_call_init().
Referenced by console_dev(), copy_stream_body(), domain_error(), each_entry_i(), glob_i(), gzfile_wrap(), Init_Exception(), Init_IO(), Init_Regexp(), InitVM_Object(), io_new_instance(), JSON_parse_array(), JSON_parse_object(), make_no_method_exception(), mark(), new_wrap(), path_basename(), path_dirname(), path_entries(), path_expand_path(), path_f_pathname(), path_readlink(), path_realdirpath(), path_realpath(), path_s_getwd(), path_s_glob(), path_split(), path_sub(), path_sub_ext(), process_sflag(), rb_exit(), rb_f_abort(), rb_fiddle_new_function(), rb_io_initialize(), rb_io_s_new(), rb_io_s_open(), rb_name_error(), rb_name_error_str(), rb_readwrite_syserr_fail(), rb_reg_s_union(), rb_struct_alloc(), rb_struct_new(), rb_syntax_error_append(), rb_sys_fail_str(), rb_syserr_new_str(), rb_throw_obj(), setup_struct(), strio_s_new(), strio_s_open(), time_s_now(), w32error_make_error(), and yycompile0().
Definition at line 207 of file object.c.
References BUILTIN_TYPE, FL_SINGLETON, RBASIC, RCLASS_SUPER, and T_ICLASS.
Referenced by class2path(), make_singleton_class(), rb_class2name(), rb_class_name(), rb_define_class(), rb_define_class_id_under(), rb_f_autoload(), rb_obj_alloc(), rb_obj_class(), rb_vm_bugreport(), ruby_vm_special_exception_copy(), uninitialized_constant(), vm_defined(), w_class(), and w_uclass().
Definition at line 1708 of file object.c.
References rb_class_boot().
Referenced by InitVM_Object().
Definition at line 710 of file object.c.
References class_or_module_required(), class_search_ancestor(), and RCLASS_ORIGIN.
Referenced by umethod_bind().
Definition at line 1921 of file object.c.
References Qnil, rb_cBasicObject, rb_eTypeError, rb_raise(), RB_TYPE_P, RCLASS_SUPER, and T_ICLASS.
Referenced by get_digest_base_metadata(), InitVM_Object(), and ossl_asn1_default_tag().
Definition at line 2699 of file object.c.
References convert_type(), f, FALSE, FIXABLE, LONG2FIX, NIL_P, rb_check_string_type(), rb_dbl2big(), rb_eArgError, rb_eTypeError, RB_FLOAT_TYPE_P, RB_INTEGER_TYPE_P, rb_raise(), rb_str_to_inum(), rb_to_integer(), RB_TYPE_P, RFLOAT_VALUE, T_STRING, TRUE, and val.
Referenced by rb_f_integer(), and rb_Integer().
Definition at line 2630 of file object.c.
References conversion_mismatch(), convert_type(), TRUE, TYPE, and val.
Referenced by addrinfo_mload(), console_beep(), core_hash_merge_kwd(), cParser_initialize(), cState_configure(), iseq_build_from_ary_body(), iseq_build_from_ary_exception(), nucomp_s_convert(), numeric_quo(), numeric_to_float(), nurat_s_convert(), open_key_args(), path_entries(), path_s_glob(), rb_execarg_parent_start1(), rb_Float(), rb_io_get_io(), rb_num2dbl(), rb_str_to_str(), rb_String(), rb_thread_s_handle_interrupt(), register_label(), strio_copy(), symbol2event_flag(), to_ary(), and to_hash().
double rb_cstr_to_dbl | ( | const char * | p, |
int | badcheck | ||
) |
Definition at line 2785 of file object.c.
References bad, buf, DBL_DIG, errno, ISDIGIT, ISSPACE, OutOfRange, rb_eArgError, rb_invalid_str(), rb_raise(), rb_warning(), and strtod.
Referenced by JSON_parse_float(), rb_str_to_dbl(), and str2num().
Definition at line 97 of file object.c.
References id_eql, rb_funcall(), and RTEST.
Referenced by cdhash_cmp(), eql_i(), hash_equal(), rb_any_cmp(), and recursive_eql().
Definition at line 86 of file object.c.
References id_eq, Qfalse, Qtrue, rb_funcall(), result, and RTEST.
Referenced by assoc_cmp(), assoc_i(), chunk_ii(), count_i(), eql_i(), exc_equal(), f_eqeq_p(), f_minus_one_p(), f_one_p(), f_zero_p(), find_index_i(), fun1(), fun2(), hash_equal(), hash_le_i(), include_range_i(), InitVM_Object(), key_i(), member_i(), name_err_mesg_equal(), num_div(), num_eql(), num_remainder(), num_step(), num_step_scan_args(), num_zero_p(), nurat_eqeq_p(), pst_equal(), random_equal(), range_bsearch(), rassoc_i(), rb_ary_assoc(), rb_ary_count(), rb_ary_delete(), rb_ary_equal(), rb_ary_includes(), rb_ary_index(), rb_ary_rassoc(), rb_ary_rindex(), rb_big_eq(), rb_hash_search_value(), rb_method_definition_eq(), rb_obj_cmp(), rb_str_equal(), recursive_equal(), syserr_eqq(), time_eql(), time_mdump(), and vtm_add_offset().
Definition at line 2990 of file object.c.
References rb_Float().
Referenced by InitVM_Object(), and rb_Float().
Definition at line 2766 of file object.c.
References NULL, NUM2INT, Qnil, rb_convert_to_integer(), and rb_scan_args().
Referenced by InitVM_Object().
Definition at line 2961 of file object.c.
References DBL2NUM, FUNC_MINIMIZED(), rb_convert_type(), rb_f_float(), rb_str_to_dbl(), T_FLOAT, T_STRING, to_float(), TRUE, and val.
Referenced by flo_coerce(), int_ceil(), int_floor(), int_round(), int_truncate(), num_ceil(), num_coerce(), num_fdiv(), num_floor(), num_round(), num_truncate(), range_bsearch(), rb_f_float(), rb_int_coerce(), rb_str_format(), rb_time_unmagnify_to_float(), time_minus(), and time_to_f().
Definition at line 3157 of file object.c.
References NIL_P, RARRAY_LEN, rb_check_hash_type(), rb_eTypeError, rb_hash_new(), rb_obj_classname(), rb_raise(), RB_TYPE_P, and T_ARRAY.
Referenced by rb_f_hash().
Definition at line 519 of file object.c.
References id_inspect, NULL, rb_default_external_encoding(), rb_default_internal_encoding(), rb_enc_asciicompat, rb_enc_get(), rb_enc_str_asciionly_p(), rb_funcallv, rb_obj_as_string(), and rb_str_escape().
Referenced by append_method(), cannot_be_coerced_into_BigDecimal(), coerce_failed(), control_frame_dump(), env_inspect(), foleparam_inspect(), folerecord_inspect(), folevariable_inspect(), inspect_ary(), inspect_enumerator(), inspect_i(), inspect_range(), inspect_struct(), method_inspect(), name_err_mesg_to_str(), nucomp_inspect(), ole_val2variant_err(), opobj_inspect(), rb_cmperr(), rb_hash_fetch_m(), rb_insn_operand_intern(), rb_mod_to_s(), rb_p(), rb_stat_inspect(), rb_str_format(), rb_vmdebug_debug_print_post(), rb_vmdebug_proc_dump_raw(), rb_vmdebug_stack_dump_th(), ruby__sfvextra(), and wmap_inspect_i().
Definition at line 2736 of file object.c.
References rb_convert_to_integer().
Referenced by asn1time_to_time(), format_value(), function_call(), get_freefunc(), initialize(), ossl_x509stctx_set_time(), rb_fiddle_ptr_initialize(), rb_fiddle_ptr_s_to_ptr(), rb_gzfile_set_mtime(), rb_str_format(), time_mdump(), time_to_time_t(), and value_to_generic().
|
static |
Definition at line 1970 of file object.c.
References rb_is_const_id(), and rb_is_local_id().
|
static |
Definition at line 1964 of file object.c.
References rb_is_const_name(), and rb_is_local_name().
Definition at line 2011 of file object.c.
References id_for_attr(), Qfalse, Qnil, Qtrue, rb_attr(), rb_mod_attr_reader(), rb_warning(), RTEST, and TRUE.
Referenced by InitVM_Object().
Definition at line 2060 of file object.c.
References argc, id_for_attr(), Qnil, rb_attr(), and TRUE.
Referenced by InitVM_Object().
Definition at line 2000 of file object.c.
References argc, FALSE, id_for_attr(), Qnil, rb_attr(), and TRUE.
Referenced by InitVM_Object(), and rb_mod_attr().
Definition at line 2032 of file object.c.
References argc, FALSE, id_for_attr(), Qnil, rb_attr(), and TRUE.
Referenced by InitVM_Object().
Definition at line 1681 of file object.c.
References CLASS_OR_MODULE_P, cmp(), INT2FIX, NIL_P, Qnil, and rb_class_inherited_p().
Referenced by InitVM_Object().
Definition at line 2269 of file object.c.
References id, ID2SYM, ISUPPER, len, name, OBJ_FREEZE, PRIsVALUE, Qfalse, Qtrue, QUOTE, rb_check_arity, rb_check_id(), rb_check_id_cstr(), rb_cObject, rb_const_defined(), rb_const_defined_at(), rb_const_get(), rb_const_get_at(), rb_eArgError, rb_enc_asciicompat, rb_enc_get(), rb_eTypeError, rb_is_const_id(), rb_is_const_name(), rb_is_const_sym(), rb_name_err_raise, rb_raise(), rb_str_subseq(), RB_TYPE_P, recur, RSTRING_LEN, RTEST, StringValuePtr, SYMBOL_P, T_CLASS, and T_MODULE.
Referenced by InitVM_Object().
Definition at line 2111 of file object.c.
References CLASS_OF, id, ID2SYM, id_const_missing, ISUPPER, len, mod, name, OBJ_FREEZE, PRIsVALUE, Qtrue, QUOTE, rb_check_arity, rb_check_id(), rb_check_id_cstr(), rb_cObject, rb_const_get(), rb_const_get_at(), rb_const_missing(), rb_eArgError, rb_enc_asciicompat, rb_enc_get(), rb_eTypeError, rb_is_const_id(), rb_is_const_name(), rb_is_const_sym(), rb_method_basic_definition_p(), rb_mod_const_missing(), rb_name_err_raise, rb_raise(), rb_str_intern(), rb_str_subseq(), RB_TYPE_P, recur, RSTRING_LEN, RTEST, StringValuePtr, SYMBOL_P, T_CLASS, and T_MODULE.
Referenced by InitVM_Object().
Definition at line 2218 of file object.c.
References id_for_setter, rb_const_set(), and rb_intern_str.
Referenced by InitVM_Object().
Definition at line 2530 of file object.c.
References id_for_var, Qfalse, and rb_cvar_defined().
Referenced by InitVM_Object().
Definition at line 2473 of file object.c.
References id_for_var, rb_cvar_get(), and rb_name_err_raise.
Referenced by InitVM_Object().
Definition at line 2505 of file object.c.
References id_for_var, rb_cvar_set(), rb_intern_str, and val.
Referenced by InitVM_Object().
Definition at line 1575 of file object.c.
References rb_obj_is_kind_of().
Referenced by InitVM_Object().
Definition at line 1558 of file object.c.
References rb_class_name(), and rb_obj_freeze().
Referenced by InitVM_Object().
Definition at line 1641 of file object.c.
References CLASS_OR_MODULE_P, rb_class_inherited_p(), rb_eTypeError, and rb_raise().
Referenced by InitVM_Object(), and rb_mod_gt().
Definition at line 1662 of file object.c.
References Qfalse, and rb_mod_ge().
Referenced by InitVM_Object().
Definition at line 1740 of file object.c.
References Qnil, rb_block_given_p(), and rb_mod_module_exec().
Referenced by InitVM_Object(), and rb_class_initialize().
Definition at line 1750 of file object.c.
References OBJ_FROZEN, rb_class_name(), and rb_obj_init_dup_clone().
Referenced by InitVM_Object().
Definition at line 1621 of file object.c.
References Qfalse, and rb_class_inherited_p().
Referenced by InitVM_Object().
Definition at line 2554 of file object.c.
References FL_SINGLETON, FL_TEST, Qfalse, Qtrue, RB_TYPE_P, and T_CLASS.
Referenced by InitVM_Object().
Definition at line 1514 of file object.c.
References CLASS_OR_MODULE_P, CONST_ID, FL_SINGLETON, FL_TEST, NIL_P, rb_any_to_s(), rb_attr_get(), rb_class_name(), rb_inspect(), rb_ivar_get(), rb_refinement_module_get_refined_class(), rb_str_append(), rb_str_cat2(), rb_str_concat(), rb_str_dup(), and rb_usascii_str_new2.
Referenced by InitVM_Object().
Definition at line 1699 of file object.c.
References mod, rb_module_new(), and RBASIC_SET_CLASS.
Referenced by InitVM_Object().
double rb_num2dbl | ( | VALUE | val | ) |
Definition at line 3067 of file object.c.
References big2dbl_without_to_f, BUILTIN_TYPE, fix2dbl_without_to_f, FIXNUM_P, FLONUM_P, implicit_conversion_to_float(), rat2dbl_without_to_f, rb_convert_type(), rb_eTypeError, rb_float_flonum_value(), rb_float_noflonum_value(), rb_raise(), RFLOAT_VALUE, SPECIAL_CONST_P, T_BIGNUM, T_FLOAT, T_RATIONAL, and T_STRING.
Referenced by rb_ary_sum(), sum_iter(), and thread_join_m().
double rb_num_to_dbl | ( | VALUE | val | ) |
Definition at line 3034 of file object.c.
References basic_to_f_p(), big2dbl_without_to_f, BUILTIN_TYPE, conversion_to_float(), fix2dbl_without_to_f, FIXNUM_P, FLONUM_P, numeric_to_float(), rat2dbl_without_to_f, rb_cInteger, rb_cRational, rb_float_flonum_value(), rb_float_noflonum_value(), RFLOAT_VALUE, SPECIAL_CONST_P, T_BIGNUM, T_FLOAT, and T_RATIONAL.
Definition at line 1845 of file object.c.
References FL_SINGLETON, FL_TEST, rb_cBasicObject, rb_class2name(), rb_class_real(), rb_eTypeError, rb_get_alloc_func(), rb_obj_class(), rb_raise(), rb_undefined_alloc(), RCLASS_SUPER, and RUBY_DTRACE_CREATE_HOOK.
Referenced by bsock_s_for_fd(), build_exception(), enum_chunk(), enum_chunk_while(), enum_slice_after(), enum_slice_before(), enum_slice_when(), Init_Hash(), Init_readline(), Init_Thread(), Init_top_self(), InitVM_Object(), int_ossl_asn1_decode0_cons(), int_ossl_asn1_decode0_prim(), obj_alloc_by_klass(), ossl_sslctx_session_new_cb(), ossl_sslctx_session_remove_cb(), pty_getpty(), pty_open(), r_object0(), rb_catch(), rb_class_new_instance(), rb_digest_class_s_digest(), rb_f_catch(), rb_io_s_for_fd(), rb_last_status_set(), rb_name_err_new(), rb_obj_clone2(), rb_obj_dup(), rb_range_new(), rsock_s_accept(), rsock_s_accept_nonblock(), ruby_vm_special_exception_copy(), sock_initialize(), and str_cat_conv_enc_opts().
Definition at line 229 of file object.c.
References CLASS_OF, and rb_class_real().
Referenced by ary_make_shared_copy(), BIGNUM_1c(), cannot_be_coerced_into_BigDecimal(), coerce_failed(), conversion_mismatch(), convert_type(), copy_path_class(), d_lite_inspect(), d_lite_plus(), d_lite_to_s(), divmodv(), dup_obj(), dup_obj_as_complex(), enc_inspect(), encoded_dup(), ensure_class_or_module(), enum_zip(), exc_equal(), extract_user_token(), flatten(), gen_ivar_each(), generator_initialize(), generic_ivar_defined(), generic_ivar_delete(), generic_ivar_get(), generic_ivar_remove(), get_new_timeval(), get_timeval(), InitVM_Object(), inspect_enumerator(), inspect_struct(), io_reopen(), iv_index_tbl_make(), lazy_zip(), match_inspect(), method_super_method(), mString_to_json_raw_object(), mSyslog_log(), must_respond_to(), name_err_mesg_equal(), not_encoding(), nucomp_coerce(), num_exact(), num_init_copy(), num_sadded(), numeric_to_float(), ossl_asn1_default_tag(), ossl_asn1cons_to_der(), ossl_cipher_init(), ossl_dh_to_public_key(), ossl_dsa_to_public_key(), ossl_engine_inspect(), ossl_rsa_to_public_key(), ossl_x509_inspect(), parser_compile_error(), path_basename(), path_dirname(), path_each_entry(), path_entries(), path_expand_path(), path_readlink(), path_realdirpath(), path_realpath(), path_split(), path_sub(), path_sub_ext(), raise_method_missing(), random_equal(), rb_ary_bsearch_index(), rb_ary_slice_bang(), rb_ary_subseq(), rb_ary_times(), rb_ary_to_a(), rb_ary_to_h(), rb_ary_uniq(), rb_check_inheritable(), rb_check_typeddata(), rb_cmperr(), rb_define_class(), rb_define_class_id_under(), rb_define_module(), rb_define_module_id_under(), rb_digest_base_block_length(), rb_digest_base_copy(), rb_digest_base_digest_length(), rb_digest_base_finish(), rb_digest_base_reset(), rb_digest_base_update(), rb_dup_setup(), rb_generic_ivar_table(), rb_hash_aset(), rb_hash_dup(), rb_hash_to_h(), rb_obj_alloc(), rb_obj_clone2(), rb_obj_dup(), rb_obj_init_copy(), rb_obj_is_instance_of(), rb_profile_frame_classpath(), rb_stat_cmp(), rb_str_dup(), rb_str_justify(), rb_str_new_frozen(), rb_str_new_shared(), rb_str_new_with_class(), rb_str_times(), rb_str_to_s(), rb_struct_eql(), rb_struct_equal(), rb_struct_hash(), rb_struct_initialize_m(), rb_struct_members(), rb_struct_members_m(), rb_thread_inspect(), rb_tmp_class_path(), rb_vm_bugreport(), setup_exception(), should_be_callable(), str_byte_substr(), str_gsub(), str_substr(), strscan_inspect(), struct_member_pos(), syserr_initialize(), take_items(), time_dup(), time_timespec(), undumpable(), unexpected_type(), vm_search_super_method(), and w_object().
Definition at line 388 of file object.c.
References NULL, and rb_obj_clone2().
Referenced by exc_exception(), rb_digest_instance_digest(), rb_digest_instance_hexdigest(), rb_digest_instance_new(), rb_eval_string_wrap(), and rb_load_internal0().
Definition at line 340 of file object.c.
References CONST_ID, FL_FINALIZE, FL_FREEZE, FL_PROMOTED0, FL_PROMOTED1, FL_SINGLETON, FL_TAINT, FL_TEST, id_init_clone, init_copy(), NIL_P, Qfalse, Qtrue, Qundef, rb_builtin_class_name(), rb_eArgError, rb_funcall(), rb_get_kwargs(), rb_obj_alloc(), rb_obj_class(), rb_obj_classname(), rb_raise(), rb_scan_args(), rb_singleton_class_attached(), rb_singleton_class_clone_and_attach(), RBASIC, RBASIC_SET_CLASS, and special_object_p().
Referenced by InitVM_Object(), and rb_obj_clone().
Definition at line 1469 of file object.c.
References INT2FIX, Qnil, and rb_equal().
Referenced by InitVM_Object().
Definition at line 258 of file object.c.
References ALLOC_N, len, MEMCPY, RBASIC, ROBJECT, ROBJECT_EMBED, ROBJECT_EMBED_LEN_MAX, ROBJECT_IVPTR, and xfree().
Referenced by init_copy(), and ruby_vm_special_exception_copy().
Definition at line 3219 of file object.c.
References argc, argv, BUILTIN_TYPE, dig_basic_p(), NIL_P, no_dig_method(), Qnil, rb_ary_at(), rb_check_funcall_with_hook(), rb_hash_aref(), rb_struct_lookup(), SPECIAL_CONST_P, T_ARRAY, T_HASH, and T_STRUCT.
Referenced by rb_ary_dig(), rb_hash_dig(), and rb_struct_dig().
|
static |
Definition at line 437 of file object.c.
References id_init_dup, init_copy(), rb_funcall(), rb_obj_alloc(), rb_obj_class(), and special_object_p().
Referenced by argf_initialize_copy(), enumerator_each(), InitVM_Object(), path_initialize(), path_to_s(), rb_hash_merge(), rb_io_init_copy(), and setup_exception().
Definition at line 139 of file object.c.
References LONG2FIX, NUM2LONG, Qfalse, Qtrue, rb_obj_hash(), rb_obj_id(), and rb_objid_hash().
Referenced by InitVM_Object(), and opt_eq_func().
Definition at line 1111 of file object.c.
References OBJ_FREEZE, OBJ_FROZEN, rb_bug(), and SPECIAL_CONST_P.
Referenced by console_dev(), env_enc_str_new(), ibf_load_object_array(), ibf_load_object_bignum(), ibf_load_object_complex_rational(), ibf_load_object_hash(), ibf_load_object_regexp(), ibf_load_object_struct(), Init_File(), Init_ossl_ssl(), Init_strscan(), Init_VM(), InitVM_Object(), iseq_compile_each(), mk_ary_of_str(), ossl_sslctx_setup(), prep_io(), process_options(), pty_getpty(), pty_open(), rb_ary_flatten_bang(), rb_ary_freeze(), rb_construct_expanded_load_path(), rb_hash_freeze(), rb_insns_name_array(), rb_mod_freeze(), rb_str_freeze(), rb_vm_register_special_exception(), ruby_init_loadpath_safe(), setup_gc_stat_symbols(), str_upto_each(), and vm_default_params().
Definition at line 1134 of file object.c.
References OBJ_FROZEN, Qfalse, and Qtrue.
Referenced by dump_object(), and InitVM_Object().
Definition at line 263 of file hash.c.
References any_hash(), objid_hash(), and ST2FIX.
Referenced by InitVM_Object(), and rb_obj_equal().
Definition at line 51 of file object.c.
References RBASIC_CLEAR_CLASS, and SPECIAL_CONST_P.
Referenced by enum_uniq(), ibf_load_object_array(), ibf_load_object_bignum(), ibf_load_object_complex_rational(), ibf_load_object_hash(), ibf_load_object_regexp(), ibf_load_object_string(), ibf_load_object_struct(), Init_sym(), lazy_uniq(), parser_set_compile_option_flag(), power_cache_get_power(), rb_coverage_start(), setup_gc_stat_symbols(), yycompile0(), zstream_append_buffer(), zstream_append_input(), and zstream_expand_buffer_into().
Definition at line 1081 of file object.c.
References OBJ_INFECT.
Definition at line 470 of file object.c.
References rb_check_frozen, rb_check_trusted(), rb_eTypeError, rb_obj_class(), rb_raise(), and TYPE.
Referenced by InitVM_Object().
Definition at line 483 of file object.c.
References id_init_copy, and rb_funcall().
Referenced by InitVM_Object(), and rb_mod_initialize_clone().
Definition at line 602 of file object.c.
References CLASS_OF, inspect_obj(), PRIsVALUE, rb_any_to_s(), rb_class_name(), rb_exec_recursive(), rb_ivar_count(), and rb_sprintf().
Referenced by InitVM_Object().
Definition at line 653 of file object.c.
References class_or_module_required(), Qfalse, Qtrue, and rb_obj_class().
Referenced by error_handle(), InitVM_Object(), ossl_pkey_initialize(), ossl_ssl_session_initialize(), ossl_ssl_session_set_time(), ossl_sslctx_flush_sessions(), and ossl_sslctx_session_get_cb().
Definition at line 690 of file object.c.
References CLASS_OF, class_or_module_required(), class_search_ancestor(), Qfalse, Qtrue, and RCLASS_ORIGIN.
Referenced by case_when_optimizable_literal(), check_match(), check_step_domain(), check_type_val2variant(), cState_from_state_s(), discrete_object_p(), errinfo_getter(), error_handle(), ev_advise(), EVENTSINK_Invoke(), f_kind_of_p(), fole_s_const_load(), fole_s_show_help(), folemethod_initialize(), foleparam_initialize(), folerecord_initialize(), GetCipherPtr(), gzfile_read_raw_rescue(), host_str(), ibf_dump_object_struct(), InitVM_Object(), linear_object_p(), make_exception(), numeric_to_float(), ole_invoke(), ole_val2variant(), ole_val2variant_err(), os_obj_of_i(), ossl_asn1cons_to_der(), ossl_asn1data_to_der(), ossl_bn_coerce(), ossl_bn_eql(), ossl_bn_initialize(), ossl_sslctx_add_extra_chain_cert_i(), ossl_x509name_eql(), parse(), path_cmp(), path_eq(), range_eq(), range_eql(), range_max(), range_size(), range_step(), range_step_size(), rb_ary_bsearch_index(), rb_check_to_float(), rb_check_to_integer(), rb_digest_instance_equal(), rb_enumeratorize_with_size(), rb_fiddle_ptr2cptr(), rb_fiddle_ptr_aset(), rb_fiddle_ptr_cmp(), rb_fiddle_ptr_eql(), rb_fiddle_ptr_s_to_ptr(), rb_method_call_status(), rb_mod_eqq(), rb_range_values(), rb_rescue2(), rb_set_errinfo(), rb_stat_cmp(), rb_thread_pending_interrupt_p(), rb_to_integer(), ruby_cleanup(), setup_exception(), syserr_eqq(), thread_start_func_2(), total_i(), try_convert_to_bn(), umethod_bind(), vm_call_method(), vm_defined(), and vm_search_super_method().
Definition at line 463 of file object.c.
Referenced by InitVM_Object().
Definition at line 2446 of file object.c.
References id_for_var, Qfalse, and rb_ivar_defined().
Referenced by InitVM_Object().
Definition at line 2384 of file object.c.
References id_for_var, Qnil, and rb_ivar_get().
Referenced by InitVM_Object().
Definition at line 2418 of file object.c.
References id_for_var, rb_intern_str, and rb_ivar_set().
Referenced by InitVM_Object().
Definition at line 200 of file object.c.
References id_eq, Qfalse, Qtrue, rb_funcall(), result, and RTEST.
Referenced by InitVM_Object().
Definition at line 1443 of file object.c.
References id_match, Qfalse, Qtrue, rb_funcall(), result, and RTEST.
Referenced by InitVM_Object().
Definition at line 60 of file object.c.
References RBASIC_SET_CLASS, and SPECIAL_CONST_P.
Referenced by zstream_detach_buffer(), zstream_detach_input(), and zstream_expand_buffer().
Definition at line 69 of file object.c.
References RBASIC, and RBASIC_SET_CLASS.
Referenced by rb_clone_setup(), and rb_dup_setup().
Definition at line 252 of file object.c.
References rb_singleton_class().
Referenced by InitVM_Object().
Definition at line 1008 of file object.c.
References OBJ_TAINT, OBJ_TAINTABLE, OBJ_TAINTED, and rb_check_frozen.
Referenced by InitVM_Object(), pack_pack(), path_taint(), rb_file_path(), rb_obj_untrust(), rsock_s_recvfrom(), and rsock_s_recvfrom_nonblock().
Definition at line 983 of file object.c.
References OBJ_TAINTED, Qfalse, and Qtrue.
Referenced by InitVM_Object(), and rb_obj_untrusted().
Definition at line 1074 of file object.c.
References rb_obj_untaint(), and rb_warning().
Referenced by InitVM_Object().
Definition at line 1028 of file object.c.
References FL_TAINT, FL_UNSET, OBJ_TAINTED, and rb_check_frozen.
Referenced by InitVM_Object(), path_untaint(), and rb_obj_trust().
Definition at line 1059 of file object.c.
References rb_obj_taint(), and rb_warning().
Referenced by InitVM_Object().
Definition at line 1045 of file object.c.
References rb_obj_tainted(), and rb_warning().
Referenced by InitVM_Object().
Definition at line 5588 of file string.c.
References buf, CHAR_ESC_LEN, ENC_CODERANGE_7BIT, ENCODING_CODERANGE_SET, ENCODING_GET, ISPRINT, MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, OBJ_INFECT_RAW, rb_enc_asciicompat, rb_enc_from_index(), rb_enc_isascii, rb_enc_mbc_to_codepoint, rb_enc_mbminlen, rb_enc_precise_mbclen(), rb_enc_unicode_p(), rb_str_buf_cat_escaped_char(), rb_str_buf_new(), rb_usascii_encindex(), result, RSTRING_END, RSTRING_PTR, snprintf, str_buf_cat(), and strlen().
Referenced by rb_any_to_s(), and rb_inspect().
double rb_str_to_dbl | ( | VALUE | str, |
int | badcheck | ||
) |
Definition at line 2869 of file object.c.
References ALLOCV, ALLOCV_END, len, MEMCPY, rb_cstr_to_dbl(), rb_eArgError, rb_raise(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by f_to_f(), rb_Float(), and rb_str_to_f().
Definition at line 3097 of file object.c.
References NIL_P, rb_check_string_type(), rb_convert_type(), and T_STRING.
Referenced by exc_to_s(), make_version_str(), nucomp_to_s(), ossl_sslctx_set_ciphers(), and rb_f_string().
Definition at line 3006 of file object.c.
References numeric_to_float(), T_FLOAT, to_float(), and val.
Referenced by pack_pack(), and rand_range().
Definition at line 2687 of file object.c.
References rb_to_integer().
Referenced by check_exec_redirect(), check_step_domain(), econv_args(), econv_primitive_convert(), enumerator_initialize(), enumerator_with_index(), fix_aref(), obj2vint(), pack_pack(), random_bytes(), random_init(), random_load(), range_bsearch(), rb_absint_singlebit_p(), rb_absint_size(), rb_big_lshift(), rb_big_rshift(), rb_f_rand(), rb_f_srand(), rb_hash(), rb_int_digits(), rb_integer_pack(), rb_io_extract_modeenc(), rb_num2fix(), rb_num2long(), rb_num2ulong_internal(), rb_random_ulong_limited(), sockopt_pack_byte(), sockopt_pack_int(), time_nsec(), time_round(), and time_usec().
Definition at line 2659 of file object.c.
References conversion_mismatch(), convert_type(), FIXNUM_P, rb_cInteger, rb_obj_is_kind_of(), RB_TYPE_P, T_BIGNUM, TRUE, and val.
Referenced by rb_convert_to_integer(), and rb_to_int().
void rb_undefined_alloc | ( | VALUE | klass | ) |
Definition at line 1816 of file object.c.
References PRIsVALUE, rb_eTypeError, and rb_raise().
Referenced by enc_s_alloc(), and rb_obj_alloc().
|
inlinestatic |
Definition at line 301 of file object.c.
References BUILTIN_TYPE, FALSE, SPECIAL_CONST_P, T_BIGNUM, T_FLOAT, T_SYMBOL, and TRUE.
Referenced by rb_obj_clone2(), and rb_obj_dup().
|
static |
Definition at line 2927 of file object.c.
References big2dbl_without_to_f, BUILTIN_TYPE, conversion_to_float(), DBL2NUM, fix2dbl_without_to_f, FIXNUM_P, FLONUM_P, rat2dbl_without_to_f, SPECIAL_CONST_P, T_BIGNUM, T_FLOAT, T_NONE, T_RATIONAL, T_STRING, and val.
Referenced by rb_Float(), and rb_to_float().
Definition at line 1255 of file object.c.
References rb_usascii_str_new2.
Referenced by InitVM_Object().
|
static |
VALUE rb_cBasicObject |
Definition at line 26 of file object.c.
Referenced by InitVM_Object(), rb_class_initialize(), rb_class_superclass(), and rb_obj_alloc().
VALUE rb_cClass |
Definition at line 30 of file object.c.
Referenced by InitVM_Object().
VALUE rb_cData |
Definition at line 31 of file object.c.
Referenced by InitVM_Object().
VALUE rb_cFalseClass |
Definition at line 35 of file object.c.
Referenced by InitVM_Object().
VALUE rb_cModule |
Definition at line 29 of file object.c.
Referenced by InitVM_Object().
VALUE rb_cNilClass |
Definition at line 33 of file object.c.
Referenced by InitVM_Object().
VALUE rb_cObject |
Definition at line 28 of file object.c.
Referenced by InitVM_Object(), rb_class_initialize(), rb_mod_const_defined(), and rb_mod_const_get().
VALUE rb_cTrueClass |
Definition at line 34 of file object.c.
Referenced by InitVM_Object().
VALUE rb_mKernel |
Definition at line 27 of file object.c.
Referenced by InitVM_Object().