Ruby 2.1.5p273(2014-11-13revision48405)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Functions | Variables
internal.h File Reference

Go to the source code of this file.

## Data Structures
struct | rb_deprecated_classext_struct
struct | rb_subclass_entry
struct | rb_classext_struct
struct | method_table_wrapper
struct | RBasicRaw
struct | rb_execarg

## Macros
#define | VALGRIND_MAKE_MEM_DEFINED(p, n) 0
#define | VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
#define | numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
#define | STATIC_ASSERT(name, expr) typedef int static_assert_##name##_check[1 - 2*!(expr)]
#define | GCC_VERSION_SINCE(major, minor, patchlevel)
#define | SIGNED_INTEGER_TYPE_P(int_type) (0 > ((int_type)0)-1)
#define | SIGNED_INTEGER_MAX(sint_type)
#define | SIGNED_INTEGER_MIN(sint_type) (-SIGNED_INTEGER_MAX(sint_type)-1)
#define | UNSIGNED_INTEGER_MAX(uint_type) (~(uint_type)0)
#define | TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1))
#define | MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max)
#define | MUL_OVERFLOW_FIXNUM_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
#define | MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
#define | MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)
#define | swap16(x) ((uint16_t)((((x)&0xFF)<<8) | (((x)>>8)&0xFF)))
#define | swap32(x)
#define | bit_length(x)
#define | SERIALT2NUM ULONG2NUM
#define | RCLASS_EXT(c) (RCLASS(c)->ptr)
#define | RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
#define | RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
#define | RCLASS_M_TBL_WRAPPER(c) (RCLASS(c)->m_tbl_wrapper)
#define | RCLASS_M_TBL(c) (RCLASS_M_TBL_WRAPPER(c) ? RCLASS_M_TBL_WRAPPER(c)->tbl : 0)
#define | RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
#define | RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin)
#define | RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
#define | RCLASS_SERIAL(c) (RCLASS_EXT(c)->class_serial)
#define | rb_ascii8bit_encindex() ENCINDEX_ASCII
#define | rb_utf8_encindex() ENCINDEX_UTF_8
#define | rb_usascii_encindex() ENCINDEX_US_ASCII
#define | rb_sys_fail_path(path) rb_sys_fail_str(path)
#define | rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path))
#define | SIZED_REALLOC_N(var, type, n, old_n) ((var)=(type*)ruby_sized_xrealloc((char*)(var), (n) * sizeof(type), (old_n) * sizeof(type)))
#define | RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)
#define | HASH_DELETED FL_USER1
#define | HASH_PROC_DEFAULT FL_USER2
#define | rb_float_value(v) rb_float_value_inline(v)
#define | rb_float_new(d) rb_float_new_inline(d)
#define | RBASIC_CLEAR_CLASS(obj) (((struct RBasicRaw *)((VALUE)(obj)))->klass = 0)
#define | RBASIC_SET_CLASS_RAW(obj, cls) (((struct RBasicRaw *)((VALUE)(obj)))->klass = (cls))
#define | RBASIC_SET_CLASS(obj, cls)
#define | RB_MAX_GROUPS (65536)
#define | ARGVSTR2ARGC(argv_str) (RSTRING_LEN(argv_str) / sizeof(char *) - 2)
#define | ARGVSTR2ARGV(argv_str) ((char **)RSTRING_PTR(argv_str) + 1)
#define | QUOTE(str) rb_str_quote_unprintable(str)
#define | QUOTE_ID(id) rb_id_quote_unprintable(id)
#define | STR_NOEMBED FL_USER1
#define | STR_SHARED FL_USER2 /* = ELTS_SHARED */
#define | STR_ASSOC FL_USER3
#define | STR_SHARED_P(s) FL_ALL((s), STR_NOEMBED|ELTS_SHARED)
#define | STR_ASSOC_P(s) FL_ALL((s), STR_NOEMBED|STR_ASSOC)
#define | STR_NOCAPA (STR_NOEMBED|ELTS_SHARED|STR_ASSOC)
#define | STR_NOCAPA_P(s) (FL_TEST((s),STR_NOEMBED) && FL_ANY((s),ELTS_SHARED|STR_ASSOC))
#define | STR_EMBED_P(str) (!FL_TEST((str), STR_NOEMBED))
#define | is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)
#define | is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)
#define | RB_OBJ_GC_FLAGS_MAX 5

## Typedefs
typedef struct rb_subclass_entry | rb_subclass_entry_t
typedef unsigned long | rb_serial_t
typedef void | rb_check_funcall_hook (int, VALUE, ID, int, const VALUE *, VALUE)

## Functions
static int | nlz_int (unsigned int x)
static int | nlz_long (unsigned long x)
void | rb_class_subclass_add (VALUE super, VALUE klass)
void | rb_class_remove_from_super_subclasses (VALUE)
static void | RCLASS_M_TBL_INIT (VALUE c)
static VALUE | RCLASS_SUPER (VALUE klass)
static VALUE | RCLASS_SET_SUPER (VALUE klass, VALUE super)
VALUE | rb_ary_last (int, VALUE *, VALUE)
void | rb_ary_set_len (VALUE, long)
void | rb_ary_delete_same (VALUE, VALUE)
VALUE | rb_big_fdiv (VALUE x, VALUE y)
VALUE | rb_big_uminus (VALUE x)
VALUE | rb_integer_float_cmp (VALUE x, VALUE y)
VALUE | rb_integer_float_eq (VALUE x, VALUE y)
void | rb_class_foreach_subclass (VALUE klass, void(*f)(VALUE))
void | rb_class_detach_subclasses (VALUE)
void | rb_class_detach_module_subclasses (VALUE)
void | rb_class_remove_from_module_subclasses (VALUE)
VALUE | rb_obj_methods (int argc, VALUE *argv, VALUE obj)
VALUE | rb_obj_protected_methods (int argc, VALUE *argv, VALUE obj)
VALUE | rb_obj_private_methods (int argc, VALUE *argv, VALUE obj)
VALUE | rb_obj_public_methods (int argc, VALUE *argv, VALUE obj)
int | rb_obj_basic_to_s_p (VALUE)
VALUE | rb_special_singleton_class (VALUE)
VALUE | rb_singleton_class_clone_and_attach (VALUE obj, VALUE attach)
VALUE | rb_singleton_class_get (VALUE obj)
| Returns the singleton class of obj, or nil if obj is not a singleton object. More...
void | Init_class_hierarchy (void)
VALUE | rb_invcmp (VALUE, VALUE)
int | rb_dvar_defined (ID)
int | rb_local_defined (ID)
int | rb_parse_in_eval (void)
int | rb_parse_in_main (void)
const char * | rb_insns_name (int i)
VALUE | rb_insns_name_array (void)
VALUE | rb_obj_is_fiber (VALUE)
void | rb_fiber_reset_root_local_storage (VALUE)
void | ruby_register_rollback_func_for_ensure (VALUE(*ensure_func)(ANYARGS), VALUE(*rollback_func)(ANYARGS))
| PRINTF_ARGS (void ruby_debug_printf(const char *,...), 1, 2)
void | Init_ext (void)
ID | rb_id_encoding (void)
void | rb_gc_mark_encodings (void)
| NORETURN (PRINTF_ARGS(void rb_compile_bug(const char *, int, const char *,...), 3, 4))
VALUE | rb_check_backtrace (VALUE)
| NORETURN (void rb_async_bug_errno(const char *, int))
const char * | rb_builtin_type_name (int t)
const char * | rb_builtin_class_name (VALUE x)
VALUE | rb_refinement_module_get_refined_class (VALUE module)
void | ruby_error_print (void)
VALUE | rb_get_backtrace (VALUE info)
void | rb_call_end_proc (VALUE data)
void | rb_mark_end_proc (void)
VALUE | rb_home_dir_of (VALUE user, VALUE result)
VALUE | rb_default_home_dir (VALUE result)
VALUE | rb_realpath_internal (VALUE basedir, VALUE path, int strict)
void | rb_file_const (const char *, VALUE)
int | rb_file_load_ok (const char *)
VALUE | rb_file_expand_path_fast (VALUE, VALUE)
VALUE | rb_file_expand_path_internal (VALUE, VALUE, int, int, VALUE)
VALUE | rb_get_path_check_to_string (VALUE, int)
VALUE | rb_get_path_check_convert (VALUE, VALUE, int)
void | Init_File (void)
void | Init_heap (void)
void * | ruby_mimmalloc (size_t size)
void | ruby_mimfree (void *ptr)
void | rb_objspace_set_event_hook (const rb_event_flag_t event)
void | rb_gc_writebarrier_remember_promoted (VALUE obj)
void | ruby_gc_set_params (int safe_level)
void * | ruby_sized_xrealloc (void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2))
void * | ruby_sized_xrealloc2 (void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_ALLOC_SIZE((2
void void | ruby_sized_xfree (void *x, size_t size)
void | rb_gc_resurrect (VALUE ptr)
struct st_table * | rb_hash_tbl_raw (VALUE hash)
VALUE | rb_hash_keys (VALUE hash)
VALUE | rb_hash_values (VALUE hash)
void | rb_call_inits (void)
const char * | ruby_get_inplace_mode (void)
void | ruby_set_inplace_mode (const char *)
ssize_t | rb_io_bufread (VALUE io, void *buf, size_t size)
void | rb_stdio_set_default_encoding (void)
void | rb_write_error_str (VALUE mesg)
VALUE | rb_io_flush_raw (VALUE, int)
VALUE | rb_iseq_clone (VALUE iseqval, VALUE newcbase)
VALUE | rb_iseq_path (VALUE iseqval)
VALUE | rb_iseq_absolute_path (VALUE iseqval)
VALUE | rb_iseq_label (VALUE iseqval)
VALUE | rb_iseq_base_label (VALUE iseqval)
VALUE | rb_iseq_first_lineno (VALUE iseqval)
VALUE | rb_iseq_klass (VALUE iseqval)
VALUE | rb_iseq_method_name (VALUE self)
VALUE | rb_get_load_path (void)
VALUE | rb_get_expanded_load_path (void)
| NORETURN (void rb_load_fail(VALUE, const char *))
VALUE | rb_math_atan2 (VALUE, VALUE)
VALUE | rb_math_cos (VALUE)
VALUE | rb_math_cosh (VALUE)
VALUE | rb_math_exp (VALUE)
VALUE | rb_math_hypot (VALUE, VALUE)
VALUE | rb_math_log (int argc, VALUE *argv)
VALUE | rb_math_sin (VALUE)
VALUE | rb_math_sinh (VALUE)
VALUE | rb_math_sqrt (VALUE)
void | Init_newline (void)
int | rb_num_to_uint (VALUE val, unsigned int *ret)
VALUE | ruby_num_interval_step_size (VALUE from, VALUE to, VALUE step, int excl)
int | ruby_float_step (VALUE from, VALUE to, VALUE step, int excl)
double | ruby_float_mod (double x, double y)
int | rb_num_negative_p (VALUE)
VALUE | rb_int_succ (VALUE num)
VALUE | rb_int_pred (VALUE num)
static double | rb_float_value_inline (VALUE v)
static VALUE | rb_float_new_inline (double d)
void | rb_obj_copy_ivar (VALUE dest, VALUE obj)
VALUE | rb_obj_equal (VALUE obj1, VALUE obj2)
VALUE | rb_class_search_ancestor (VALUE klass, VALUE super)
VALUE | rb_parser_get_yydebug (VALUE)
VALUE | rb_parser_set_yydebug (VALUE, VALUE)
int | rb_is_const_name (VALUE name)
int | rb_is_class_name (VALUE name)
int | rb_is_global_name (VALUE name)
int | rb_is_instance_name (VALUE name)
int | rb_is_attrset_name (VALUE name)
int | rb_is_local_name (VALUE name)
int | rb_is_method_name (VALUE name)
int | rb_is_junk_name (VALUE name)
void | rb_gc_mark_parser (void)
void | rb_gc_mark_symbols (int full_mark)
VALUE | rb_proc_location (VALUE self)
st_index_t | rb_hash_proc (st_index_t hash, VALUE proc)
int | rb_block_arity (void)
rb_pid_t | rb_fork_ruby (int *status)
void | rb_last_status_clear (void)
VALUE | rb_lcm (VALUE x, VALUE y)
VALUE | rb_rational_reciprocal (VALUE x)
VALUE | rb_reg_compile (VALUE str, int options, const char *sourcefile, int sourceline)
VALUE | rb_reg_check_preprocess (VALUE)
int | rb_get_next_signal (void)
int | rb_sigaltstack_size (void)
VALUE | rb_fstring (VALUE)
int | rb_str_buf_cat_escaped_char (VALUE result, unsigned int c, int unicode_p)
int | rb_str_symname_p (VALUE)
VALUE | rb_str_quote_unprintable (VALUE)
VALUE | rb_id_quote_unprintable (ID)
void | rb_str_fill_terminator (VALUE str, const int termlen)
VALUE | rb_str_locktmp_ensure (VALUE str, VALUE(*func)(VALUE), VALUE arg)
VALUE | rb_struct_init_copy (VALUE copy, VALUE s)
struct timeval | rb_time_timeval (VALUE)
VALUE | rb_obj_is_mutex (VALUE obj)
VALUE | rb_suppress_tracing (VALUE(*func)(VALUE), VALUE arg)
void | rb_thread_execute_interrupts (VALUE th)
void | rb_clear_trace_func (void)
VALUE | rb_get_coverages (void)
VALUE | rb_thread_shield_new (void)
VALUE | rb_thread_shield_wait (VALUE self)
VALUE | rb_thread_shield_release (VALUE self)
VALUE | rb_thread_shield_destroy (VALUE self)
void | rb_mutex_allow_trap (VALUE self, int val)
VALUE | rb_uninterruptible (VALUE(*b_proc)(ANYARGS), VALUE data)
VALUE | rb_mutex_owned_p (VALUE self)
void | ruby_kill (rb_pid_t pid, int sig)
void | Init_native_thread (void)
rb_serial_t | rb_next_class_serial (void)
VALUE | rb_obj_is_thread (VALUE obj)
void | rb_vm_mark (void *ptr)
void | Init_BareVM (void)
VALUE | rb_vm_top_self (void)
void | rb_thread_recycle_stack_release (VALUE *)
void | rb_vm_change_state (void)
void | rb_vm_inc_const_missing_count (void)
void | rb_thread_mark (void *th)
const void ** | rb_vm_get_insns_address_table (void)
VALUE | rb_sourcefilename (void)
void | rb_vm_pop_cfunc_frame (void)
void | rb_vm_bugreport (void)
void | rb_print_backtrace (void)
void | Init_vm_eval (void)
VALUE | rb_current_realfilepath (void)
VALUE | rb_check_block_call (VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE)
VALUE | rb_check_funcall_with_hook (VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg)
VALUE | rb_catch_protect (VALUE t, rb_block_call_func *func, VALUE data, int *stateptr)
VALUE | rb_equal_opt (VALUE obj1, VALUE obj2)
int | rb_get_kwargs (VALUE keyword_hash, const ID *table, int required, int optional, VALUE *)
VALUE | rb_extract_keywords (VALUE *orighash)
void | Init_eval_method (void)
int | rb_method_defined_by (VALUE obj, ID mid, VALUE(*cfunc)(ANYARGS))
void | Init_prelude (void)
void | Init_vm_backtrace (void)
VALUE | rb_vm_thread_backtrace (int argc, VALUE *argv, VALUE thval)
VALUE | rb_vm_thread_backtrace_locations (int argc, VALUE *argv, VALUE thval)
VALUE | rb_make_backtrace (void)
void | rb_backtrace_print_as_bugreport (void)
int | rb_backtrace_p (VALUE obj)
VALUE | rb_backtrace_to_str_ary (VALUE obj)
VALUE | rb_backtrace_to_location_ary (VALUE obj)
void | rb_backtrace_print_to (VALUE output)
VALUE | rb_vm_backtrace_object (void)
RUBY_SYMBOL_EXPORT_BEGIN const char * | rb_objspace_data_type_name (VALUE obj)
VALUE | rb_thread_io_blocking_region (rb_blocking_function_t *func, void *data1, int fd)
VALUE | rb_big_mul_normal (VALUE x, VALUE y)
VALUE | rb_big_mul_balance (VALUE x, VALUE y)
VALUE | rb_big_mul_karatsuba (VALUE x, VALUE y)
VALUE | rb_big_mul_toom3 (VALUE x, VALUE y)
VALUE | rb_big_sq_fast (VALUE x)
VALUE | rb_big_divrem_normal (VALUE x, VALUE y)
VALUE | rb_big2str_poweroftwo (VALUE x, int base)
VALUE | rb_big2str_generic (VALUE x, int base)
VALUE | rb_str2big_poweroftwo (VALUE arg, int base, int badcheck)
VALUE | rb_str2big_normal (VALUE arg, int base, int badcheck)
VALUE | rb_str2big_karatsuba (VALUE arg, int base, int badcheck)
int | rb_bug_reporter_add (void(*func)(FILE *, void *), void *data)
void | rb_maygvl_fd_fix_cloexec (int fd)
VALUE | rb_int_positive_pow (long x, unsigned long y)
int | rb_exec_async_signal_safe (const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen)
rb_pid_t | rb_fork_async_signal_safe (int *status, int(*chfunc)(void *, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen)
VALUE | rb_execarg_new (int argc, VALUE *argv, int accept_shell)
struct rb_execarg * | rb_execarg_get (VALUE execarg_obj)
VALUE | rb_execarg_init (int argc, VALUE *argv, int accept_shell, VALUE execarg_obj)
int | rb_execarg_addopt (VALUE execarg_obj, VALUE key, VALUE val)
void | rb_execarg_fixup (VALUE execarg_obj)
int | rb_execarg_run_options (const struct rb_execarg *e, struct rb_execarg *s, char *errmsg, size_t errmsg_buflen)
VALUE | rb_execarg_extract_options (VALUE execarg_obj, VALUE opthash)
void | rb_execarg_setenv (VALUE execarg_obj, VALUE env)
VALUE | rb_gcd_normal (VALUE self, VALUE other)
void | rb_gc_mark_global_tbl (void)
void | rb_mark_generic_ivar (VALUE)
void | rb_mark_generic_ivar_tbl (void)
int | rb_st_insert_id_and_value (VALUE obj, st_table *tbl, ID key, VALUE value)
st_table * | rb_st_copy (VALUE obj, struct st_table *orig_tbl)
size_t | rb_obj_memsize_of (VALUE)
size_t | rb_obj_gc_flags (VALUE, ID[], size_t)

## Variables
const signed char | ruby_digit36_to_number_table []

## Macro Definition Documentation

#define ARGVSTR2ARGC | ( |  | argv_str | ) | (RSTRING_LEN(argv_str) / sizeof(char *) - 2)

Definition at line 682 of file internal.h.

Referenced by rb_spawn_process().

#define ARGVSTR2ARGV | ( |  | argv_str | ) | ((char **)RSTRING_PTR(argv_str) + 1)

Definition at line 683 of file internal.h.

Referenced by pipe_open(), proc_exec_cmd(), and rb_spawn_process().

#define bit_length | ( |  | x | ) |

Value:
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)))
CHAR_BIT
#define CHAR_BIT
Definition: ruby.h:198
nlz_int
static int nlz_int(unsigned int x)
Definition: internal.h:116
nlz_long
static int nlz_long(unsigned long x)
Definition: internal.h:146

Definition at line 236 of file internal.h.

Referenced by bary_mul_precheck(), big_shift2(), bigdivrem_single1(), rb_big_lshift(), rb_big_rshift(), rb_cstr_to_inum(), rb_fix_bit_length(), and rb_str2big_poweroftwo().

#define GCC_VERSION_SINCE | ( |  | major,
|  |  | minor,
|  |  | patchlevel
| ) |  |

