Ruby  2.4.2p198(2017-09-14revision59899)
Macros | Enumerations | Functions | Variables
eval.c File Reference
#include "internal.h"
#include "eval_intern.h"
#include "iseq.h"
#include "gc.h"
#include "ruby/vm.h"
#include "vm_core.h"
#include "probes_helper.h"
#include "eval_error.c"
#include "eval_jump.c"
Include dependency graph for eval.c:

Go to the source code of this file.

Macros

#define id_signo   ruby_static_id_signo
 
#define id_status   ruby_static_id_status
 
#define exception_error   GET_VM()->special_exceptions[ruby_error_reenter]
 
#define CLASS_OR_MODULE_P(obj)
 

Enumerations

enum  { raise_opt_cause, raise_max_opt }
 

Functions

 NORETURN (void rb_raise_jump(VALUE, VALUE))
 
int ruby_setup (void)
 
void ruby_init (void)
 
void * ruby_options (int argc, char **argv)
 Processes command line arguments and compiles the Ruby source to execute. More...
 
static void ruby_finalize_0 (void)
 
static void ruby_finalize_1 (void)
 
void ruby_finalize (void)
 Runs the VM finalization processes. More...
 
int ruby_cleanup (volatile int ex)
 Destructs the VM. More...
 
static int ruby_exec_internal (void *n)
 
void ruby_stop (int ex)
 Calls ruby_cleanup() and exits the process. More...
 
int ruby_executable_node (void *n, int *status)
 Checks the return value of ruby_options(). More...
 
int ruby_run_node (void *n)
 Runs the given compiled source and exits this process. More...
 
int ruby_exec_node (void *n)
 Runs the given compiled source. More...
 
static VALUE rb_mod_nesting (void)
 
static VALUE rb_mod_s_constants (int argc, VALUE *argv, VALUE mod)
 
void rb_frozen_class_p (VALUE klass)
 
 NORETURN (static void rb_longjmp(int, volatile VALUE, VALUE))
 
static VALUE get_errinfo (void)
 
static VALUE get_thread_errinfo (rb_thread_t *th)
 
static VALUE exc_setup_cause (VALUE exc, VALUE cause)
 
static int sysstack_error_p (VALUE exc)
 
static int special_exception_p (rb_thread_t *th, VALUE exc)
 
static void setup_exception (rb_thread_t *th, int tag, volatile VALUE mesg, VALUE cause)
 
void rb_threadptr_setup_exception (rb_thread_t *th, VALUE mesg, VALUE cause)
 
static void rb_longjmp (int tag, volatile VALUE mesg, VALUE cause)
 
static VALUE make_exception (int argc, const VALUE *argv, int isstr)
 
void rb_exc_raise (VALUE mesg)
 
void rb_exc_fatal (VALUE mesg)
 
void rb_interrupt (void)
 
static int extract_raise_opts (int argc, const VALUE *argv, VALUE *opts)
 
static VALUE rb_f_raise (int argc, VALUE *argv)
 
VALUE rb_make_exception (int argc, const VALUE *argv)
 
void rb_raise_jump (VALUE mesg, VALUE cause)
 
void rb_jump_tag (int tag)
 
int rb_block_given_p (void)
 
int rb_iterator_p (void)
 
void rb_need_block (void)
 
VALUE rb_rescue2 (VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*r_proc)(ANYARGS), VALUE data2,...)
 
VALUE rb_rescue (VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*r_proc)(ANYARGS), VALUE data2)
 
VALUE rb_protect (VALUE(*proc)(VALUE), VALUE data, int *state)
 
VALUE rb_ensure (VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*e_proc)(ANYARGS), VALUE data2)
 
static ID frame_func_id (rb_control_frame_t *cfp)
 
static ID frame_called_id (rb_control_frame_t *cfp)
 
ID rb_frame_this_func (void)
 
ID rb_frame_callee (void)
 
static rb_control_frame_tprevious_frame (rb_thread_t *th)
 
static ID prev_frame_callee (void)
 
static ID prev_frame_func (void)
 
ID rb_frame_last_func (void)
 
static VALUE rb_mod_append_features (VALUE module, VALUE include)
 
static VALUE rb_mod_include (int argc, VALUE *argv, VALUE module)
 
static VALUE rb_mod_prepend_features (VALUE module, VALUE prepend)
 
static VALUE rb_mod_prepend (int argc, VALUE *argv, VALUE module)
 