Value:
(defined(__GNUC__) && !defined(__INTEL_COMPILER) && \
((__GNUC__ > (major)) || \
(__GNUC__ == (major) && __GNUC_MINOR__ > (minor)) || \
(__GNUC__ == (major) && __GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))
minor
int minor
Definition: tcltklib.c:111
patchlevel
int patchlevel
Definition: tcltklib.c:113
major
int major
Definition: tcltklib.c:110

Definition at line 39 of file internal.h.

#define HASH_DELETED FL_USER1

Definition at line 481 of file internal.h.

Referenced by hash_foreach_ensure(), hash_foreach_iter(), and rb_hash_delete_key().

#define HASH_PROC_DEFAULT FL_USER2

Definition at line 482 of file internal.h.

Referenced by dump_object(), hash_default_value(), hash_equal(), rb_hash_default(), rb_hash_default_proc(), rb_hash_dup_empty(), rb_hash_initialize(), rb_hash_initialize_copy(), rb_hash_reject(), rb_hash_replace(), rb_hash_set_default(), rb_hash_set_default_proc(), rb_hash_to_h(), and w_object().

#define is_ascii_string | ( |  | str | ) | (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)

Definition at line 729 of file internal.h.

Referenced by dump_object(), rb_str_conv_enc_opts(), rb_str_split_m(), and rb_str_upto().

#define is_broken_string | ( |  | str | ) | (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)

Definition at line 730 of file internal.h.

Referenced by dump_object(), rb_str_chomp_bang(), rb_str_count(), rb_str_index(), rb_str_rindex(), and rb_str_split_m().

#define MUL_OVERFLOW_FIXNUM_P | ( |  | a,
|  |  | b
| ) |  | MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)

Definition at line 68 of file internal.h.

Referenced by fix_mul(), and int_pow().

#define MUL_OVERFLOW_INT_P | ( |  | a,
|  |  | b
| ) |  | MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)

Definition at line 70 of file internal.h.

#define MUL_OVERFLOW_LONG_P | ( |  | a,
|  |  | b
| ) |  | MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)

Definition at line 69 of file internal.h.

Referenced by f_imul(), and rb_ary_product().

#define MUL_OVERFLOW_SIGNED_INTEGER_P | ( |  | a,
|  |  | b,
|  |  | min,
|  |  | max
| ) |  |

Value:
( \
(a) == 0 ? 0 : \
(a) == -1 ? (b) < -(max) : \
(a) > 0 ? \
((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
max
static int max(int a, int b)
Definition: strftime.c:141

Definition at line 62 of file internal.h.

#define numberof | ( |  | array | ) | ((int)(sizeof(array) / sizeof((array)[0])))

Definition at line 35 of file internal.h.

#define QUOTE | ( |  | str | ) | rb_str_quote_unprintable(str)

Definition at line 714 of file internal.h.

Referenced by check_setter_id(), new_struct(), rb_f_untrace_var(), rb_method_name_error(), rb_mod_const_defined(), rb_mod_const_get(), rb_mod_cvar_defined(), rb_mod_cvar_get(), rb_mod_remove_const(), rb_mod_remove_cvar(), rb_obj_ivar_defined(), rb_obj_ivar_get(), rb_obj_remove_instance_variable(), rb_obj_singleton_method(), rb_path_to_class(), rb_print_undef_str(), rb_struct_aref(), rb_struct_aset(), ruby__sfvextra(), and set_const_visibility().

#define QUOTE_ID | ( |  | id | ) | rb_id_quote_unprintable(id)

Definition at line 715 of file internal.h.

Referenced by check_setter_id(), not_a_member(), rb_autoload(), rb_check_attr_id(), rb_const_get_0(), rb_const_remove(), rb_const_set(), rb_cvar_get(), rb_cvar_set(), rb_f_untrace_var(), rb_ivar_get(), rb_mod_const_defined(), rb_mod_const_get(), rb_mod_cvar_defined(), rb_mod_cvar_get(), rb_mod_remove_const(), rb_mod_remove_cvar(), rb_obj_ivar_defined(), rb_obj_ivar_get(), rb_obj_remove_instance_variable(), rb_obj_respond_to(), rb_obj_singleton_method(), rb_print_undef(), rb_undef(), readonly_setter(), set_const_visibility(), set_method_visibility(), undef_getter(), and uninitialized_constant().

#define rb_ascii8bit_encindex | ( |  | void | ) | ENCINDEX_ASCII

Definition at line 402 of file internal.h.

Referenced by code_page(), pack_unpack(), parser_regx_options(), rb_char_to_option_kcode(), and transcode_io().

#define rb_float_new | ( |  | d | ) | rb_float_new_inline(d)

Definition at line 595 of file internal.h.

Referenced by BigDecimal_to_f(), callback(), generic_to_value(), JSON_parse_float(), ole_variant2val(), rand_random(), rand_range(), tkstr_to_float(), and vtdate2rbtime().

#define rb_float_value | ( |  | v | ) | rb_float_value_inline(v)

Definition at line 594 of file internal.h.

#define RB_MAX_GROUPS (65536)

Definition at line 634 of file internal.h.

Referenced by rb_group_member().

#define RB_OBJ_GC_FLAGS_MAX 5

Definition at line 880 of file internal.h.

Referenced by dump_object().

#define rb_sys_fail_path | ( |  | path | ) | rb_sys_fail_str(path)

Definition at line 450 of file internal.h.

Referenced by chmod_internal(), chown_internal(), dir_chdir(), dir_initialize(), dir_s_mkdir(), dir_s_rmdir(), fptr_finalize(), io_fillbuf(), io_fread(), io_getpartial(), io_reopen(), io_write(), io_write_nonblock(), pipe_open(), rb_f_test(), rb_file_atime(), rb_file_chmod(), rb_file_chown(), rb_file_ctime(), rb_file_flock(), rb_file_lstat(), rb_file_mtime(), rb_file_s_atime(), rb_file_s_ctime(), rb_file_s_ftype(), rb_file_s_lstat(), rb_file_s_mtime(), rb_file_s_size(), rb_file_s_stat(), rb_file_size(), rb_io_close_read(), rb_io_close_write(), rb_io_reopen(), rb_io_rewind(), rb_io_seek(), rb_io_set_nonblock(), rb_io_set_pos(), rb_io_stat(), rb_io_sysread(), rb_io_sysseek(), rb_io_syswrite(), rb_io_tell(), rb_ioctl(), rb_stat_init(), rb_sysopen(), realpath_rec(), swallow(), sys_fail2(), and unlink_internal().

#define rb_syserr_fail_path | ( |  | err,
|  |  | path
| ) |  | rb_syserr_fail_str((err), (path))

Definition at line 451 of file internal.h.

Referenced by rb_io_reopen().

#define rb_usascii_encindex | ( |  | void | ) | ENCINDEX_US_ASCII

Definition at line 404 of file internal.h.

Referenced by code_page(), id2encidx(), rb_find_file_ext_safe(), rb_find_file_safe(), rb_usascii_str_new(), rb_usascii_str_new_cstr(), transcode_io(), w_encoding(), and w_symbol().

#define rb_utf8_encindex | ( |  | void | ) | ENCINDEX_UTF_8

Definition at line 403 of file internal.h.

Referenced by id2encidx(), io_strip_bom(), parse(), rb_char_to_option_kcode(), rb_str_scrub(), transcode_io(), transcode_string(), and w_encoding().

#define RBASIC_CLEAR_CLASS | ( |  | obj | ) | (((struct RBasicRaw *)((VALUE)(obj)))->klass = 0)

Definition at line 607 of file internal.h.

Referenced by add_modules(), ary_tmp_hash_new(), coverage(), define_final0(), enum_cycle(), enum_sort_by(), env_reject_bang(), env_select_bang(), hidden_identity_hash_new(), hide_obj(), Init_Encoding(), Init_VM(), rb_apply(), rb_ary_combination(), rb_ary_permutation(), rb_ary_product(), rb_ary_repeated_combination(), rb_ary_repeated_permutation(), rb_ary_sample(), rb_ary_sort_bang(), rb_enc_vsprintf(), rb_file_join(), rb_find_file_ext_safe(), rb_io_s_popen(), rb_iseq_add_mark_object(), rb_obj_hide(), rb_str_associate(), rb_str_conv_enc_opts(), rb_str_vcatf(), run_final(), and thread_create_core().

#define RBASIC_SET_CLASS | ( |  | obj,
|  |  | cls
| ) |  |

Value:
do { \
VALUE _obj_ = (obj); \
RB_OBJ_WRITE(_obj_, &((struct RBasicRaw *)(_obj_))->klass, cls); \
} while (0)
RBasicRaw
Definition: internal.h:602
VALUE
unsigned long VALUE
Definition: ruby.h:88
RB_OBJ_WRITE
#define RB_OBJ_WRITE(a, slot, b)
Definition: ruby.h:1213

Definition at line 609 of file internal.h.

Referenced by copy_path_class(), encoded_dup(), flatten(), fstring_set_class_i(), Init_class_hierarchy(), io_reopen(), make_singleton_class(), proc_new(), r_object0(), rb_ary_slice_bang(), rb_ary_uniq(), rb_include_class_new(), rb_io_s_popen(), rb_mod_init_copy(), rb_module_s_alloc(), rb_obj_clone(), rb_obj_reveal(), rb_obj_setup(), rb_singleton_class_clone_and_attach(), str_gsub(), and syserr_initialize().

#define RBASIC_SET_CLASS_RAW | ( |  | obj,
|  |  | cls
| ) |  | (((struct RBasicRaw *)((VALUE)(obj)))->klass = (cls))

Definition at line 608 of file internal.h.

Referenced by enum_sort_by(), newobj_of(), rb_ary_combination(), rb_ary_permutation(), rb_ary_repeated_combination(), rb_ary_repeated_permutation(), rb_ary_sample(), rb_ary_sort_bang(), rb_enc_vsprintf(), rb_file_join(), rb_id2str(), rb_str_vcatf(), require_libraries(), and setup_fake_str().

#define RCLASS_CONST_TBL | ( |  | c | ) | (RCLASS_EXT(c)->const_tbl)

Definition at line 293 of file internal.h.

Referenced by autoload_defined_p(), autoload_delete(), class_alloc(), fc_i(), find_class_path(), init_copy(), obj_free(), rb_autoload(), rb_const_defined_0(), rb_const_get_0(), rb_const_remove(), rb_const_set(), rb_include_class_new(), rb_local_constants(), rb_mod_const_at(), rb_mod_init_copy(), rb_singleton_class_clone_and_attach(), set_const_visibility(), and vm_get_ev_const().

#define RCLASS_EXT | ( |  | c | ) | (RCLASS(c)->ptr)

Definition at line 291 of file internal.h.

#define RCLASS_IV_INDEX_TBL | ( |  | c | ) | (RCLASS_EXT(c)->iv_index_tbl)

Definition at line 296 of file internal.h.

Referenced by class_alloc(), obj_free(), obj_memsize_of(), and rb_ivar_set().

#define RCLASS_IV_TBL | ( |  | c | ) | (RCLASS_EXT(c)->iv_tbl)

Definition at line 292 of file internal.h.

Referenced by autoload_data(), autoload_delete(), class_alloc(), classname(), cvar_lookup_at(), fc_path(), find_class_path(), init_copy(), mod_cvar_at(), obj_free(), obj_memsize_of(), rb_autoload(), rb_class_path_cached(), rb_cvar_get(), rb_cvar_set(), rb_include_class_new(), rb_ivar_count(), rb_ivar_defined(), rb_ivar_foreach(), rb_ivar_lookup(), rb_ivar_set(), rb_mod_init_copy(), rb_mod_remove_cvar(), rb_obj_remove_instance_variable(), rb_singleton_class_attached(), rb_singleton_class_clone_and_attach(), and rb_tmp_class_path().

#define RCLASS_M_TBL | ( |  | c | ) | (RCLASS_M_TBL_WRAPPER(c) ? RCLASS_M_TBL_WRAPPER(c)->tbl : 0)

Definition at line 295 of file internal.h.

Referenced by add_opt_method(), class_instance_method_list(), has_extra_methods(), include_modules_at(), lookup_method_table(), obj_memsize_of(), rb_method_entry_make(), rb_mod_init_copy(), rb_obj_singleton_methods(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), rb_vm_check_redefinition_by_prepend(), and remove_method().

#define RCLASS_M_TBL_WRAPPER | ( |  | c | ) | (RCLASS(c)->m_tbl_wrapper)

Definition at line 294 of file internal.h.

Referenced by class_alloc(), class_search_ancestor(), include_modules_at(), obj_free(), obj_memsize_of(), rb_include_class_new(), rb_mod_init_copy(), rb_prepend_module(), rb_using_refinement(), and RCLASS_M_TBL_INIT().

#define RCLASS_ORIGIN | ( |  | c | ) | (RCLASS_EXT(c)->origin)

Definition at line 297 of file internal.h.

Referenced by class_alloc(), class_instance_method_list(), include_modules_at(), rb_alias(), rb_class_inherited_p(), rb_class_search_ancestor(), rb_export_method(), rb_include_class_new(), rb_include_module(), rb_method_entry_make(), rb_mod_ancestors(), rb_mod_included_modules(), rb_obj_is_kind_of(), rb_obj_singleton_methods(), rb_prepend_module(), rb_vm_check_redefinition_by_prepend(), remove_method(), vm_call_method(), vm_search_normal_superclass(), and w_extended().

#define RCLASS_REFINED_CLASS | ( |  | c | ) | (RCLASS_EXT(c)->refined_class)

Definition at line 298 of file internal.h.

Referenced by add_activated_refinement(), class_alloc(), rb_using_refinement(), and vm_search_super_method().

#define RCLASS_SERIAL | ( |  | c | ) | (RCLASS_EXT(c)->class_serial)

Definition at line 299 of file internal.h.

Referenced by class_alloc(), rb_class_clear_method_cache(), vm_getivar(), vm_search_method(), and vm_setivar().

#define RHASH_TBL_RAW | ( |  | h | ) | rb_hash_tbl_raw(h)

Definition at line 478 of file internal.h.

Referenced by count_objects(), kwmerge_i(), rb_ary_or(), and rb_execarg_fixup().

#define SERIALT2NUM ULONG2NUM

Definition at line 261 of file internal.h.

#define SIGNED_INTEGER_MAX | ( |  | sint_type | ) |

Value:
(sint_type) \
((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) | \
((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) - 1))
CHAR_BIT
#define CHAR_BIT
Definition: ruby.h:198

Definition at line 46 of file internal.h.

#define SIGNED_INTEGER_MIN | ( |  | sint_type | ) | (-SIGNED_INTEGER_MAX(sint_type)-1)

Definition at line 50 of file internal.h.

#define SIGNED_INTEGER_TYPE_P | ( |  | int_type | ) | (0 > ((int_type)0)-1)

Definition at line 45 of file internal.h.

#define SIZED_REALLOC_N | ( |  | var,
|  |  | type,
|  |  | n,
|  |  | old_n
| ) |  | ((var)=(type*)ruby_sized_xrealloc((char*)(var), (n) * sizeof(type), (old_n) * sizeof(type)))

Definition at line 471 of file internal.h.

Referenced by ary_resize_capa(), and rb_ary_resize().

#define STATIC_ASSERT | ( |  | name,
|  |  | expr
| ) |  | typedef int static_assert_##name##_check[1 - 2*!(expr)]

Definition at line 37 of file internal.h.

#define STR_ASSOC FL_USER3

Definition at line 723 of file internal.h.

#define STR_ASSOC_P | ( |  | s | ) | FL_ALL((s), STR_NOEMBED|STR_ASSOC)

Definition at line 725 of file internal.h.

Referenced by dump_object(), rb_str_append(), rb_str_associate(), rb_str_associated(), rb_str_cat(), rb_str_freeze(), rb_str_new_frozen(), str_buf_cat(), str_new4(), and str_replace().

#define STR_EMBED_P | ( |  | str | ) | (!FL_TEST((str), STR_NOEMBED))

Definition at line 728 of file internal.h.

Referenced by dump_object(), rb_str_associate(), rb_str_capacity(), rb_str_free(), rb_str_modify_expand(), rb_str_new_frozen(), rb_str_resize(), str_buf_cat(), str_discard(), str_independent(), and tr_trans().

#define STR_NOCAPA (STR_NOEMBED|ELTS_SHARED|STR_ASSOC)

Definition at line 726 of file internal.h.

Referenced by rb_str_shared_replace().

#define STR_NOCAPA_P | ( |  | s | ) | (FL_TEST((s),STR_NOEMBED) && FL_ANY((s),ELTS_SHARED|STR_ASSOC))

Definition at line 727 of file internal.h.

Referenced by dump_object(), rb_str_capacity(), and rb_str_shared_replace().

#define STR_NOEMBED FL_USER1

Definition at line 721 of file internal.h.

Referenced by rb_str_buf_new(), rb_str_drop_bytes(), rb_str_memsize(), and str_replace_shared_without_enc().

#define STR_SHARED FL_USER2 /* = ELTS_SHARED */

Definition at line 722 of file internal.h.

#define STR_SHARED_P | ( |  | s | ) | FL_ALL((s), STR_NOEMBED|ELTS_SHARED)

Definition at line 724 of file internal.h.

Referenced by dump_object(), fstr_update_callback(), rb_str_associate(), rb_str_associated(), rb_str_drop_bytes(), rb_str_free(), rb_str_new_frozen(), rb_str_set_len(), str_discard(), str_independent(), str_new4(), and str_replace().

#define swap16 | ( |  | x | ) | ((uint16_t)((((x)&0xFF)<<8) | (((x)>>8)&0xFF)))

Definition at line 79 of file internal.h.

Referenced by bary_pack(), and bary_unpack_internal().

#define swap32 | ( |  | x | ) |

Value:
((uint32_t)((((x)&0xFF)<<24) \
|(((x)>>24)&0xFF) \
|(((x)&0x0000FF00)<<8) \
|(((x)&0x00FF0000)>>8) ))
uint32_t
unsigned int uint32_t
Definition: sha2.h:101

Definition at line 89 of file internal.h.

Referenced by bary_pack(), bary_unpack_internal(), and define_swapx().

#define TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1))

Definition at line 60 of file internal.h.

#define UNSIGNED_INTEGER_MAX | ( |  | uint_type | ) | (~(uint_type)0)

Definition at line 51 of file internal.h.

#define VALGRIND_MAKE_MEM_DEFINED | ( |  | p,
|  |  | n
| ) |  | 0

Definition at line 31 of file internal.h.

#define VALGRIND_MAKE_MEM_UNDEFINED | ( |  | p,
|  |  | n
| ) |  | 0

Definition at line 32 of file internal.h.

## Typedef Documentation

typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE)

Definition at line 780 of file internal.h.

typedef unsigned long rb_serial_t

Definition at line 260 of file internal.h.

typedef struct rb_subclass_entry rb_subclass_entry_t

Definition at line 246 of file internal.h.

## Function Documentation

void Init_BareVM | ( | void |  | ) |

Definition at line 2792 of file vm.c.

References rb_vm_struct::defined_module_hash, EXIT_FAILURE, Init_native_thread(), MEMZERO, rb_vm_struct::objspace, rb_hash_new(), rb_objspace_alloc(), rb_thread_set_current_raw, ruby_mimmalloc(), ruby_thread_init_stack(), th_init(), rb_thread_struct::vm, and vm_init2().

Referenced by ruby_setup().

void Init_eval_method | ( | void |  | ) |

Definition at line 1708 of file vm_method.c.

References idRespond_to, idRespond_to_missing, NOEX_PRIVATE, NOEX_PUBLIC, obj_respond_to(), obj_respond_to_missing(), rb_cModule, rb_define_method(), rb_define_private_method(), rb_eException, rb_mKernel, rb_mod_alias_method(), rb_mod_method_defined(), rb_mod_modfunc(), rb_mod_private(), rb_mod_private_method(), rb_mod_private_method_defined(), rb_mod_protected(), rb_mod_protected_method_defined(), rb_mod_public(), rb_mod_public_method(), rb_mod_public_method_defined(), rb_mod_remove_method(), rb_mod_undef_method(), rb_singleton_class(), rb_vm_top_self(), REPLICATE_METHOD, top_private(), and top_public().

Referenced by Init_eval().

void Init_ext | ( | void |  | ) |

Definition at line 2 of file dmyext.c.

Referenced by init_libraries_internal(), and process_options().

void Init_File | ( | void |  | ) |

Definition at line 5614 of file file.c.

References define_filetest_function(), INT2FIX, LOCK_EX, LOCK_NB, LOCK_SH, LOCK_UN, O_BINARY, O_NONBLOCK, PATH_SEP, Qnil, rb_cIO, rb_cObject, rb_define_alloc_func(), rb_define_class(), rb_define_class_under(), rb_define_const(), rb_define_global_function(), rb_define_method(), rb_define_module(), rb_define_module_under(), rb_define_singleton_method(), rb_f_test(), rb_file_atime(), rb_file_blockdev_p(), rb_file_chardev_p(), rb_file_chmod(), rb_file_chown(), rb_file_ctime(), rb_file_directory_p(), rb_file_executable_p(), rb_file_executable_real_p(), rb_file_exist_p(), rb_file_exists_p(), rb_file_file_p(), rb_file_flock(), rb_file_grpowned_p(), rb_file_identical_p(), rb_file_lstat(), rb_file_mtime(), rb_file_owned_p(), rb_file_path(), rb_file_pipe_p(), rb_file_readable_p(), rb_file_readable_real_p(), rb_file_s_absolute_path(), rb_file_s_atime(), rb_file_s_basename(), rb_file_s_chmod(), rb_file_s_chown(), rb_file_s_ctime(), rb_file_s_dirname(), rb_file_s_expand_path(), rb_file_s_extname(), rb_file_s_ftype(), rb_file_s_join(), rb_file_s_lchmod, rb_file_s_lchown, rb_file_s_link, rb_file_s_lstat(), rb_file_s_mtime(), rb_file_s_path(), rb_file_s_readlink, rb_file_s_realdirpath(), rb_file_s_realpath(), rb_file_s_rename(), rb_file_s_size(), rb_file_s_split(), rb_file_s_stat(), rb_file_s_symlink, rb_file_s_truncate, rb_file_s_umask(), rb_file_s_unlink(), rb_file_s_utime(), rb_file_sgid_p(), rb_file_size(), rb_file_size_p(), rb_file_socket_p(), rb_file_sticky_p(), rb_file_suid_p(), rb_file_symlink_p(), rb_file_truncate, rb_file_world_readable_p(), rb_file_world_writable_p(), rb_file_writable_p(), rb_file_writable_real_p(), rb_file_zero_p(), rb_include_module(), rb_io_stat(), rb_mComparable, rb_obj_freeze(), rb_stat_atime(), rb_stat_b(), rb_stat_blksize(), rb_stat_blocks(), rb_stat_c(), rb_stat_cmp(), rb_stat_ctime(), rb_stat_d(), rb_stat_dev(), rb_stat_dev_major(), rb_stat_dev_minor(), rb_stat_f(), rb_stat_ftype(), rb_stat_gid(), rb_stat_grpowned(), rb_stat_init(), rb_stat_init_copy(), rb_stat_ino(), rb_stat_inspect(), rb_stat_l(), rb_stat_mode(), rb_stat_mtime(), rb_stat_nlink(), rb_stat_owned(), rb_stat_p(), rb_stat_r(), rb_stat_R(), rb_stat_rdev(), rb_stat_rdev_major(), rb_stat_rdev_minor(), rb_stat_S(), rb_stat_s(), rb_stat_s_alloc(), rb_stat_sgid(), rb_stat_size(), rb_stat_sticky(), rb_stat_suid(), rb_stat_uid(), rb_stat_w(), rb_stat_W(), rb_stat_wr(), rb_stat_ww(), rb_stat_x(), rb_stat_X(), rb_stat_z(), rb_str_new2, and rb_usascii_str_new2.