static void ensure_class_or_module (VALUE obj)
 
static VALUE hidden_identity_hash_new (void)
 
void rb_using_refinement (rb_cref_t *cref, VALUE klass, VALUE module)
 
static int using_refinement (VALUE klass, VALUE module, VALUE arg)
 
static void using_module_recursive (const rb_cref_t *cref, VALUE klass)
 
void rb_using_module (const rb_cref_t *cref, VALUE module)
 
VALUE rb_refinement_module_get_refined_class (VALUE module)
 
static void add_activated_refinement (VALUE activated_refinements, VALUE klass, VALUE refinement)
 
static VALUE rb_mod_refine (VALUE module, VALUE klass)
 
static void ignored_block (VALUE module, const char *klass)
 
static VALUE mod_using (VALUE self, VALUE module)
 
static int used_modules_i (VALUE _, VALUE mod, VALUE ary)
 
static VALUE rb_mod_s_used_modules (void)
 
void rb_obj_call_init (VALUE obj, int argc, const VALUE *argv)
 
void rb_extend_object (VALUE obj, VALUE module)
 
static VALUE rb_mod_extend_object (VALUE mod, VALUE obj)
 
static VALUE rb_obj_extend (int argc, VALUE *argv, VALUE obj)
 
static VALUE top_include (int argc, VALUE *argv, VALUE self)
 
static VALUE top_using (VALUE self, VALUE module)
 
static const VALUEerrinfo_place (rb_thread_t *th)
 
static VALUE errinfo_getter (ID id)
 
VALUE rb_errinfo (void)
 
void rb_set_errinfo (VALUE err)
 
VALUE rb_rubylevel_errinfo (void)
 
static VALUE errat_getter (ID id)
 
static void errat_setter (VALUE val, ID id, VALUE *var)
 
static VALUE rb_f_method_name (void)
 
static VALUE rb_f_callee_name (void)
 
static VALUE f_current_dirname (void)
 
void Init_eval (void)
 

Variables

VALUE rb_eLocalJumpError
 
VALUE rb_eSysStackError
 
ID ruby_static_id_signo
 
ID ruby_static_id_status
 
static ID id_cause
 
VALUE rb_eThreadError
 

Macro Definition Documentation

◆ CLASS_OR_MODULE_P

#define CLASS_OR_MODULE_P (   obj)
Value:
(!SPECIAL_CONST_P(obj) && \
(BUILTIN_TYPE(obj) == T_CLASS || BUILTIN_TYPE(obj) == T_MODULE))
#define T_MODULE
Definition: ruby.h:494
#define BUILTIN_TYPE(x)
Definition: ruby.h:518
#define T_CLASS
Definition: ruby.h:492
#define SPECIAL_CONST_P(x)
Definition: ruby.h:1249

Definition at line 37 of file eval.c.

Referenced by rb_mod_append_features(), and rb_mod_prepend_features().

◆ exception_error

#define exception_error   GET_VM()->special_exceptions[ruby_error_reenter]

Definition at line 32 of file eval.c.

Referenced by setup_exception().

◆ id_signo

#define id_signo   ruby_static_id_signo

Definition at line 29 of file eval.c.

Referenced by error_handle(), Init_eval(), and ruby_cleanup().

◆ id_status

#define id_status   ruby_static_id_status

Definition at line 30 of file eval.c.

Referenced by Init_eval().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
raise_opt_cause 
raise_max_opt 

Definition at line 643 of file eval.c.

Function Documentation

◆ add_activated_refinement()

static void add_activated_refinement ( VALUE  activated_refinements,
VALUE  klass,
VALUE  refinement 
)
static

◆ ensure_class_or_module()

static void ensure_class_or_module ( VALUE  obj)
static

Definition at line 1129 of file eval.c.

References PRIsVALUE, rb_eTypeError, rb_obj_class(), rb_raise(), RB_TYPE_P, T_CLASS, and T_MODULE.

Referenced by rb_mod_refine(), and rb_using_refinement().

◆ errat_getter()

static VALUE errat_getter ( ID  id)
static

Definition at line 1645 of file eval.c.

References err, get_errinfo(), NIL_P, Qnil, and rb_get_backtrace().

Referenced by Init_eval().

◆ errat_setter()

static void errat_setter ( VALUE  val,
ID  id,
VALUE var 
)
static

Definition at line 1657 of file eval.c.