Referenced by Init_IO().

void Init_heap | ( | void |  | ) |

Definition at line 1661 of file gc.c.

References finalizer_table, free(), GET_THREAD(), getrusage_time(), heap_add_pages(), heap_eden, ruby_gc_params_t::heap_init_slots, HEAP_OBJ_LIMIT, init_mark_stack(), rb_objspace::invoke_time, malloc, rb_objspace::mark_stack, rb_objspace::oldmalloc_increase_limit, ruby_gc_params_t::oldmalloc_limit_min, rb_objspace::profile, rb_objspace, rb_sigaltstack_size(), rb_objspace::rgengc, and st_init_numtable().

Referenced by ruby_setup().

void Init_native_thread | ( | void |  | ) |

Referenced by Init_BareVM().

void Init_newline | ( | void |  | ) |

Definition at line 183 of file newline.c.

References rb_cr_newline, rb_crlf_newline, rb_register_transcoder(), and rb_universal_newline.

Referenced by Init_transcode().

void Init_prelude | ( | void |  | ) |

Referenced by ruby_init_prelude().

void Init_vm_backtrace | ( | void |  | ) |

Definition at line 991 of file vm_backtrace.c.

References backtrace_alloc(), backtrace_dump_data(), backtrace_load_data(), CLASS_OF, location_absolute_path_m(), location_base_label_m(), location_inspect_m(), location_label_m(), location_lineno_m(), location_path_m(), location_to_str_m(), rb_cArray, rb_cBacktrace, rb_cBacktraceLocation, rb_cObject, rb_cThread, rb_define_alloc_func(), rb_define_class_under(), rb_define_global_function(), rb_define_method(), rb_f_caller(), rb_f_caller_locations(), rb_marshal_define_compat(), rb_undef_alloc_func(), and rb_undef_method().

Referenced by Init_VM().

void Init_vm_eval | ( | void |  | ) |

Definition at line 1967 of file vm_eval.c.

References rb_add_method(), rb_cBasicObject, rb_cModule, rb_define_global_function(), rb_define_method(), rb_define_private_method(), rb_f_block_given_p(), rb_f_catch(), rb_f_eval(), rb_f_local_variables(), rb_f_loop(), rb_f_public_send(), rb_f_send(), rb_f_throw(), rb_intern, rb_method_missing(), rb_mKernel, rb_mod_module_eval(), rb_mod_module_exec(), rb_obj_instance_eval(), rb_obj_instance_exec(), and VM_METHOD_TYPE_OPTIMIZED.

Referenced by Init_eval().

static int nlz_int | ( | unsigned int | x | ) |
| inline static

Definition at line 116 of file internal.h.

References CHAR_BIT.

Referenced by nlz().

static int nlz_long | ( | unsigned long | x | ) |
| inline static

Definition at line 146 of file internal.h.

References CHAR_BIT.

NORETURN | ( | PRINTF_ARGS(void rb_compile_bug(const char *, int, const char *,...), 3, 4) |  | ) |

NORETURN | ( | void | rb_async_bug_errnoconst char *, int | ) |

NORETURN | ( | void | rb_load_failVALUE, const char * | ) |

PRINTF_ARGS | ( | void | ruby_debug_printfconst char *,...,
|  | 1 | ,
|  | 2 |
| ) |  |

void rb_ary_delete_same | ( | VALUE | ,
|  | VALUE |
| ) |  |

Definition at line 2928 of file array.c.

References ary_resize_smaller(), RARRAY_AREF, RARRAY_LEN, and rb_ary_store().

VALUE rb_ary_last | ( | int | ,
|  | VALUE * | ,
|  | VALUE |
| ) |  |

Definition at line 1329 of file array.c.

References ary_take_first_or_last(), ARY_TAKE_LAST, Qnil, RARRAY_AREF, and RARRAY_LEN.

Referenced by Init_Array(), and range_last().

void rb_ary_set_len | ( | VALUE | ,
|  | long |
| ) |  |

Definition at line 1592 of file array.c.

References ARY_CAPA, ARY_SET_LEN, ARY_SHARED_P, rb_ary_modify_check(), rb_bug(), rb_eRuntimeError, and rb_raise().

Referenced by method_missing(), rb_hash_keys(), rb_hash_values(), and rb_struct_s_def().

int rb_backtrace_p | ( | VALUE | obj | ) |

Definition at line 417 of file vm_backtrace.c.

References rb_typeddata_is_kind_of().

Referenced by exc_backtrace(), rb_check_backtrace(), and set_backtrace().

void rb_backtrace_print_as_bugreport | ( | void |  | ) |

Definition at line 766 of file vm_backtrace.c.

References backtrace_each(), oldbt_arg::data, oldbt_arg::func, GET_THREAD(), oldbt_bugreport(), oldbt_init(), oldbt_iter_cfunc(), and oldbt_iter_iseq().

Referenced by rb_vm_bugreport().

void rb_backtrace_print_to | ( | VALUE | output | ) |

Definition at line 803 of file vm_backtrace.c.

References backtrace_each(), oldbt_arg::data, oldbt_arg::func, GET_THREAD(), oldbt_init(), oldbt_iter_cfunc(), oldbt_iter_iseq(), and oldbt_print_to().

Referenced by load_lock().

VALUE rb_backtrace_to_location_ary | ( | VALUE | obj | ) |

Definition at line 637 of file vm_backtrace.c.

References backtrace_to_location_ary(), GetCoreDataFromValue, and rb_backtrace_struct::locary.

Referenced by exc_backtrace_locations().

VALUE rb_backtrace_to_str_ary | ( | VALUE | obj | ) |

Definition at line 590 of file vm_backtrace.c.

References rb_backtrace_struct::backtrace_size, backtrace_to_str_ary(), bt_iter_arg::bt, GetCoreDataFromValue, and rb_backtrace_struct::strary.

Referenced by backtrace_dump_data(), exc_backtrace(), and set_backtrace().

VALUE rb_big2str_generic | ( | VALUE | x,
|  | int | base
| ) |  |

Definition at line 4892 of file bignum.c.

References big2str_generic().

VALUE rb_big2str_poweroftwo | ( | VALUE | x,
|  | int | base
| ) |  |

Definition at line 4809 of file bignum.c.

References big2str_base_poweroftwo().

VALUE rb_big_divrem_normal | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 2698 of file bignum.c.

References bary_divmod_normal(), BARY_TRUNC, BDIGIT, BDIGITS, BIGDIVREM_EXTRA_WORDS, bignew, bigtrunc(), LONG2FIX, rb_assoc_new(), RB_GC_GUARD, rb_num_zerodiv(), RBIGNUM_LEN, RBIGNUM_SIGN, and big_div_struct::yn.

VALUE rb_big_fdiv | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 6321 of file bignum.c.

References big2dbl(), big_fdiv_float(), big_fdiv_int(), DBL2NUM, FIX2LONG, FIXNUM_P, isinf(), isnan, rb_big2dbl(), RB_BIGNUM_TYPE_P, RB_FLOAT_TYPE_P, rb_int2big(), rb_intern, rb_num_coerce_bin(), and RFLOAT_VALUE.

Referenced by fix_fdiv(), and Init_Bignum().

VALUE rb_big_mul_balance | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 1668 of file bignum.c.

References bary_mul_balance_with_mulfunc(), BDIGITS, bignew, NULL, RB_GC_GUARD, RBIGNUM_LEN, and RBIGNUM_SIGN.

VALUE rb_big_mul_karatsuba | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 1849 of file bignum.c.

References bary_mul_karatsuba(), BDIGITS, bignew, KARATSUBA_BALANCED, NULL, rb_eArgError, RB_GC_GUARD, rb_raise(), RBIGNUM_LEN, and RBIGNUM_SIGN.

VALUE rb_big_mul_normal | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 1540 of file bignum.c.

References bary_mul_normal(), BDIGITS, bignew, RB_GC_GUARD, RBIGNUM_LEN, and RBIGNUM_SIGN.

VALUE rb_big_mul_toom3 | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 2246 of file bignum.c.

References bary_mul_toom3(), BDIGITS, bignew, NULL, rb_eArgError, RB_GC_GUARD, rb_raise(), RBIGNUM_LEN, RBIGNUM_SIGN, and TOOM3_BALANCED.

VALUE rb_big_sq_fast | ( | VALUE | x | ) |

Definition at line 1609 of file bignum.c.

References bary_sq_fast(), BDIGITS, bignew, RB_GC_GUARD, and RBIGNUM_LEN.

VALUE rb_big_uminus | ( | VALUE | x | ) |

Definition at line 5578 of file bignum.c.

References bignorm(), rb_big_clone(), RBIGNUM_SET_SIGN, and RBIGNUM_SIGN.

Referenced by Init_Bignum(), and rand_int().

int rb_block_arity | ( | void |  | ) |

Definition at line 860 of file proc.c.

References rb_thread_struct::cfp, GET_THREAD(), GetProcPtr, rb_proc_t::is_lambda, max(), rb_block_struct::proc, rb_block_min_max_arity(), rb_eArgError, rb_raise(), rb_vm_control_frame_block_ptr(), and UNLIMITED_ARGUMENTS.

Referenced by env_each_pair(), rb_ary_zip(), rb_hash_each_pair(), and rb_struct_each_pair().

int rb_bug_reporter_add | ( | void(*)(FILE *, void *) | func,
|  | void * | data
| ) |  |

Definition at line 282 of file error.c.

References bug_reporters_size, bug_reporters::data, func, bug_reporters::func, and MAX_BUG_REPORTERS.

const char* rb_builtin_class_name | ( | VALUE | x | ) |

Definition at line 451 of file error.c.

References FIXNUM_P, NIL_P, rb_obj_classname(), RB_TYPE_P, SYMBOL_P, T_FALSE, and T_TRUE.

Referenced by enum_to_h_i(), rb_ary_to_h(), and rb_hash_s_create().

const char* rb_builtin_type_name | ( | int | t | ) |

Definition at line 440 of file error.c.

References name, and numberof.

Referenced by rb_check_type(), and w_object().

void rb_call_end_proc | ( | VALUE | data | ) |

Definition at line 11 of file eval_jump.c.

References rb_ary_new(), and rb_proc_call().

Referenced by m_core_set_postexe(), and rb_f_at_exit().

void rb_call_inits | ( | void |  | ) |

Definition at line 18 of file inits.c.

References CALL, signal(), sym, and version().

Referenced by ruby_setup().

VALUE rb_catch_protect | ( | VALUE | t,
|  | rb_block_call_func * | func,
|  | VALUE | data,
|  | int * | stateptr
| ) |  |

Definition at line 1835 of file vm_eval.c.

References rb_thread_struct::cfp, rb_thread_struct::errinfo, GET_THREAD(), Qnil, rb_vm_rewind_cfp(), rb_vm_tag::retval, RNODE, rb_vm_tag::tag, rb_thread_struct::tag, TAG_THROW, TH_EXEC_TAG, TH_POP_TAG, TH_PUSH_TAG, and val.

Referenced by exec_recursive(), and rb_catch_obj().

VALUE rb_check_backtrace | ( | VALUE |  | ) |

Definition at line 769 of file error.c.

References err, NIL_P, RARRAY_AREF, RARRAY_LEN, rb_ary_new3, rb_backtrace_p(), rb_raise(), RB_TYPE_P, T_ARRAY, and T_STRING.

Referenced by exc_set_backtrace(), and get_backtrace().

VALUE rb_check_block_call | ( | VALUE | ,
|  | ID | ,
|  | int | ,
|  | const VALUE * | ,
|  | rb_block_call_func_t | ,
|  | VALUE |
| ) |  |

Referenced by take_items().

VALUE rb_check_funcall_with_hook | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | rb_check_funcall_hook * | hook,
|  | VALUE | arg
| ) |  |

Definition at line 428 of file vm_eval.c.

References argc, argv, check_funcall_callable(), check_funcall_missing(), check_funcall_respond_to(), CLASS_OF, FALSE, GET_THREAD(), NOEX_OK, Qundef, rb_search_method_entry(), rescue_funcall_args::recv, stack_check(), TRUE, and vm_call0().

VALUE rb_class_search_ancestor | ( | VALUE | klass,
|  | VALUE | super
| ) |  |

Definition at line 672 of file object.c.

References class_or_module_required(), class_search_ancestor(), and RCLASS_ORIGIN.

Referenced by umethod_bind().

void rb_clear_trace_func | ( | void |  | ) |

Definition at line 225 of file vm_trace.c.

References clear_trace_func_i(), GET_VM, rb_remove_event_hook(), st_data_t, and st_foreach().

Referenced by ruby_finalize_0(), and ruby_options().

VALUE rb_current_realfilepath | ( | void |  | ) |

Definition at line 1957 of file vm_eval.c.

References rb_iseq_location_struct::absolute_path, rb_thread_struct::cfp, GET_THREAD(), rb_control_frame_struct::iseq, rb_iseq_struct::location, Qnil, RUBY_VM_PREVIOUS_CONTROL_FRAME, and vm_get_ruby_level_caller_cfp().

Referenced by eval_string_with_cref(), f_current_dirname(), and rb_f_require_relative().

VALUE rb_default_home_dir | ( | VALUE | result | ) |

Definition at line 3018 of file file.c.

References copy_home_path(), getenv, rb_eArgError, and rb_raise().

Referenced by dir_s_home(), and rb_file_expand_path_internal().

int rb_dvar_defined | ( | ID |  | ) |

Definition at line 5959 of file compile.c.

References rb_thread_struct::base_block, GET_THREAD(), rb_block_struct::iseq, rb_iseq_struct::local_table, rb_iseq_struct::local_table_size, rb_iseq_struct::parent_iseq, and rb_iseq_struct::type.

Referenced by dvar_defined_gen().

VALUE rb_equal_opt | ( | VALUE | obj1,
|  | VALUE | obj2
| ) |  |

Definition at line 901 of file vm_insnhelper.c.

References rb_call_info_struct::defined_class, idEq, rb_call_info_struct::klass, rb_call_info_struct::me, rb_call_info_struct::method_state, rb_call_info_struct::mid, NULL, and opt_eq_func().

Referenced by rb_ary_index(), and rb_ary_rindex().

int rb_exec_async_signal_safe | ( | const struct rb_execarg * | e,
|  | char * | errmsg,
|  | size_t | errmsg_buflen
| ) |  |

Definition at line 3104 of file process.c.

References after_exec_async_signal_safe(), before_exec_async_signal_safe(), rb_execarg::cmd, rb_execarg::envp_str, rb_execarg::invoke, NIL_P, NULL, preserving_errno, proc_exec_cmd(), proc_exec_sh(), rb_execarg_run_options(), RSTRING_PTR, rb_execarg::sh, and rb_execarg::use_shell.

Referenced by chfunc(), rb_exec_without_timer_thread(), and rb_f_exec().

int rb_execarg_addopt | ( | VALUE | execarg_obj,
|  | VALUE | key,
|  | VALUE | val
| ) |  |

Definition at line 1670 of file process.c.

References rb_execarg::chdir_dir, rb_execarg::chdir_given, check_exec_redirect(), check_gid_switch(), check_uid_switch(), rb_execarg::close_others_do, rb_execarg::close_others_given, EXPORT_DUP, FilePathValue, rb_execarg::gid, rb_execarg::gid_given, hide_obj(), id, INT2FIX, INT2NUM, mode_t, rb_execarg::new_pgroup_flag, rb_execarg::new_pgroup_given, NIL_P, NUM2MODET, NUM2PIDT, OBJ2GID, OBJ2UID, rb_execarg::pgroup_given, rb_execarg::pgroup_pgid, Qfalse, Qtrue, RARRAY_LEN, rb_ary_entry(), rb_ary_new(), rb_ary_new3, rb_ary_push(), rb_check_array_type(), rb_eArgError, rb_eNotImpError, rb_execarg_get(), RB_GC_GUARD, rb_id2name(), rb_intern, rb_raise(), rb_secure(), rb_to_int(), rb_execarg::rlimit_limits, RTEST, ST_CONTINUE, ST_STOP, SYM2ID, T_ARRAY, T_FILE, T_FIXNUM, T_SYMBOL, TYPE, rb_execarg::uid, rb_execarg::uid_given, rb_execarg::umask_given, rb_execarg::umask_mask, rb_execarg::unsetenv_others_do, and rb_execarg::unsetenv_others_given.

Referenced by check_exec_options_i(), check_exec_options_i_extract(), pipe_open(), and rb_exec_arg_addopt().

VALUE rb_execarg_extract_options | ( | VALUE | execarg_obj,
|  | VALUE | opthash
| ) |  |

Definition at line 1959 of file process.c.

References check_exec_options_i_extract(), Qnil, rb_hash_tbl_raw(), RHASH_EMPTY_P, st_data_t, and st_foreach().

Referenced by rb_io_s_popen().

void rb_execarg_fixup | ( | VALUE | execarg_obj | ) |

Definition at line 2325 of file process.c.

References check_exec_fds(), rb_execarg::dup2_tmpbuf, rb_execarg::env_modification, rb_execarg::envp_buf, rb_execarg::envp_str, envtbl, rb_execarg::fd_dup2, fill_envp_buf_i(), hide_obj(), key, NIL_P, NULL, Qfalse, Qundef, RARRAY_AREF, RARRAY_LEN, rb_cObject, rb_const_get(), rb_convert_type(), rb_execarg_get(), RB_GC_GUARD, rb_hash_new(), rb_intern, RB_OBJ_WRITTEN, rb_str_buf_cat(), rb_str_buf_new(), rb_str_new(), rb_str_set_len(), rb_execarg::redirect_fds, RHASH_SIZE, RHASH_TBL_RAW, RSTRING_LEN, RSTRING_PTR, run_exec_dup2_tmpbuf_size(), st_data_t, st_delete(), st_foreach(), st_insert(), strlen(), T_HASH, tmpbuf, rb_execarg::unsetenv_others_do, rb_execarg::unsetenv_others_given, and val.

Referenced by establishShell(), pipe_open(), rb_exec_arg_fixup(), rb_f_exec(), rb_f_spawn(), and rb_spawn_internal().

struct rb_execarg* rb_execarg_get | ( | VALUE | execarg_obj | ) |

Definition at line 2272 of file process.c.

References exec_arg_data_type, and TypedData_Get_Struct.

Referenced by establishShell(), pipe_open(), rb_exec(), rb_exec_err(), rb_exec_fillarg(), rb_execarg_addopt(), rb_execarg_fixup(), rb_execarg_init(), rb_execarg_setenv(), rb_f_exec(), rb_f_spawn(), rb_run_exec_options(), rb_run_exec_options_err(), and rb_spawn_internal().

VALUE rb_execarg_init | ( | int | argc,
|  | VALUE * | argv,
|  | int | accept_shell,
|  | VALUE | execarg_obj
| ) |  |

Definition at line 2280 of file process.c.

References rb_execarg::cmd, env, rb_execarg::invoke, Qnil, rb_exec_fillarg(), rb_exec_getargs(), rb_execarg_get(), RB_GC_GUARD, rb_execarg::sh, and rb_execarg::use_shell.

Referenced by rb_exec_arg_init(), and rb_execarg_new().

VALUE rb_execarg_new | ( | int | argc,
|  | VALUE * | argv,
|  | int | accept_shell
| ) |  |

Definition at line 2261 of file process.c.

References exec_arg_data_type, hide_obj(), rb_cData, rb_execarg_init(), and TypedData_Make_Struct.

Referenced by establishShell(), pipe_open_s(), rb_f_exec(), rb_f_spawn(), rb_io_s_popen(), and rb_spawn_internal().

int rb_execarg_run_options | ( | const struct rb_execarg * | e,
|  | struct rb_execarg * | s,
|  | char * | errmsg,
|  | size_t | errmsg_buflen
| ) |  |

Definition at line 2957 of file process.c.

References rb_execarg::chdir_dir, rb_execarg::chdir_given, rb_execarg::close_others_do, rb_execarg::close_others_given, rb_execarg::close_others_maxhint, rb_execarg::dup2_tmpbuf, rb_execarg::env_modification, ERRMSG, rb_execarg::fd_close, rb_execarg::fd_dup2, rb_execarg::fd_dup2_child, rb_execarg::fd_open, rb_execarg::gid, rb_execarg::gid_given, hide_obj(), key, MEMZERO, mode_t, my_getcwd, NIL_P, rb_execarg::pgroup_given, Qfalse, Qnil, RARRAY_AREF, RARRAY_LEN, rb_close_before_exec(), rb_env_clear(), rb_str_new(), rb_str_new2, rb_str_set_len(), rb_warn(), rb_execarg::redirect_fds, rb_execarg::rlimit_limits, RSTRING_PTR, ruby_setenv(), run_exec_close(), run_exec_dup2(), run_exec_dup2_child(), run_exec_dup2_tmpbuf_size(), run_exec_open(), save_env(), setgid(), setuid(), StringValueCStr, tmpbuf, rb_execarg::uid, rb_execarg::uid_given, umask(), rb_execarg::umask_given, rb_execarg::umask_mask, rb_execarg::unsetenv_others_do, rb_execarg::unsetenv_others_given, val, and xfree().

Referenced by pipe_open(), rb_exec_async_signal_safe(), rb_run_exec_options(), rb_run_exec_options_err(), and rb_spawn_process().

void rb_execarg_setenv | ( | VALUE | execarg_obj,
|  | VALUE | env
| ) |  |

Definition at line 2299 of file process.c.

References env, rb_execarg::env_modification, NIL_P, Qfalse, rb_check_exec_env(), and rb_execarg_get().

Referenced by rb_io_s_popen().

void rb_fiber_reset_root_local_storage | ( | VALUE |  | ) |

Definition at line 1502 of file cont.c.

References rb_fiber_struct::cont, rb_thread_struct::fiber, GetFiberPtr, GetThreadPtr, rb_thread_struct::local_storage, rb_thread_struct::root_fiber, and rb_context_struct::saved_thread.

Referenced by ruby_vm_destruct().

void rb_file_const | ( | const char * | ,
|  | VALUE |
| ) |  |

Definition at line 5275 of file file.c.

References rb_define_const().

Referenced by Init_Dir().

VALUE rb_file_expand_path_fast | ( | VALUE | ,
|  | VALUE |
| ) |  |

Definition at line 3428 of file file.c.

References expand_path, and EXPAND_PATH_BUFFER.

Referenced by rb_construct_expanded_load_path(), and rb_feature_provided().

VALUE rb_file_expand_path_internal | ( | VALUE | ,
|  | VALUE | ,
|  | int | ,
|  | int | ,
|  | VALUE |
| ) |  |

Definition at line 3054 of file file.c.

References ALLOCA_N, ALLOCV_END, ALLOCV_N, append_fspath(), buf, BUFCHECK, BUFINIT, chompdirsep(), code_page(), convert_mb_to_wchar(), ENC_CODERANGE_7BIT, ENC_CODERANGE_CLEAR, fix_string_encoding, get_user_from_path(), home_dir(), Inc, INVALID_CODE_PAGE, IS_DIR_SEPARATOR_P, IS_DIR_UNC_P, isdirsep, istrailinggarbage, lstat, MAXPATHLEN, my_getcwd, nextdirsep, NIL_P, NULL, OBJ_TAINT, OBJ_TAINTED, PATH_BUFFER_SIZE, PRIsVALUE, Qnil, rb_default_home_dir(), rb_eArgError, rb_enc_associate(), rb_enc_check(), rb_enc_copy(), rb_enc_from_encoding(), rb_enc_get(), rb_enc_raise(), rb_enc_str_asciionly_p(), rb_enc_str_coderange(), rb_file_expand_path_internal(), rb_filesystem_encoding(), rb_home_dir_of(), rb_is_absolute_path(), rb_raise(), rb_str_buf_cat(), rb_str_encode(), rb_str_encode_ospath(), rb_str_modify(), rb_str_resize(), rb_str_set_len(), rb_utf8_encoding(), remove_invalid_alternative_data(), replace_to_long_name(), replace_wchar(), result, RSTRING_LEN, RSTRING_PTR, S_ISLNK, size, skipprefix, skiproot(), stat, STRCASECMP, StringValuePtr, strlcat(), strlen(), strncasecmp, strrdirsep, system_code_page(), TOLOWER, xfree(), and xmalloc.

Referenced by file_expand_path_1(), rb_file_expand_path_internal(), rb_find_file_ext_safe(), and rb_find_file_safe().

int rb_file_load_ok | ( | const char * |  | ) |

Definition at line 5391 of file file.c.

References PepperInstance::as_int, PepperInstance::async_call_args, PepperInstance::async_call_result, PepperInstance::cond, convert_mb_to_wchar(), core_interface, fstat, GET_PEPPER_INSTANCE, PepperInstance::instance, INVALID_FILE_ATTRIBUTES, load_ok_internal(), PepperInstance::mutex, NULL, pruby_file_fetch_check_response(), rb_cloexec_open(), rb_update_max_fd(), S_ISREG, stat, and xfree().

Referenced by rb_f_load(), rb_find_file_ext_safe(), and rb_find_file_safe().

static VALUE rb_float_new_inline | ( | double | d | ) |
| inline static

Definition at line 565 of file internal.h.

References rb_float_new_in_heap().

Referenced by rb_float_new().

static double rb_float_value_inline | ( | VALUE | v | ) |
| inline static

Definition at line 539 of file internal.h.

References FLONUM_P.

Referenced by rb_float_value().

rb_pid_t rb_fork_async_signal_safe | ( | int * | status,
|  | int(*)(void *, char *, size_t) | chfunc,
|  | void * | charg,
|  | VALUE | fds,
|  | char * | errmsg,
|  | size_t | errmsg_buflen
| ) |  |

Referenced by establishShell(), pipe_open(), and rb_spawn_process().

rb_pid_t rb_fork_ruby | ( | int * | status | ) |

Referenced by pipe_open().

VALUE rb_fstring | ( | VALUE |  | ) |

Definition at line 201 of file string.c.

References Check_Type, FL_TEST, fstr_update_callback(), Qnil, RSTRING_FSTR, st_data_t, st_init_table(), st_update(), and T_STRING.

Referenced by case_when_optimizable_literal(), compile_dstr_fragments(), eval_string_with_cref(), iseq_compile_each(), prepare_iseq_build(), rb_id2str(), rb_insns_name_array(), rb_reg_initialize(), register_symid_str(), when_vals(), and yyparse().

void rb_gc_mark_encodings | ( | void |  | ) |

Definition at line 236 of file encoding.c.

Referenced by gc_mark_roots().

void rb_gc_mark_global_tbl | ( | void |  | ) |

Definition at line 562 of file variable.c.

References mark_global_entry(), and st_foreach_safe().

Referenced by gc_mark_roots().

void rb_gc_mark_parser | ( | void |  | ) |

Definition at line 16607 of file ripper.c.

Referenced by gc_mark_roots().

void rb_gc_mark_symbols | ( | int | full_mark | ) |

Definition at line 16779 of file ripper.c.

References global_symbols, symbols::id_str, symbols::minor_marked, numberof, symbols::op_sym, rb_gc_mark_locations, and rb_mark_tbl().

Referenced by gc_mark_roots().