References err, get_errinfo(), NIL_P, rb_eArgError, rb_raise(), and set_backtrace().

Referenced by Init_eval().

◆ errinfo_getter()

static VALUE errinfo_getter ( ID  id)
static

◆ errinfo_place()

static const VALUE* errinfo_place ( rb_thread_t th)
static

◆ exc_setup_cause()

static VALUE exc_setup_cause ( VALUE  exc,
VALUE  cause 
)
static

◆ extract_raise_opts()

static int extract_raise_opts ( int  argc,
const VALUE argv,
VALUE opts 
)
static

Definition at line 646 of file eval.c.

References argc, CONST_ID, Qundef, raise_max_opt, rb_get_kwargs(), RB_TYPE_P, RHASH_EMPTY_P, and T_HASH.

Referenced by rb_f_raise().

◆ f_current_dirname()

static VALUE f_current_dirname ( void  )
static

Definition at line 1722 of file eval.c.

References NIL_P, Qnil, rb_current_realfilepath(), and rb_file_dirname().

Referenced by Init_eval().

◆ frame_called_id()

static ID frame_called_id ( rb_control_frame_t cfp)
static

◆ frame_func_id()

static ID frame_func_id ( rb_control_frame_t cfp)
static

◆ get_errinfo()

static VALUE get_errinfo ( void  )
static

◆ get_thread_errinfo()

static VALUE get_thread_errinfo ( rb_thread_t th)
static

◆ hidden_identity_hash_new()

static VALUE hidden_identity_hash_new ( void  )
static

Definition at line 1139 of file eval.c.

References hash(), rb_ident_hash_new(), and RBASIC_CLEAR_CLASS.

Referenced by rb_mod_refine(), and rb_using_refinement().

◆ ignored_block()

static void ignored_block ( VALUE  module,
const char *  klass 
)
static

Definition at line 1332 of file eval.c.

References rb_search_class_path(), rb_warn(), and RTEST.

Referenced by mod_using(), and top_using().

◆ Init_eval()

void Init_eval ( void  )

◆ make_exception()

static VALUE make_exception ( int  argc,
const VALUE argv,
int  isstr 
)
static

◆ mod_using()

static VALUE mod_using ( VALUE  self,
VALUE  module 
)
static

◆ NORETURN() [1/2]

NORETURN ( void   rb_raise_jumpVALUE, VALUE)

Referenced by rb_frozen_class_p().

◆ NORETURN() [2/2]

NORETURN ( static void   rb_longjmpint, volatile VALUE, VALUE)

◆ prev_frame_callee()

static ID prev_frame_callee ( void  )
static

Definition at line 1002 of file eval.c.

References frame_called_id(), GET_THREAD, and previous_frame().

Referenced by rb_f_callee_name().

◆ prev_frame_func()

static ID prev_frame_func ( void  )
static

Definition at line 1010 of file eval.c.

References frame_func_id(), GET_THREAD, and previous_frame().

Referenced by mod_using(), and rb_f_method_name().

◆ previous_frame()

static rb_control_frame_t* previous_frame ( rb_thread_t th)
static

◆ rb_block_given_p()

int rb_block_given_p ( void  )

Definition at line 797 of file eval.c.

References rb_thread_struct::cfp, FALSE, GET_THREAD, rb_vm_frame_block_handler(), TRUE, and VM_BLOCK_HANDLER_NONE.