void rb_gc_resurrect | ( | VALUE | ptr | ) |

Definition at line 3612 of file gc.c.

References gc_mark_ptr(), gc_marked(), heap_eden, is_lazy_sweeping, is_swept_object(), and rb_objspace.

Referenced by fstr_update_callback().

void rb_gc_writebarrier_remember_promoted | ( | VALUE | obj | ) |

Definition at line 4782 of file gc.c.

References rb_objspace, and rgengc_remember().

Referenced by ary_memcpy(), rb_ary_modify(), rb_hash_keys(), and rb_hash_values().

VALUE rb_gcd_normal | ( | VALUE | self,
|  | VALUE | other
| ) |  |

Definition at line 356 of file rational.c.

References f_gcd_normal().

VALUE rb_get_backtrace | ( | VALUE | info | ) |

Definition at line 55 of file eval_error.c.

References get_backtrace().

Referenced by eval_string_with_cref().

VALUE rb_get_coverages | ( | void |  | ) |

Definition at line 5287 of file thread.c.

Referenced by coverage(), prepare_iseq_build(), rb_coverage_result(), and rb_coverage_start().

VALUE rb_get_expanded_load_path | ( | void |  | ) |

Definition at line 109 of file load.c.

References EXPAND_ALL, EXPAND_HOME, EXPAND_NON_CACHE, EXPAND_RELATIVE, rb_vm_struct::expanded_load_path, GET_VM, rb_vm_struct::load_path, rb_vm_struct::load_path_check_cache, load_path_getcwd(), rb_vm_struct::load_path_snapshot, Qtrue, rb_ary_shared_with_p(), rb_construct_expanded_load_path(), and rb_str_equal().

Referenced by rb_feature_p(), rb_find_file_ext_safe(), and rb_find_file_safe().

VALUE rb_get_load_path | ( | void |  | ) |

Definition at line 32 of file load.c.

References GET_VM.

int rb_get_next_signal | ( | void |  | ) |

Definition at line 685 of file signal.c.

References ATOMIC_DEC, RUBY_NSIG, and signal_buff.

Referenced by rb_threadptr_execute_interrupts().

VALUE rb_get_path_check_convert | ( | VALUE | ,
|  | VALUE | ,
|  | int |
| ) |  |

Definition at line 198 of file file.c.

References check_path_encoding(), file_path_convert(), insecure_obj_p, rb_insecure_operation(), rb_str_new4, and StringValueCStr.

Referenced by rb_construct_expanded_load_path(), and rb_get_path_check().

VALUE rb_get_path_check_to_string | ( | VALUE | ,
|  | int |
| ) |  |

Definition at line 176 of file file.c.

References CONST_ID, insecure_obj_p, Qundef, rb_check_funcall(), rb_insecure_operation(), RB_TYPE_P, StringValue, and T_STRING.

Referenced by rb_construct_expanded_load_path(), and rb_get_path_check().

VALUE rb_hash_keys | ( | VALUE | hash | ) |

Definition at line 1783 of file hash.c.

References keys_i(), OBJ_PROMOTED, Qundef, RARRAY_PTR_USE, rb_ary_new_capa(), rb_ary_set_len(), rb_gc_writebarrier_remember_promoted(), rb_hash_foreach(), RHASH, RHASH_SIZE, size, ST_DATA_COMPATIBLE_P, and st_keys_check().

Referenced by Init_Hash().

st_index_t rb_hash_proc | ( | st_index_t | hash,
|  | VALUE | proc
| ) |  |

Definition at line 974 of file proc.c.

References rb_proc_t::block, rb_proc_t::envval, rb_block_struct::ep, GetProcPtr, rb_block_struct::iseq, and rb_hash_uint().

Referenced by proc_hash(), and rb_hash_method_definition().

struct st_table* rb_hash_tbl_raw | ( | VALUE | hash | ) |

Definition at line 351 of file hash.c.

References hash_tbl().

Referenced by clear_coverage(), ident_hash_new(), iseq_compile_each(), rb_ary_and(), rb_ary_diff(), rb_ary_uniq_bang(), rb_check_exec_env(), rb_check_exec_options(), rb_execarg_extract_options(), rb_extract_keywords(), and unknown_keyword_error().

VALUE rb_hash_values | ( | VALUE | hash | ) |

Definition at line 1827 of file hash.c.

References OBJ_PROMOTED, Qundef, RARRAY_PTR_USE, rb_ary_new_capa(), rb_ary_set_len(), rb_gc_writebarrier_remember_promoted(), rb_hash_foreach(), RHASH, RHASH_SIZE, size, ST_DATA_COMPATIBLE_P, st_values_check(), and values_i().

Referenced by Init_Hash(), rb_ary_or(), and rb_ary_uniq().

VALUE rb_home_dir_of | ( | VALUE | user,
|  | VALUE | result
| ) |  |

Definition at line 3001 of file file.c.

References copy_home_path(), PRIsVALUE, rb_eArgError, rb_raise(), result, and RSTRING_PTR.

Referenced by dir_s_home(), and rb_file_expand_path_internal().

ID rb_id_encoding | ( | void |  | ) |

Definition at line 732 of file encoding.c.

References CONST_ID, and id_encoding.

Referenced by enc_set_index(), id2encidx(), rb_enc_get_index(), w_encoding(), and w_obj_each().

VALUE rb_id_quote_unprintable | ( | ID |  | ) |

Definition at line 8421 of file string.c.

References rb_id2str(), and rb_str_quote_unprintable().

const char* rb_insns_name | ( | int | i | ) |

Definition at line 5601 of file compile.c.

VALUE rb_insns_name_array | ( | void |  | ) |

Definition at line 5607 of file compile.c.

References numberof, rb_ary_new(), rb_ary_push(), rb_fstring(), rb_obj_freeze(), and rb_str_new2.

Referenced by Init_VM().

VALUE rb_int_positive_pow | ( | long | x,
|  | unsigned long | y
| ) |  |

Definition at line 3047 of file numeric.c.

References int_pow().

Referenced by parser_yylex().

VALUE rb_int_pred | ( | VALUE | num | ) |

Definition at line 2499 of file numeric.c.

References FIX2LONG, FIXNUM_P, INT2FIX, LONG2NUM, rb_big_minus(), rb_funcall(), RB_TYPE_P, and T_BIGNUM.

VALUE rb_int_succ | ( | VALUE | num | ) |

Definition at line 2474 of file numeric.c.

References FIX2LONG, FIXNUM_P, INT2FIX, LONG2NUM, rb_big_plus(), rb_funcall(), RB_TYPE_P, and T_BIGNUM.

Referenced by enumerator_with_index_i().

VALUE rb_integer_float_cmp | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 5299 of file bignum.c.

References FIX2LONG, FIXNUM_MAX, FIXNUM_MIN, FIXNUM_P, INT2FIX, isinf(), isnan, Qnil, rb_big_cmp(), rb_dbl2big(), and RFLOAT_VALUE.

Referenced by big_op(), fix_cmp(), fix_ge(), fix_gt(), fix_le(), fix_lt(), flo_cmp(), flo_ge(), flo_gt(), flo_le(), flo_lt(), and rb_big_cmp().

VALUE rb_integer_float_eq | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 5349 of file bignum.c.

References FIX2LONG, FIXNUM_P, isinf(), isnan, LONG_MAX, LONG_MIN, Qfalse, Qtrue, rb_big_eq(), rb_dbl2big(), and RFLOAT_VALUE.

Referenced by fix_equal(), flo_eq(), and rb_big_eq().

VALUE rb_invcmp | ( | VALUE | ,
|  | VALUE |
| ) |  |

Definition at line 42 of file compar.c.

References INT2FIX, invcmp_recursive(), NIL_P, Qnil, Qundef, rb_cmpint(), rb_exec_recursive(), and result.

Referenced by rb_str_cmp_m(), and time_cmp().

ssize_t rb_io_bufread | ( | VALUE | io,
|  | void * | buf,
|  | size_t | size
| ) |  |

Definition at line 2094 of file io.c.

References bufread_arg::fptr, GetOpenFile, io_bufread(), and rb_io_check_readable().

VALUE rb_io_flush_raw | ( | VALUE | ,
|  | int |
| ) |  |

Definition at line 1466 of file io.c.

References rb_io_t::fd, FMODE_READABLE, FMODE_WRITABLE, binwrite_arg::fptr, GetOpenFile, GetWriteIO, id_flush, io_fflush(), io_unread(), rb_io_t::mode, rb_funcall(), rb_sys_fail(), rb_thread_io_blocking_region(), RB_TYPE_P, rb_w32_get_osfhandle(), and T_FILE.

Referenced by rb_file_flock(), rb_file_size(), and rb_io_flush().

int rb_is_attrset_name | ( | VALUE | name | ) |

Definition at line 17413 of file ripper.c.

References ID_ATTRSET, IDSET_ATTRSET_FOR_INTERN, and rb_str_symname_type().

Referenced by rb_check_id(), and rb_check_id_cstr().

int rb_is_class_name | ( | VALUE | name | ) |

Definition at line 17395 of file ripper.c.

References ID_CLASS, and rb_str_symname_type().

Referenced by rb_mod_cvar_defined(), rb_mod_cvar_get(), and rb_mod_remove_cvar().

int rb_is_const_name | ( | VALUE | name | ) |

Definition at line 17389 of file ripper.c.

References ID_CONST, and rb_str_symname_type().

Referenced by new_struct(), rb_is_attr_name(), rb_mod_const_defined(), rb_mod_const_get(), and rb_mod_remove_const().

int rb_is_global_name | ( | VALUE | name | ) |

Definition at line 17401 of file ripper.c.

References ID_GLOBAL, and rb_str_symname_type().

int rb_is_instance_name | ( | VALUE | name | ) |

Definition at line 17407 of file ripper.c.

References ID_INSTANCE, and rb_str_symname_type().

Referenced by rb_obj_ivar_defined(), rb_obj_ivar_get(), and rb_obj_remove_instance_variable().

int rb_is_junk_name | ( | VALUE | name | ) |

Definition at line 17435 of file ripper.c.

References IDSET_ATTRSET_FOR_SYNTAX, and rb_str_symname_type().

int rb_is_local_name | ( | VALUE | name | ) |

Definition at line 17419 of file ripper.c.

References ID_LOCAL, and rb_str_symname_type().

Referenced by check_local_id(), and rb_is_attr_name().

int rb_is_method_name | ( | VALUE | name | ) |

Definition at line 17425 of file ripper.c.

References FALSE, ID_ATTRSET, ID_JUNK, ID_LOCAL, rb_str_symname_type(), and TRUE.

VALUE rb_iseq_absolute_path | ( | VALUE | iseqval | ) |

Definition at line 881 of file iseq.c.

References rb_iseq_location_struct::absolute_path, GetISeqPtr, and rb_iseq_struct::location.

Referenced by Init_ISeq(), and rb_profile_frame_absolute_path().

VALUE rb_iseq_base_label | ( | VALUE | iseqval | ) |

Definition at line 940 of file iseq.c.

References rb_iseq_location_struct::base_label, GetISeqPtr, and rb_iseq_struct::location.

Referenced by Init_ISeq(), and rb_profile_frame_base_label().

VALUE rb_iseq_clone | ( | VALUE | iseqval,
|  | VALUE | newcbase
| ) |  |

Definition at line 1922 of file iseq.c.

References rb_iseq_struct::cref_stack, GetISeqPtr, iseq_alloc(), ISEQ_SET_CREF, rb_iseq_struct::klass, rb_iseq_struct::local_iseq, MEMCPY, NEW_CREF, rb_iseq_struct::orig, rb_cISeq, RB_OBJ_WRITE, and rb_iseq_struct::self.

Referenced by clone_method(), and vm_define_method().

VALUE rb_iseq_first_lineno | ( | VALUE | iseqval | ) |

Definition at line 958 of file iseq.c.

References rb_iseq_location_struct::first_lineno, GetISeqPtr, and rb_iseq_struct::location.

Referenced by Init_ISeq(), iseq_location(), proc_binding(), proc_to_s(), rb_method_entry_make(), and rb_profile_frame_first_lineno().

VALUE rb_iseq_klass | ( | VALUE | iseqval | ) |

Definition at line 966 of file iseq.c.

References GetISeqPtr, rb_iseq_struct::klass, and rb_iseq_struct::local_iseq.

Referenced by rb_profile_frame_classpath(), and rb_profile_frame_singleton_method_p().

VALUE rb_iseq_label | ( | VALUE | iseqval | ) |

Definition at line 912 of file iseq.c.

References GetISeqPtr, rb_iseq_location_struct::label, and rb_iseq_struct::location.

Referenced by Init_ISeq(), and rb_profile_frame_label().

VALUE rb_iseq_method_name | ( | VALUE | self | ) |

Definition at line 974 of file iseq.c.

References rb_iseq_location_struct::base_label, GetISeqPtr, rb_iseq_struct::local_iseq, rb_iseq_struct::location, Qnil, and rb_iseq_struct::type.

Referenced by rb_profile_frame_method_name(), and rb_profile_frame_qualified_method_name().

VALUE rb_iseq_path | ( | VALUE | iseqval | ) |

Definition at line 857 of file iseq.c.

References GetISeqPtr, rb_iseq_struct::location, and rb_iseq_location_struct::path.

Referenced by Init_ISeq(), and rb_profile_frame_path().

void rb_last_status_clear | ( | void |  | ) |

Definition at line 336 of file process.c.

References GET_THREAD(), rb_thread_struct::last_status, and Qnil.

Referenced by proc_wait(), proc_waitall(), rb_f_backquote(), rb_f_system(), and rb_io_close().

VALUE rb_lcm | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 1730 of file rational.c.

References f_lcm(), and nurat_int_value().

Referenced by Init_Rational(), and nucomp_denominator().

int rb_local_defined | ( | ID |  | ) |

Definition at line 5984 of file compile.c.

References rb_thread_struct::base_block, GET_THREAD(), rb_block_struct::iseq, rb_iseq_struct::local_iseq, rb_iseq_struct::local_table, and rb_iseq_struct::local_table_size.

Referenced by local_id_gen().

VALUE rb_make_backtrace | ( | void |  | ) |

Definition at line 817 of file vm_backtrace.c.

References GET_THREAD(), and rb_vm_backtrace_str_ary().

void rb_mark_end_proc | ( | void |  | ) |

Definition at line 80 of file eval_jump.c.

References end_proc_data::data, end_procs, ephemeral_end_procs, link(), end_proc_data::next, and rb_gc_mark().

Referenced by gc_mark_roots().

void rb_mark_generic_ivar | ( | VALUE |  | ) |

Definition at line 992 of file variable.c.

References rb_mark_tbl(), st_data_t, and st_lookup().

Referenced by gc_mark_children().

void rb_mark_generic_ivar_tbl | ( | void |  | ) |

Definition at line 1022 of file variable.c.

References givar_i(), and st_foreach_safe().

Referenced by gc_mark_roots().

VALUE rb_math_atan2 | ( | VALUE | ,
|  | VALUE |
| ) |  |

VALUE rb_math_cos | ( | VALUE |  | ) |

VALUE rb_math_cosh | ( | VALUE |  | ) |

VALUE rb_math_exp | ( | VALUE |  | ) |

VALUE rb_math_hypot | ( | VALUE | ,
|  | VALUE |
| ) |  |

VALUE rb_math_log | ( | int | argc,
|  | VALUE * | argv
| ) |  |

Referenced by imp2().

VALUE rb_math_sin | ( | VALUE |  | ) |

VALUE rb_math_sinh | ( | VALUE |  | ) |

VALUE rb_math_sqrt | ( | VALUE |  | ) |

void rb_maygvl_fd_fix_cloexec | ( | int | fd | ) |

Definition at line 198 of file io.c.

References errno, fcntl(), rb_bug(), and strerror().

Referenced by cloexec_accept(), rb_cloexec_dup2(), rb_cloexec_fcntl_dupfd(), rb_cloexec_open(), rb_cloexec_pipe(), and rb_fd_fix_cloexec().

int rb_method_defined_by | ( | VALUE | obj,
|  | ID | mid,
|  | VALUE(*)(ANYARGS) | cfunc
| ) |  |

void rb_mutex_allow_trap | ( | VALUE | self,
|  | int | val
| ) |  |

Definition at line 4642 of file thread.c.

References rb_mutex_struct::allow_trap, GetMutexPtr, and val.

Referenced by io_binwrite().

VALUE rb_mutex_owned_p | ( | VALUE | self | ) |

Definition at line 4449 of file thread.c.

References GET_THREAD(), GetMutexPtr, Qfalse, Qtrue, and rb_mutex_struct::th.

Referenced by finish_writeconv(), Init_Thread(), and io_flush_buffer().

rb_serial_t rb_next_class_serial | ( | void |  | ) |

Definition at line 92 of file vm.c.

References NEXT_CLASS_SERIAL.

Referenced by class_alloc(), and rb_class_clear_method_cache().

int rb_num_negative_p | ( | VALUE |  | ) |

Definition at line 197 of file numeric.c.

References negative_int_p().

Referenced by rb_random_ulong_limited().

int rb_num_to_uint | ( | VALUE | val,
|  | unsigned int * | ret
| ) |  |

Definition at line 132 of file numeric.c.

References FIX2LONG, FIXNUM_P, NULL, NUMERR_NEGATIVE, NUMERR_TOOLARGE, NUMERR_TYPE, rb_absint_size(), rb_big2ulong(), RB_TYPE_P, RBIGNUM_NEGATIVE_P, T_BIGNUM, and val.

Referenced by int_chr(), and rb_str_concat().

void rb_obj_copy_ivar | ( | VALUE | dest,
|  | VALUE | obj
| ) |  |

Definition at line 255 of file object.c.

References ALLOC_N, MEMCPY, RBASIC, ROBJECT, ROBJECT_EMBED, ROBJECT_EMBED_LEN_MAX, ROBJECT_IVPTR, and xfree().

Referenced by init_copy().

VALUE rb_obj_equal | ( | VALUE | obj1,
|  | VALUE | obj2
| ) |  |

Definition at line 142 of file object.c.

References Qfalse, and Qtrue.

Referenced by Init_Object(), and opt_eq_func().

size_t rb_obj_gc_flags | ( | VALUE | ,
|  | ID | [],
|  | size_t |
| ) |  |

VALUE rb_obj_is_fiber | ( | VALUE |  | ) |

Definition at line 370 of file cont.c.

References Qfalse, Qtrue, and rb_typeddata_is_kind_of().

Referenced by rb_objspace_call_finalizer().

VALUE rb_obj_is_mutex | ( | VALUE | obj | ) |

Definition at line 4216 of file thread.c.

References Qfalse, Qtrue, and rb_typeddata_is_kind_of().

Referenced by rb_objspace_call_finalizer().

VALUE rb_obj_is_thread | ( | VALUE | obj | ) |

Definition at line 2155 of file vm.c.

References Qfalse, Qtrue, rb_typeddata_is_kind_of(), and thread_data_type.

Referenced by rb_objspace_call_finalizer().

size_t rb_obj_memsize_of | ( | VALUE |  | ) |

Definition at line 2548 of file gc.c.

References obj_memsize_of(), and TRUE.

Referenced by cos_i(), dump_object(), iow_size(), memsize_of_m(), and total_i().

RUBY_SYMBOL_EXPORT_BEGIN const char* rb_objspace_data_type_name | ( | VALUE | obj | ) |

Definition at line 1394 of file gc.c.

References RTYPEDDATA_P, and RTYPEDDATA_TYPE.

Referenced by cto_i(), and type_name().

void rb_objspace_set_event_hook | ( | const rb_event_flag_t | event | ) |

Definition at line 1265 of file gc.c.

References rb_objspace::hook_events, rb_objspace, and RUBY_INTERNAL_EVENT_OBJSPACE_MASK.

Referenced by recalc_add_ruby_vm_event_flags(), and recalc_remove_ruby_vm_event_flags().

int rb_parse_in_eval | ( | void |  | ) |

Definition at line 6003 of file compile.c.

References GET_THREAD(), and rb_thread_struct::parse_in_eval.

Referenced by parser_compile_string(), and rb_parser_compile_file_path().

int rb_parse_in_main | ( | void |  | ) |

Definition at line 6009 of file compile.c.

References GET_THREAD(), and rb_thread_struct::parse_in_eval.

Referenced by yyparse().

VALUE rb_parser_get_yydebug | ( | VALUE |  | ) |

Definition at line 17634 of file ripper.c.

VALUE rb_parser_set_yydebug | ( | VALUE | ,
|  | VALUE |
| ) |  |

Definition at line 17649 of file ripper.c.

void rb_print_backtrace | ( | void |  | ) |

Definition at line 685 of file vm_dump.c.

References free().

Referenced by rb_vm_bugreport().

VALUE rb_proc_location | ( | VALUE | self | ) |

Definition at line 928 of file proc.c.

References get_proc_iseq, and iseq_location().

Referenced by Init_Proc(), and thread_initialize().

VALUE rb_rational_reciprocal | ( | VALUE | x | ) |

Definition at line 1694 of file rational.c.

References CLASS_OF, f_rational_new_no_reduce2(), and get_dat1.

Referenced by fix_divide().

VALUE rb_realpath_internal | ( | VALUE | basedir,
|  | VALUE | path,
|  | int | strict
| ) |  |

Definition at line 3620 of file file.c.

References chompdirsep(), FilePathValue, Inc, NIL_P, NULL, OBJ_TAINT, Qnil, rb_dir_getwd(), rb_enc_get(), rb_hash_new(), rb_secure(), rb_str_dup_frozen(), rb_str_set_len(), rb_str_subseq(), realpath_rec(), RSTRING_GETMEM, and skipprefixroot().

Referenced by iseq_s_compile_file(), rb_file_s_realdirpath(), rb_file_s_realpath(), rb_load_internal0(), and ruby_init_loadpath_safe().

VALUE rb_refinement_module_get_refined_class | ( | VALUE | module | ) |

Definition at line 1177 of file eval.c.

References CONST_ID, and rb_attr_get().

Referenced by include_modules_at(), rb_method_entry_make(), and rb_mod_to_s().

VALUE rb_reg_check_preprocess | ( | VALUE |  | ) |

Definition at line 2325 of file re.c.

References buf, err, Qnil, rb_enc_get(), RB_GC_GUARD, rb_reg_error_desc(), rb_reg_preprocess(), RSTRING_LEN, RSTRING_PTR, and StringValue.

Referenced by reg_fragment_check_gen().

VALUE rb_reg_compile | ( | VALUE | str,
|  | int | options,
|  | const char * | sourcefile,
|  | int | sourceline
| ) |  |

Definition at line 2548 of file re.c.

References err, FL_SET, Qnil, rb_reg_alloc(), rb_reg_error_desc(), rb_reg_initialize_str(), rb_set_errinfo(), rb_str_new(), and REG_LITERAL.

Referenced by reg_compile_gen().

int rb_sigaltstack_size | ( | void |  | ) |

Referenced by Init_heap(), and th_init().

VALUE rb_sourcefilename | ( | void |  | ) |

Definition at line 973 of file vm.c.

References rb_thread_struct::cfp, GET_THREAD(), rb_control_frame_struct::iseq, rb_iseq_struct::location, rb_iseq_location_struct::path, Qnil, and rb_vm_get_ruby_level_next_cfp().

Referenced by eval_string_with_cref(), rb_const_set(), and warn_print().

st_table* rb_st_copy | ( | VALUE | obj,
|  | struct st_table * | orig_tbl
| ) |  |

Definition at line 2633 of file variable.c.

References st_copy(), st_data_t, st_foreach(), and tbl_copy_i().

Referenced by init_copy(), rb_mod_init_copy(), and rb_singleton_class_clone_and_attach().

int rb_st_insert_id_and_value | ( | VALUE | obj,
|  | st_table * | tbl,
|  | ID | key,
|  | VALUE | value
| ) |  |

Definition at line 2618 of file variable.c.

References Qundef, RB_OBJ_WRITTEN, result, st_data_t, and st_insert().

Referenced by find_class_path(), rb_cvar_set(), rb_ivar_set(), and rb_singleton_class_attached().

void rb_stdio_set_default_encoding | ( | void |  | ) |

Definition at line 10558 of file io.c.

References Qnil, rb_io_set_encoding(), rb_stderr, rb_stdin, rb_stdout, and val.

Referenced by process_options().

VALUE rb_str2big_karatsuba | ( | VALUE | arg,
|  | int | base,
|  | int | badcheck
| ) |  |

Definition at line 4233 of file bignum.c.

References bignorm(), maxpow_in_bdigit_dbl(), rb_eArgError, RB_GC_GUARD, rb_must_asciicompat(), rb_raise(), roomof, str2big_karatsuba(), str2big_scan_digits(), and StringValueCStr.

VALUE rb_str2big_normal | ( | VALUE | arg,
|  | int | base,
|  | int | badcheck
| ) |  |

Definition at line 4194 of file bignum.c.

References bignorm(), maxpow_in_bdigit_dbl(), rb_eArgError, RB_GC_GUARD, rb_must_asciicompat(), rb_raise(), roomof, str2big_normal(), str2big_scan_digits(), and StringValueCStr.

VALUE rb_str2big_poweroftwo | ( | VALUE | arg,
|  | int | base,
|  | int | badcheck
| ) |  |

Definition at line 4161 of file bignum.c.

References bignorm(), bit_length, POW2_P, rb_eArgError, RB_GC_GUARD, rb_must_asciicompat(), rb_raise(), str2big_poweroftwo(), str2big_scan_digits(), and StringValueCStr.

int rb_str_buf_cat_escaped_char | ( | VALUE | result,
|  | unsigned int | c,
|  | int | unicode_p
| ) |  |

Definition at line 4747 of file string.c.

References buf, CHAR_ESC_LEN, ISPRINT, rb_str_buf_cat(), snprintf, and strlen().

Referenced by rb_reg_expr_str(), and rb_str_inspect().

void rb_str_fill_terminator | ( | VALUE | str,
|  | const int | termlen
| ) |  |

Definition at line 1670 of file string.c.

References rb_enc_get(), rb_enc_mbminlen, RSTRING_LEN, RSTRING_PTR, and str_fill_term().

Referenced by rb_enc_associate_index().

VALUE rb_str_locktmp_ensure | ( | VALUE | str,
|  | VALUE(*)(VALUE) | func,
|  | VALUE | arg
| ) |  |

Definition at line 2001 of file string.c.

References func, rb_ensure(), rb_str_locktmp(), and rb_str_unlocktmp().

Referenced by io_fread(), and io_getpartial().

VALUE rb_str_quote_unprintable | ( | VALUE |  | ) |

Definition at line 8400 of file string.c.

References Check_Type, NULL, rb_default_external_encoding(), rb_default_internal_encoding(), rb_str_inspect(), rb_str_is_ascii_only_p(), RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, sym_printable(), and T_STRING.

Referenced by rb_id_quote_unprintable().

int rb_str_symname_p | ( | VALUE |  | ) |

Definition at line 8381 of file string.c.

References FALSE, NULL, rb_default_external_encoding(), rb_default_internal_encoding(), rb_enc_symname_p(), rb_str_is_ascii_only_p(), RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, strlen(), sym_printable(), and TRUE.

Referenced by id_to_name(), and sym_inspect().

VALUE rb_struct_init_copy | ( | VALUE | copy,
|  | VALUE | s
| ) |  |

Definition at line 707 of file struct.c.

References OBJ_INIT_COPY, rb_eTypeError, rb_raise(), RSTRUCT_GET, RSTRUCT_LEN, and RSTRUCT_SET.

Referenced by Init_Struct(), and range_initialize_copy().

VALUE rb_suppress_tracing | ( | VALUE(*)(VALUE) | func,
|  | VALUE | arg
| ) |  |

Definition at line 388 of file vm_trace.c.

References rb_trace_arg_struct::event, GET_THREAD(), JUMP_TAG, Qnil, rb_threadptr_reset_raised(), rb_threadptr_set_raised(), result, rb_thread_struct::state, TH_EXEC_TAG, TH_POP_TAG, TH_PUSH_TAG, rb_thread_struct::trace_arg, rb_vm_struct::trace_running, and rb_thread_struct::vm.

Referenced by yycompile().

void rb_thread_execute_interrupts | ( | VALUE | th | ) |

Definition at line 2026 of file thread.c.