Referenced by argf_bytes(), argf_chars(), argf_codepoints(), argf_lines(), dh_generate(), dir_s_chdir(), dir_s_glob(), dir_s_open(), dsa_generate(), enc_str_scrub(), enum_count(), enum_find_index(), enum_grep(), enum_grep_v(), enum_inject(), enum_max(), enum_min(), enum_minmax(), enum_slice_after(), enum_slice_before(), enum_sum(), enum_uniq(), enum_zip(), enumerator_each(), enumerator_initialize(), env_delete_m(), env_fetch(), env_update_i(), etc_group(), etc_passwd(), fdbm_delete(), fdbm_fetch(), fdbm_fetch_m(), fdbm_s_open(), fgdbm_fetch(), fgdbm_fetch_m(), fgdbm_s_open(), fsdbm_delete(), fsdbm_fetch(), fsdbm_fetch_m(), fsdbm_s_open(), generator_initialize(), gzfile_wrap(), lazy_add_method(), lazy_drop_while(), lazy_flat_map(), lazy_grep(), lazy_grep_v(), lazy_initialize(), lazy_map(), lazy_reject(), lazy_select(), lazy_take_while(), lazy_to_enum(), lazy_uniq(), lazy_zip(), mod_using(), mSyslog_open(), obj_to_enum(), ossl_engine_s_by_id(), ossl_pem_passwd_cb(), ossl_x509store_verify(), p_gid_have_saved_id(), p_gid_switch(), p_uid_have_saved_id(), p_uid_switch(), pack_unpack(), path_each_line(), path_open(), path_s_glob(), path_sub(), pty_getpty(), pty_open(), range_max(), range_min(), rb_ary_any_p(), rb_ary_count(), rb_ary_delete(), rb_ary_fetch(), rb_ary_fill(), rb_ary_index(), rb_ary_initialize(), rb_ary_max(), rb_ary_min(), rb_ary_product(), rb_ary_rindex(), rb_ary_sort_bang(), rb_ary_sum(), rb_ary_uniq(), rb_ary_uniq_bang(), rb_ary_zip(), rb_exec_async_signal_safe(), rb_f_at_exit(), rb_f_open(), rb_fiddle_handle_initialize(), rb_gzreader_bytes(), rb_gzreader_lines(), rb_hash_any_p(), rb_hash_delete_m(), rb_hash_fetch_m(), rb_hash_initialize(), rb_hash_update(), rb_io_bytes(), rb_io_chars(), rb_io_codepoints(), rb_io_lines(), rb_io_s_new(), rb_io_s_open(), rb_io_s_pipe(), rb_io_s_popen(), rb_iterator_p(), rb_method_call(), rb_mod_initialize(), rb_mutex_synchronize_m(), rb_need_block(), rb_nmin_run(), rb_reg_match_m(), rb_scan_args(), rb_str_enumerate_bytes(), rb_str_enumerate_chars(), rb_str_enumerate_codepoints(), rb_str_enumerate_lines(), rb_str_match_m(), rb_str_scan(), rb_str_sub_bang(), rb_struct_s_def(), rb_thread_s_handle_interrupt(), rsa_generate(), sock_initialize(), specific_eval(), strio_bytes(), strio_chars(), strio_codepoints(), strio_lines(), strio_s_new(), strio_s_open(), thread_initialize(), top_using(), tracepoint_disable_m(), tracepoint_enable_m(), tracepoint_new_s(), zstream_detach_buffer(), zstream_expand_buffer(), and zstream_run().

◆ rb_ensure()

VALUE rb_ensure ( VALUE(*)(ANYARGS b_proc,
VALUE  data1,
VALUE(*)(ANYARGS e_proc,
VALUE  data2 
)

Definition at line 923 of file eval.c.

References rb_ensure_entry::data2, rb_ensure_entry::e_proc, rb_thread_struct::ensure_list, rb_ensure_list::entry, rb_thread_struct::errinfo, EXEC_TAG, GET_THREAD, rb_ensure_entry::marker, rb_ensure_list::next, NIL_P, Qnil, RB_TYPE_P, result, T_OBJECT, TH_JUMP_TAG, TH_POP_TAG, and TH_PUSH_TAG.

Referenced by ary_reject_bang(), autoload_reset(), check_autoload_required(), dir_entries(), dir_foreach(), dir_s_chdir(), dir_s_open(), etc_getgrnam(), etc_getpwnam(), fdbm_s_open(), fgdbm_s_open(), fole_each(), fsdbm_s_open(), gzfile_reader_end(), gzfile_wrap(), gzfile_writer_end(), io_getch(), io_s_write(), load_file(), mSyslog_open(), p_gid_have_saved_id(), p_gid_switch(), p_uid_have_saved_id(), p_uid_switch(), parser_compile_error(), pipe_pair_close(), pty_getpty(), pty_open(), queue_do_pop(), rb_ary_select_bang(), rb_autoload_load(), rb_condvar_wait(), rb_deflate_s_deflate(), rb_execarg_spawn(), rb_f_open(), rb_f_select(), rb_fiddle_handle_initialize(), rb_file_identical_p(), rb_gvar_set(), rb_hash_assoc(), rb_hash_foreach(), rb_inflate_s_inflate(), rb_io_s_binread(), rb_io_s_copy_stream(), rb_io_s_foreach(), rb_io_s_open(), rb_io_s_pipe(), rb_io_s_popen(), rb_io_s_read(), rb_io_s_readlines(), rb_io_sysread(), rb_mutex_sleep(), rb_mutex_synchronize(), rb_objspace_each_objects(), rb_str_locktmp_ensure(), rb_szqueue_push(), rb_uninterruptible(), rb_wait_for_single_fd(), rsock_init_inetsock(), rsock_make_hostent(), sock_initialize(), strio_s_open(), thread_join(), trace_object_allocations(), tracepoint_disable_m(), tracepoint_enable_m(), udp_bind(), udp_connect(), and udp_send().

◆ rb_errinfo()

VALUE rb_errinfo ( void  )

◆ rb_exc_fatal()

void rb_exc_fatal ( VALUE  mesg)

Definition at line 629 of file eval.c.

References FALSE, make_exception(), NIL_P, Qnil, rb_longjmp(), and TAG_FATAL.

Referenced by rb_fatal().

◆ rb_exc_raise()

void rb_exc_raise ( VALUE  mesg)

Definition at line 620 of file eval.c.

References FALSE, make_exception(), NIL_P, Qundef, rb_longjmp(), and TAG_RAISE.

Referenced by cannot_be_coerced_into_BigDecimal(), check_funcall_failed(), cleanup_iseq_build(), cont_capture(), domain_error(), econv_convert(), econv_finish(), econv_init(), econv_s_search_convpath(), enc_raise(), eval_string_with_cref(), feature_option(), fiber_store(), fiber_switch(), fptr_finalize_flush(), get_next_values(), get_pat_quoted(), gzfile_raise(), ignore_closed_stream(), iseqw_s_compile_file(), make_readconv(), make_writeconv(), more_char(), ole_raise(), ossl_raise(), parse(), parser_set_encode(), process_sflag(), raise_argument_error(), raise_from_check(), raise_loaderror(), raise_method_missing(), raise_zlib_error(), rb_econv_check_error(), rb_econv_init_by_convpath(), rb_enc_raise(), rb_enc_reg_raise(), rb_error_arity(), rb_exit(), rb_f_abort(), rb_file_expand_path_internal(), rb_io_initialize(), rb_iseq_compile_with_option(), rb_keyword_error(), rb_load_internal(), rb_memerror(), rb_mod_sys_fail(), rb_mod_sys_fail_str(), rb_mod_syserr_fail(), rb_mod_syserr_fail_str(), rb_name_error(), rb_name_error_str(), rb_raise(), rb_readwrite_syserr_fail(), rb_reg_raise_str(), rb_require_safe(), rb_sys_fail(), rb_sys_fail_str(), rb_syserr_fail(), rb_syserr_fail_str(), rb_threadptr_execute_interrupts(), rb_throw_obj(), rb_vm_jump_tag_but_local_jump(), rb_vm_localjump_error(), read_all(), ruby_thread_stack_overflow(), send_internal(), stack_check(), thread_join(), transcode_loop(), unexpected_type(), vm_call_opt_send(), vm_stackoverflow(), and w32error_raise().

◆ rb_extend_object()

void rb_extend_object ( VALUE  obj,
VALUE  module 
)

◆ rb_f_callee_name()

static VALUE rb_f_callee_name ( void  )
static

Definition at line 1699 of file eval.c.

References ID2SYM, prev_frame_callee(), and Qnil.

Referenced by Init_eval().

◆ rb_f_method_name()

static VALUE rb_f_method_name ( void  )
static

Definition at line 1677 of file eval.c.

References ID2SYM, prev_frame_func(), and Qnil.

Referenced by Init_eval().

◆ rb_f_raise()

static VALUE rb_f_raise ( int  argc,
VALUE argv 
)
static

◆ rb_frame_callee()

ID rb_frame_callee ( void  )

◆ rb_frame_last_func()

ID rb_frame_last_func ( void  )

◆ rb_frame_this_func()

ID rb_frame_this_func ( void  )

Definition at line 979 of file eval.c.

References frame_func_id(), and GET_THREAD.

Referenced by argf_forward(), lazy_set_args(), and rb_notimplement().

◆ rb_frozen_class_p()

void rb_frozen_class_p ( VALUE  klass)

◆ rb_interrupt()

void rb_interrupt ( void  )

Definition at line 638 of file eval.c.

References rb_eInterrupt, and rb_raise().

Referenced by rb_signal_exec().

◆ rb_iterator_p()

int rb_iterator_p ( void  )

Definition at line 809 of file eval.c.

References rb_block_given_p().

◆ rb_jump_tag()

void rb_jump_tag ( int  tag)

◆ rb_longjmp()

static void rb_longjmp ( int  tag,
volatile VALUE  mesg,
VALUE  cause 
)
static

◆ rb_make_exception()

VALUE rb_make_exception ( int  argc,
const VALUE argv 
)

Definition at line 763 of file eval.c.

References make_exception(), and TRUE.

Referenced by parser_set_encode(), rb_f_raise(), and rb_threadptr_raise().

◆ rb_mod_append_features()

static VALUE rb_mod_append_features ( VALUE  module,
VALUE  include 
)
static

Definition at line 1043 of file eval.c.

References Check_Type, CLASS_OR_MODULE_P, rb_include_module(), and T_CLASS.

Referenced by Init_eval().

◆ rb_mod_extend_object()

static VALUE rb_mod_extend_object ( VALUE  mod,
VALUE  obj 
)
static

Definition at line 1462 of file eval.c.

References rb_extend_object().

Referenced by Init_eval().

◆ rb_mod_include()

static VALUE rb_mod_include ( int  argc,
VALUE argv,
VALUE  module 
)
static

Definition at line 1061 of file eval.c.

References argc, Check_Type, CONST_ID, rb_check_arity, rb_funcall(), T_MODULE, and UNLIMITED_ARGUMENTS.

Referenced by Init_eval(), and top_include().

◆ rb_mod_nesting()

static VALUE rb_mod_nesting ( void  )
static

◆ rb_mod_prepend()

static VALUE rb_mod_prepend ( int  argc,
VALUE argv,
VALUE  module 
)
static

Definition at line 1110 of file eval.c.

References argc, Check_Type, CONST_ID, rb_check_arity, rb_funcall(), T_MODULE, and UNLIMITED_ARGUMENTS.

Referenced by Init_eval().

◆ rb_mod_prepend_features()

static VALUE rb_mod_prepend_features ( VALUE  module,
VALUE  prepend 
)
static

Definition at line 1092 of file eval.c.

References Check_Type, CLASS_OR_MODULE_P, rb_prepend_module(), and T_CLASS.

Referenced by Init_eval().

◆ rb_mod_refine()

static VALUE rb_mod_refine ( VALUE  module,
VALUE  klass 
)
static

◆ rb_mod_s_constants()

static VALUE rb_mod_s_constants ( int  argc,
VALUE argv,
VALUE  mod 
)
static

◆ rb_mod_s_used_modules()

static VALUE rb_mod_s_used_modules ( void  )
static

◆ rb_need_block()

void rb_need_block ( void  )

Definition at line 817 of file eval.c.

References Qnil, rb_block_given_p(), and rb_vm_localjump_error().

Referenced by generator_initialize(), and yielder_initialize().

◆ rb_obj_call_init()

void rb_obj_call_init ( VALUE  obj,
int  argc,
const VALUE argv 
)

◆ rb_obj_extend()

static VALUE rb_obj_extend ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 1494 of file eval.c.

References argc, Check_Type, CONST_ID, rb_check_arity, rb_funcall(), T_MODULE, and UNLIMITED_ARGUMENTS.

Referenced by Init_eval().

◆ rb_protect()

VALUE rb_protect ( VALUE(*)(VALUE proc,
VALUE  data,
int *  state 
)

◆ rb_raise_jump()

void rb_raise_jump ( VALUE  mesg,
VALUE  cause 
)

◆ rb_refinement_module_get_refined_class()

VALUE rb_refinement_module_get_refined_class ( VALUE  module)

Definition at line 1238 of file eval.c.

References CONST_ID, and rb_attr_get().

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

◆ rb_rescue()

VALUE rb_rescue ( VALUE(*)(ANYARGS b_proc,
VALUE  data1,
VALUE(*)(ANYARGS r_proc,
VALUE  data2 
)

Definition at line 883 of file eval.c.

References rb_eStandardError, and rb_rescue2().

Referenced by do_coerce(), num_step_negative_p(), range_init(), sock_initialize(), and time_mload().

◆ rb_rescue2()

VALUE rb_rescue2 ( VALUE(*)(ANYARGS b_proc,
VALUE  data1,
VALUE(*)(ANYARGS r_proc,
VALUE  data2,
  ... 
)

◆ rb_rubylevel_errinfo()

VALUE rb_rubylevel_errinfo ( void  )

Definition at line 1639 of file eval.c.

References get_errinfo().

◆ rb_set_errinfo()

void rb_set_errinfo ( VALUE  err)

◆ rb_threadptr_setup_exception()

void rb_threadptr_setup_exception ( rb_thread_t th,
VALUE  mesg,
VALUE  cause 
)

Definition at line 598 of file eval.c.

References get_thread_errinfo(), Qundef, and rb_ivar_set().

Referenced by rb_threadptr_raise(), and rb_threadptr_ready().

◆ rb_using_module()

void rb_using_module ( const rb_cref_t cref,
VALUE  module 
)

Definition at line 1230 of file eval.c.

References Check_Type, rb_clear_method_cache_by_class(), rb_cObject, T_MODULE, and using_module_recursive().

Referenced by mod_using(), and top_using().

◆ rb_using_refinement()

void rb_using_refinement ( rb_cref_t cref,
VALUE  klass,
VALUE  module 
)

◆ ruby_exec_internal()

static int ruby_exec_internal ( void *  n)
static

Definition at line 234 of file eval.c.

References EXEC_TAG, GET_THREAD, rb_iseq_eval_main(), SAVE_ROOT_JMPBUF, TH_POP_TAG, and TH_PUSH_TAG.

Referenced by ruby_exec_node().

◆ ruby_finalize_0()

static void ruby_finalize_0 ( void  )
static

Definition at line 115 of file eval.c.

References EXEC_TAG, POP_TAG, PUSH_TAG, rb_clear_trace_func(), rb_exec_end_proc(), and rb_trap_exit().

Referenced by ruby_cleanup(), and ruby_finalize().

◆ ruby_finalize_1()

static void ruby_finalize_1 ( void  )
static

Definition at line 127 of file eval.c.

References GET_THREAD, Qnil, rb_gc_call_finalizer_at_exit(), and ruby_sig_finalize().

Referenced by ruby_cleanup(), and ruby_finalize().

◆ ruby_stop()

void ruby_stop ( int  ex)

Calls ruby_cleanup() and exits the process.

Definition at line 254 of file eval.c.

References ruby_cleanup().

Referenced by rb_exec_async_signal_safe(), rb_exit(), and thread_start_func_2().

◆ setup_exception()

static void setup_exception ( rb_thread_t th,
int  tag,
volatile VALUE  mesg,
VALUE  cause 
)
static

◆ special_exception_p()

static int special_exception_p ( rb_thread_t th,
VALUE  exc 
)
inlinestatic

◆ sysstack_error_p()

static int sysstack_error_p ( VALUE  exc)
inlinestatic

Definition at line 468 of file eval.c.

References rb_eSysStackError, RBASIC_CLASS, SPECIAL_CONST_P, and sysstack_error.

Referenced by make_exception(), and setup_exception().

◆ top_include()

static VALUE top_include ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 1522 of file eval.c.

References GET_THREAD, rb_cObject, rb_mod_include(), rb_warning(), and rb_thread_struct::top_wrapper.

Referenced by Init_eval().

◆ top_using()

static VALUE top_using ( VALUE  self,
VALUE  module 
)
static

◆ used_modules_i()

static int used_modules_i ( VALUE  _,
VALUE  mod,
VALUE  ary 
)
static

◆ using_module_recursive()

static void using_module_recursive ( const rb_cref_t cref,
VALUE  klass 
)
static

◆ using_refinement()

static int using_refinement ( VALUE  klass,
VALUE  module,
VALUE  arg 
)
static

Definition at line 1191 of file eval.c.

References rb_using_refinement(), and ST_CONTINUE.

Referenced by using_module_recursive().

Variable Documentation

◆ id_cause

ID id_cause
static

Definition at line 28 of file eval.c.

◆ rb_eLocalJumpError

VALUE rb_eLocalJumpError

Definition at line 24 of file eval.c.

Referenced by Init_Proc(), and make_localjump_error().

◆ rb_eSysStackError

VALUE rb_eSysStackError

Definition at line 25 of file eval.c.

Referenced by hook_before_rewind(), Init_Proc(), rb_threadptr_error_print(), and sysstack_error_p().

◆ rb_eThreadError

VALUE rb_eThreadError

◆ ruby_static_id_signo

ID ruby_static_id_signo

Definition at line 27 of file eval.c.

◆ ruby_static_id_status

ID ruby_static_id_status

Definition at line 27 of file eval.c.