References GetThreadPtr, and rb_threadptr_execute_interrupts().

Referenced by exec_interrupts(), maygvl_copy_stream_continue_p(), and rb_f_kill().

VALUE rb_thread_io_blocking_region | ( | rb_blocking_function_t * | func,
|  | void * | data1,
|  | int | fd
| ) |  |

Definition at line 1380 of file thread.c.

References BLOCKING_REGION, errno, EXEC_TAG, FALSE, func, GET_THREAD(), JUMP_TAG, Qundef, RUBY_VM_CHECK_INTS_BLOCKING, TH_POP_TAG, TH_PUSH_TAG, val, and rb_thread_struct::waiting_fd.

Referenced by do_ioctl(), io_flush_buffer_async(), rb_file_flock(), rb_io_flush_raw(), rb_read_internal(), and rb_write_internal().

void rb_thread_mark | ( | void * | th | ) |

Definition at line 2014 of file vm.c.

References rb_thread_struct::cfp, rb_thread_struct::errinfo, rb_thread_struct::event_hooks, rb_thread_struct::fiber, rb_thread_struct::first_args, rb_thread_struct::first_proc, GET_THREAD(), rb_control_frame_struct::iseq, rb_control_frame_struct::klass, rb_thread_struct::last_status, rb_thread_struct::local_storage, rb_thread_struct::locking_mutex, rb_thread_struct::machine, rb_thread_struct::mark_stack_len, rb_control_frame_struct::me, NULL, rb_thread_struct::pending_interrupt_mask_stack, rb_thread_struct::pending_interrupt_queue, rb_control_frame_struct::proc, rb_gc_mark(), rb_gc_mark_locations, rb_gc_mark_machine_stack(), rb_mark_method_entry(), rb_mark_tbl(), rb_vm_trace_mark_event_hooks(), rb_thread_struct::regs, rb_thread_struct::root_fiber, rb_thread_struct::root_svar, RUBY_MARK_ENTER, RUBY_MARK_LEAVE, RUBY_MARK_UNLESS_NULL, RUBY_VM_NORMAL_ISEQ_P, RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_iseq_struct::self, rb_control_frame_struct::self, rb_control_frame_struct::sp, rb_thread_struct::stack, rb_thread_struct::stack_end, rb_thread_struct::stack_size, rb_thread_struct::stack_start, rb_thread_struct::stat_insn_usage, rb_thread_struct::thgroup, rb_thread_struct::top_self, rb_thread_struct::top_wrapper, and rb_thread_struct::value.

Referenced by cont_mark().

void rb_thread_recycle_stack_release | ( | VALUE * |  | ) |

Definition at line 1992 of file vm.c.

References RECYCLE_MAX, and ruby_xfree().

Referenced by thread_start_func_2().

VALUE rb_thread_shield_destroy | ( | VALUE | self | ) |

Definition at line 4745 of file thread.c.

References DATA_PTR, GetThreadShieldPtr, Qfalse, Qtrue, rb_mutex_unlock(), and rb_thread_shield_waiting.

Referenced by release_thread_shield().

VALUE rb_thread_shield_new | ( | void |  | ) |

Definition at line 4698 of file thread.c.

References DATA_PTR, rb_cThreadShield, rb_mutex_lock(), and thread_shield_alloc().

Referenced by load_lock().

VALUE rb_thread_shield_release | ( | VALUE | self | ) |

Definition at line 4734 of file thread.c.

References GetThreadShieldPtr, Qfalse, Qtrue, rb_mutex_unlock(), and rb_thread_shield_waiting.

Referenced by release_thread_shield().

VALUE rb_thread_shield_wait | ( | VALUE | self | ) |

Definition at line 4714 of file thread.c.

References DATA_PTR, GET_THREAD(), GetMutexPtr, GetThreadShieldPtr, Qfalse, Qnil, Qtrue, rb_mutex_lock(), rb_mutex_unlock(), rb_thread_shield_waiting, rb_thread_shield_waiting_dec(), rb_thread_shield_waiting_inc(), and rb_mutex_struct::th.

Referenced by load_lock().

struct timeval rb_time_timeval | ( | VALUE |  | ) |

Definition at line 2417 of file time.c.

References FALSE, GetTimeval, IsTimeval, time_timeval(), time_object::timew, timew2timespec(), timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, timeval::tv_usec, TYPEOF_TIMEVAL_TV_SEC, and TYPEOF_TIMEVAL_TV_USEC.

VALUE rb_uninterruptible | ( | VALUE(*)(ANYARGS) | b_proc,
|  | VALUE | data
| ) |  |

Definition at line 5307 of file thread.c.

References GET_THREAD(), rb_thread_struct::pending_interrupt_mask_stack, rb_ary_pop(), rb_ary_push(), rb_cObject, rb_ensure(), rb_hash_aset(), rb_hash_new(), and sym_never.

Referenced by rb_f_p().

VALUE rb_vm_backtrace_object | ( | void |  | ) |

Definition at line 536 of file vm_backtrace.c.

References backtrace_object(), and GET_THREAD().

Referenced by argument_error(), and setup_exception().

void rb_vm_bugreport | ( | void |  | ) |

Definition at line 713 of file vm_dump.c.

Referenced by report_bug(), and sdr().

void rb_vm_change_state | ( | void |  | ) |

const void** rb_vm_get_insns_address_table | ( | void |  | ) |

Definition at line 118 of file vm_exec.c.

References vm_exec_core().

Referenced by rb_iseq_translate_threaded_code().

void rb_vm_inc_const_missing_count | ( | void |  | ) |

Definition at line 111 of file vm.c.

Referenced by rb_const_get_0().

void rb_vm_mark | ( | void * | ptr | ) |

Definition at line 1762 of file vm.c.

References rb_vm_struct::cmd, rb_vm_struct::coverages, DEFINED_EXPR, rb_vm_struct::defined_module_hash, rb_vm_struct::defined_strings, rb_vm_struct::event_hooks, rb_vm_struct::expanded_load_path, rb_vm_struct::living_threads, rb_vm_struct::load_path, rb_vm_struct::load_path_check_cache, rb_vm_struct::load_path_snapshot, rb_vm_struct::loaded_features, rb_vm_struct::loaded_features_snapshot, rb_vm_struct::loading_table, rb_vm_struct::mark_object_ary, rb_gc_mark(), rb_gc_mark_locations, rb_mark_tbl(), rb_vm_trace_mark_event_hooks(), RUBY_GC_INFO, RUBY_MARK_ENTER, RUBY_MARK_LEAVE, RUBY_MARK_UNLESS_NULL, RUBY_NSIG, ruby_special_error_count, rb_vm_struct::special_exceptions, st_foreach(), rb_vm_struct::thgroup_default, rb_vm_struct::top_self, rb_vm_struct::trap_list, and vm_mark_each_thread_func().

Referenced by gc_mark_roots().

void rb_vm_pop_cfunc_frame | ( | void |  | ) |

Definition at line 281 of file vm.c.

References rb_method_entry_struct::called_id, rb_thread_struct::cfp, EXEC_EVENT_HOOK, GET_THREAD(), rb_method_entry_struct::klass, rb_control_frame_struct::me, Qnil, RUBY_DTRACE_CMETHOD_RETURN_HOOK, RUBY_EVENT_C_RETURN, rb_control_frame_struct::self, and vm_pop_frame().

Referenced by raise_method_missing(), rb_mod_const_missing(), and rb_vm_rewind_cfp().

VALUE rb_vm_thread_backtrace | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | thval
| ) |  |

Definition at line 906 of file vm_backtrace.c.

References thread_backtrace_to_ary().

Referenced by rb_thread_backtrace_m().

VALUE rb_vm_thread_backtrace_locations | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | thval
| ) |  |

Definition at line 912 of file vm_backtrace.c.

References thread_backtrace_to_ary().

Referenced by rb_thread_backtrace_locations_m().

VALUE rb_vm_top_self | ( | void |  | ) |

Definition at line 2826 of file vm.c.

References GET_VM.

Referenced by Init_top_self(), Init_VM(), and ruby_thread_init().

void rb_write_error_str | ( | VALUE | mesg | ) |

Definition at line 7163 of file io.c.

References rb_io_t::fd, orig_stderr, RB_GC_GUARD, rb_io_write(), rb_stderr, RFILE, RSTRING_LEN, and RSTRING_PTR.

Referenced by compile_err_append(), compile_warn_print(), warn_print(), and warn_printf().

static void RCLASS_M_TBL_INIT | ( | VALUE | c | ) |
| inline static

Definition at line 302 of file internal.h.

References ALLOC, RCLASS_M_TBL_WRAPPER, method_table_wrapper::serial, st_init_numtable(), and method_table_wrapper::tbl.

Referenced by rb_class_boot(), rb_mod_init_copy(), rb_module_new(), rb_prepend_module(), and rb_singleton_class_clone_and_attach().

static VALUE RCLASS_SET_SUPER | ( | VALUE | klass,
|  | VALUE | super
| ) |  |
| inline static

Definition at line 319 of file internal.h.

References rb_class_remove_from_super_subclasses(), rb_class_subclass_add(), RB_OBJ_WRITE, and RCLASS.

Referenced by add_activated_refinement(), class_alloc(), include_modules_at(), Init_VM(), make_metaclass(), rb_class_boot(), rb_class_initialize(), rb_include_class_new(), rb_mod_init_copy(), rb_mod_refine(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), and rb_using_refinement().

static VALUE RCLASS_SUPER | ( | VALUE | klass | ) |
| inline static

Definition at line 313 of file internal.h.

References RCLASS.

void ruby_error_print | ( | void |  | ) |

Definition at line 206 of file eval_error.c.

References error_print().

Referenced by rb_f_abort().

double ruby_float_mod | ( | double | x,
|  | double | y
| ) |  |

Definition at line 907 of file numeric.c.

References flodivmod(), and mod.

Referenced by fix_mod(), and flo_mod().

int ruby_float_step | ( | VALUE | from,
|  | VALUE | to,
|  | VALUE | step,
|  | int | excl
| ) |  |

Definition at line 1782 of file numeric.c.

References DBL2NUM, FALSE, isinf(), NUM2DBL, RB_TYPE_P, rb_yield(), ruby_float_step_size(), T_FLOAT, TRUE, and val.

Referenced by num_step(), and range_step().

void ruby_gc_set_params | ( | int | safe_level | ) |

Definition at line 5733 of file gc.c.

References gc_set_initial_pages(), get_envparam_double(), get_envparam_int(), ruby_gc_params_t::growth_factor, ruby_gc_params_t::growth_max_slots, ruby_gc_params_t::heap_free_slots, ruby_gc_params_t::heap_init_slots, ruby_gc_params_t::malloc_limit_growth_factor, ruby_gc_params_t::malloc_limit_max, ruby_gc_params_t::malloc_limit_min, rb_objspace::oldmalloc_increase_limit, ruby_gc_params_t::oldmalloc_limit_growth_factor, ruby_gc_params_t::oldmalloc_limit_max, ruby_gc_params_t::oldmalloc_limit_min, ruby_gc_params_t::oldobject_limit_factor, rb_objspace, rb_warn(), and rb_objspace::rgengc.

Referenced by process_options(), and rb_gc_set_params().

const char* ruby_get_inplace_mode | ( | void |  | ) |

Definition at line 11600 of file io.c.

References ARGF.

void ruby_kill | ( | rb_pid_t | pid,
|  | int | sig
| ) |  |

Definition at line 5319 of file thread.c.

References err, GET_THREAD(), GVL_UNLOCK_BEGIN, GVL_UNLOCK_END, rb_thread_struct::interrupt_cond, rb_thread_struct::interrupt_lock, kill(), and rb_sys_fail().

Referenced by rb_f_kill().

void ruby_mimfree | ( | void * | ptr | ) |

Definition at line 6267 of file gc.c.

References free().

Referenced by ruby_vm_destruct().

void* ruby_mimmalloc | ( | size_t | size | ) |

Definition at line 6251 of file gc.c.

References malloc.

Referenced by Init_BareVM().

VALUE ruby_num_interval_step_size | ( | VALUE | from,
|  | VALUE | to,
|  | VALUE | step,
|  | int | excl
| ) |  |

Definition at line 1813 of file numeric.c.

References cmp, DBL2NUM, diff(), FIX2LONG, FIXNUM_P, id_cmp, id_div, INFINITY, INT2FIX, isinf(), LONG2FIX, NUM2DBL, POSFIXABLE, rb_cmpint(), rb_dbl2big(), rb_funcall(), rb_num_coerce_cmp(), RB_TYPE_P, result, RTEST, ruby_float_step_size(), T_FLOAT, and ULONG2NUM.

Referenced by int_downto_size(), int_upto_size(), num_step_size(), range_size(), and range_step_size().

void ruby_register_rollback_func_for_ensure | ( | VALUE(*)(ANYARGS) | ensure_func,
|  | VALUE(*)(ANYARGS) | rollback_func
| ) |  |

Definition at line 947 of file cont.c.

References GET_VM, NULL, st_data_t, st_init_numtable(), st_insert(), and UNLIKELY.

Referenced by Init_Hash().

void ruby_set_inplace_mode | ( | const char * |  | ) |

Definition at line 11606 of file io.c.

References ARGF, free, and strdup.

Referenced by proc_options().

void void ruby_sized_xfree | ( | void * | x,
|  | size_t | size
| ) |  |

Definition at line 6234 of file gc.c.

References objspace_xfree().

Referenced by rb_ary_free(), rb_ary_initialize(), rb_ary_replace(), rb_ary_sort_bang(), rb_str_free(), ruby_xfree(), str_discard(), tr_trans(), wmap_final_func(), wmap_finalize(), and wmap_free_map().

void* ruby_sized_xrealloc | ( | void * | ptr,
|  | size_t | new_size,
|  | size_t | old_size
| ) |  |

Definition at line 6200 of file gc.c.

References objspace_xrealloc().

Referenced by ruby_xrealloc().

void* ruby_sized_xrealloc2 | ( | void * | ptr,
|  | size_t | new_count,
|  | size_t | element_size,
|  | size_t | old_count
| ) |  |

## Variable Documentation

const signed char ruby_digit36_to_number_table[]

Definition at line 58 of file util.c.

Referenced by hex2num(), and scan_digits().