Ruby: vm_eval.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Typedefs | Enumerations | Functions
vm_eval.c File Reference

Go to the source code of this file.

## Data Structures
struct | local_var_list
struct | rescue_funcall_args
struct | iter_method_arg
struct | eval_string_wrap_arg

## Macros
#define | id_mesg idMesg
#define | type_case(t) t: return #t

## Typedefs
typedef enum call_type | call_type

## Enumerations
enum | call_type { CALL_PUBLIC , CALL_FCALL , CALL_VCALL , CALL_PUBLIC_KW , CALL_FCALL_KW , CALL_TYPE_MAX }

## Functions
VALUE | vm_exec (rb_execution_context_t *ec, bool mjit_enable_p)
VALUE | rb_vm_call0 (rb_execution_context_t *ec, VALUE recv, ID id, int argc, const VALUE *argv, const rb_callable_method_entry_t *cme, int kw_splat)
VALUE | rb_vm_call_kw (rb_execution_context_t *ec, VALUE recv, VALUE id, int argc, const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat)
VALUE | rb_call_super_kw (int argc, const VALUE *argv, int kw_splat)
VALUE | rb_call_super (int argc, const VALUE *argv)
VALUE | rb_current_receiver (void)
void | rb_check_stack_overflow (void)
VALUE | rb_check_funcall_kw (VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
VALUE | rb_check_funcall (VALUE recv, ID mid, int argc, const VALUE *argv)
VALUE | rb_check_funcall_default (VALUE recv, ID mid, int argc, const VALUE *argv, VALUE def)
VALUE | rb_check_funcall_with_hook_kw (VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg, int kw_splat)
VALUE | rb_check_funcall_with_hook (VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg)
const char * | rb_type_str (enum ruby_value_type type)
VALUE | rb_make_no_method_exception (VALUE exc, VALUE format, VALUE obj, int argc, const VALUE *argv, int priv)
VALUE | rb_funcallv (VALUE recv, ID mid, int argc, const VALUE *argv)
| Calls a method. More...
VALUE | rb_funcallv_kw (VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
VALUE | rb_apply (VALUE recv, ID mid, VALUE args)
| Calls a method. More...
VALUE | rb_funcall (VALUE recv, ID mid, int n,...)
| Calls a method. More...
VALUE | rb_check_funcall_basic_kw (VALUE recv, ID mid, VALUE ancestor, int argc, const VALUE *argv, int kw_splat)
| Calls a method only if it is the basic method of `ancestor` otherwise returns Qundef;. More...
VALUE | rb_funcallv_public (VALUE recv, ID mid, int argc, const VALUE *argv)
| Calls a method. More...
VALUE | rb_funcallv_public_kw (VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
VALUE | rb_funcall_passing_block (VALUE recv, ID mid, int argc, const VALUE *argv)
VALUE | rb_funcall_passing_block_kw (VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
VALUE | rb_funcall_with_block (VALUE recv, ID mid, int argc, const VALUE *argv, VALUE passed_procval)
VALUE | rb_funcall_with_block_kw (VALUE recv, ID mid, int argc, const VALUE *argv, VALUE passed_procval, int kw_splat)
VALUE | rb_f_send (int argc, VALUE *argv, VALUE recv)
VALUE | rb_yield_1 (VALUE val)
VALUE | rb_yield (VALUE val)
VALUE | rb_yield_values (int n,...)
VALUE | rb_yield_values2 (int argc, const VALUE *argv)
VALUE | rb_yield_values_kw (int argc, const VALUE *argv, int kw_splat)
VALUE | rb_yield_splat (VALUE values)
VALUE | rb_yield_splat_kw (VALUE values, int kw_splat)
VALUE | rb_yield_force_blockarg (VALUE values)
VALUE | rb_yield_block (RB_BLOCK_CALL_FUNC_ARGLIST(val, arg))
VALUE | rb_iterate (VALUE(*it_proc)(VALUE), VALUE data1, rb_block_call_func_t bl_proc, VALUE data2)
VALUE | rb_block_call (VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t bl_proc, VALUE data2)
VALUE | rb_block_call_kw (VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t bl_proc, VALUE data2, int kw_splat)
VALUE | rb_lambda_call (VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t bl_proc, int min_argc, int max_argc, VALUE data2)
VALUE | rb_check_block_call (VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t bl_proc, VALUE data2)
VALUE | rb_each (VALUE obj)
void | rb_parser_warn_location (VALUE, int)
VALUE | rb_f_eval (int argc, const VALUE *argv, VALUE self)
VALUE | ruby_eval_string_from_file (const char *str, const char *filename)
VALUE | rb_eval_string (const char *str)
| Evaluates the given string in an isolated binding. More...
VALUE | rb_eval_string_protect (const char *str, int *pstate)
| Evaluates the given string in an isolated binding. More...
VALUE | rb_eval_string_wrap (const char *str, int *pstate)
| Evaluates the given string under a module binding in an isolated binding. More...
VALUE | rb_eval_cmd_kw (VALUE cmd, VALUE arg, int kw_splat)
VALUE | rb_yield_refine_block (VALUE refinement, VALUE refinements)
VALUE | rb_obj_instance_eval (int argc, const VALUE *argv, VALUE self)
VALUE | rb_obj_instance_exec (int argc, const VALUE *argv, VALUE self)
VALUE | rb_mod_module_eval (int argc, const VALUE *argv, VALUE mod)
VALUE | rb_mod_module_exec (int argc, const VALUE *argv, VALUE mod)
void | rb_throw_obj (VALUE tag, VALUE value)
void | rb_throw (const char *tag, VALUE val)
VALUE | rb_catch (const char *tag, rb_block_call_func_t func, VALUE data)
VALUE | rb_catch_protect (VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr)
VALUE | rb_catch_obj (VALUE t, rb_block_call_func_t func, VALUE data)
VALUE | rb_current_realfilepath (void)
void | Init_vm_eval (void)

## Macro Definition Documentation

## ◆ id_mesg

#define id_mesg idMesg

Definition at line 29 of file vm_eval.c.

## ◆ type_case

#define type_case | ( |  | t | ) | t: return #t

## Typedef Documentation

## ◆ call_type

typedef enum call_type call_type

## Enumeration Type Documentation

## ◆ call_type

enum call_type

Enumerator
CALL_PUBLIC |
CALL_FCALL |
CALL_VCALL |
CALL_PUBLIC_KW |
CALL_FCALL_KW |
CALL_TYPE_MAX |

Definition at line 31 of file vm_eval.c.

## Function Documentation

## ◆ Init_vm_eval()

void Init_vm_eval | ( | void |  | ) |

Definition at line 2579 of file vm_eval.c.

References METHOD_VISI_PUBLIC, OPTIMIZED_METHOD_TYPE_SEND, rb_add_method(), rb_cBasicObject, rb_cModule, rb_define_class(), rb_define_global_function, rb_define_method, rb_define_private_method, rb_eArgError, rb_f_eval(), rb_f_send(), rb_mKernel, and VM_METHOD_TYPE_OPTIMIZED.

Referenced by Init_eval().

## ◆ rb_apply()

VALUE rb_apply | ( | VALUE | recv,
|  | ID | mid,
|  | VALUE | args
| ) |  |

Calls a method.

Parameters

  recv | receiver of the method
  mid | an ID that represents the name of the method
  args | an Array object which contains method arguments

Precondition
  args must refer an Array object.

Definition at line 1044 of file vm_eval.c.

References ALLOCA_N, argc, argv, CALL_FCALL, MEMCPY, OBJ_FREEZE, RARRAY_CONST_PTR, RARRAY_CONST_PTR_TRANSIENT, rb_ary_subseq, rb_funcallv, and RB_GC_GUARD.

## ◆ rb_block_call()

VALUE rb_block_call | ( | VALUE | obj,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | rb_block_call_func_t | bl_proc,
|  | VALUE | data2
| ) |  |

Definition at line 1570 of file vm_eval.c.

References argc, iter_method_arg::argc, argv, iter_method_arg::argv, iter_method_arg::kw_splat, iter_method_arg::mid, iter_method_arg::obj, and rb_iterate().

## ◆ rb_block_call_kw()

VALUE rb_block_call_kw | ( | VALUE | obj,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | rb_block_call_func_t | bl_proc,
|  | VALUE | data2,
|  | int | kw_splat
| ) |  |

Definition at line 1584 of file vm_eval.c.

References argc, iter_method_arg::argc, argv, iter_method_arg::argv, iter_method_arg::kw_splat, iter_method_arg::mid, iter_method_arg::obj, and rb_iterate().

## ◆ rb_call_super()

VALUE rb_call_super | ( | int | argc,
|  | const VALUE * | argv
| ) |  |

Definition at line 298 of file vm_eval.c.

References argc, argv, PASS_PASSED_BLOCK_HANDLER_EC, and RB_NO_KEYWORDS.

## ◆ rb_call_super_kw()

VALUE rb_call_super_kw | ( | int | argc,
|  | const VALUE * | argv,
|  | int | kw_splat
| ) |  |

Definition at line 290 of file vm_eval.c.

References argc, argv, and PASS_PASSED_BLOCK_HANDLER_EC.

## ◆ rb_catch()

VALUE rb_catch | ( | const char * | tag,
|  | rb_block_call_func_t | func,
|  | VALUE | data
| ) |  |

Definition at line 2385 of file vm_eval.c.

References rb_catch_obj(), rb_cObject, rb_obj_alloc(), rb_sym_intern_ascii_cstr, and rb_vm_tag::tag.

## ◆ rb_catch_obj()

VALUE rb_catch_obj | ( | VALUE | t,
|  | rb_block_call_func_t | func,
|  | VALUE | data
| ) |  |

Definition at line 2427 of file vm_eval.c.

References EC_JUMP_TAG, rb_vm_tag::state, and t.

Referenced by rb_catch().

## ◆ rb_catch_protect()

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

Definition at line 2421 of file vm_eval.c.

References t.

## ◆ rb_check_block_call()

VALUE rb_check_block_call | ( | VALUE | obj,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | rb_block_call_func_t | bl_proc,
|  | VALUE | data2
| ) |  |

Definition at line 1625 of file vm_eval.c.

References argc, iter_method_arg::argc, argv, iter_method_arg::argv, iter_method_arg::kw_splat, iter_method_arg::mid, iter_method_arg::obj, and rb_iterate().

## ◆ rb_check_funcall()

VALUE rb_check_funcall | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv
| ) |  |

Definition at line 619 of file vm_eval.c.

References argc, argv, rescue_funcall_args::mid, Qundef, RB_NO_KEYWORDS, and rescue_funcall_args::recv.

Referenced by rb_get_message(), rb_iseq_load_iseq(), rb_range_values(), and rb_time_zone_abbreviation().

## ◆ rb_check_funcall_basic_kw()

VALUE rb_check_funcall_basic_kw | ( | VALUE | recv,
|  | ID | mid,
|  | VALUE | ancestor,
|  | int | argc,
|  | const VALUE * | argv,
|  | int | kw_splat
| ) |  |

Calls a method only if it is the basic method of `ancestor` otherwise returns Qundef;.

Parameters

  recv | receiver of the method
  mid | an ID that represents the name of the method
  ancestor | the Class that defined the basic method
  argc | the number of arguments
  argv | pointer to an array of method arguments
  kw_splat | bool

Definition at line 1111 of file vm_eval.c.

References argc, argv, CLASS_OF, rb_callable_method_entry_struct::defined_class, rb_callcache::klass, METHOD_ENTRY_BASIC, Qundef, rb_callable_method_entry(), rb_vm_call0(), and RBASIC_CLASS.

Referenced by rb_hash().

## ◆ rb_check_funcall_default()

VALUE rb_check_funcall_default | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | VALUE | def
| ) |  |

Definition at line 647 of file vm_eval.c.

References argc, argv, def(), rescue_funcall_args::mid, RB_NO_KEYWORDS, and rescue_funcall_args::recv.

Referenced by rb_get_path_check_to_string(), and rb_time_zone_abbreviation().

## ◆ rb_check_funcall_kw()

VALUE rb_check_funcall_kw | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | int | kw_splat
| ) |  |

Definition at line 613 of file vm_eval.c.

References argc, argv, rescue_funcall_args::kw_splat, rescue_funcall_args::mid, Qundef, and rescue_funcall_args::recv.

## ◆ rb_check_funcall_with_hook()

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 679 of file vm_eval.c.

References argc, argv, rescue_funcall_args::mid, rb_check_funcall_with_hook_kw(), RB_NO_KEYWORDS, and rescue_funcall_args::recv.

## ◆ rb_check_funcall_with_hook_kw()

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

Definition at line 653 of file vm_eval.c.

References argc, argv, CLASS_OF, rescue_funcall_args::ec, FALSE, rescue_funcall_args::kw_splat, rescue_funcall_args::mid, Qundef, rb_vm_call_kw(), rescue_funcall_args::recv, rescue_funcall_args::respond, stack_check, and TRUE.

Referenced by rb_check_funcall_with_hook(), and rb_obj_dig().

## ◆ rb_check_stack_overflow()

void rb_check_stack_overflow | ( | void |  | ) |

Definition at line 331 of file vm_eval.c.

References ruby_current_ec_key, and stack_check.

## ◆ rb_current_realfilepath()

VALUE rb_current_realfilepath | ( | void |  | ) |

Definition at line 2569 of file vm_eval.c.

References rb_execution_context_struct::cfp, rb_control_frame_struct::iseq, Qnil, rb_iseq_realpath(), and RUBY_VM_PREVIOUS_CONTROL_FRAME.

Referenced by rb_f_require_relative().

## ◆ rb_current_receiver()

VALUE rb_current_receiver | ( | void |  | ) |

Definition at line 306 of file vm_eval.c.

References rb_execution_context_struct::cfp, rb_eRuntimeError, rb_raise(), and rb_control_frame_struct::self.

## ◆ rb_each()

VALUE rb_each | ( | VALUE | obj | ) |

Definition at line 1639 of file vm_eval.c.

References CALL_FCALL, and iter_method_arg::obj.

## ◆ rb_eval_cmd_kw()

VALUE rb_eval_cmd_kw | ( | VALUE | cmd,
|  | VALUE | arg,
|  | int | kw_splat
| ) |  |

Definition at line 1909 of file vm_eval.c.

References EC_EXEC_TAG, EC_JUMP_TAG, EC_POP_TAG, EC_PUSH_TAG, NULL, Qnil, RARRAY_CONST_PTR, rb_funcallv_kw(), rb_vm_top_self(), T_STRING, and TAG_NONE.

## ◆ rb_eval_string()

VALUE rb_eval_string | ( | const char * | str | ) |

Evaluates the given string in an isolated binding.

Here "isolated" means the binding does not inherit any other binding. This behaves same as the binding for required libraries.

FILE will be "(eval)", and LINE starts from 1 in the evaluation.

Parameters

  str | Ruby code to evaluate.

Returns
  The evaluated result.

Exceptions

  Exception | Raises an exception on error.

Definition at line 1823 of file vm_eval.c.

References ruby_eval_string_from_file(), and str.

## ◆ rb_eval_string_protect()

VALUE rb_eval_string_protect | ( | const char * | str,
|  | int * | pstate
| ) |  |

Evaluates the given string in an isolated binding.

FILE will be "(eval)", and LINE starts from 1 in the evaluation.

See also
  rb_eval_string

Parameters

  str | Ruby code to evaluate.
  state | Being set to zero if succeeded. Nonzero if an error occurred.

Returns
  The evaluated result if succeeded, an undefined value if otherwise.

Definition at line 1845 of file vm_eval.c.

References rb_protect(), and str.

## ◆ rb_eval_string_wrap()

VALUE rb_eval_string_wrap | ( | const char * | str,
|  | int * | pstate
| ) |  |

Evaluates the given string under a module binding in an isolated binding.

This is same as the binding for loaded libraries on "load('foo', true)".

FILE will be "(eval)", and LINE starts from 1 in the evaluation.

See also
  rb_eval_string

Parameters

  str | Ruby code to evaluate.
  state | Being set to zero if succeeded. Nonzero if an error occurred.

Returns
  The evaluated result if succeeded, an undefined value if otherwise.

Definition at line 1877 of file vm_eval.c.

References rb_thread_struct::ec, EC_JUMP_TAG, eval_string_wrap_arg::klass, rb_extend_object(), rb_module_new(), rb_obj_clone(), rb_protect(), rb_vm_top_self(), str, eval_string_wrap_arg::str, TAG_NONE, rb_thread_struct::top_self, eval_string_wrap_arg::top_self, and rb_thread_struct::top_wrapper.

## ◆ rb_f_eval()

VALUE rb_f_eval | ( | int | argc,
|  | const VALUE * | argv,
|  | VALUE | self
| ) |  |

Definition at line 1778 of file vm_eval.c.

References argc, argv, NIL_P, NULL, NUM2INT, Qundef, rb_scan_args(), SafeStringValue, and StringValue.

Referenced by Init_vm_eval().

## ◆ rb_f_send()

VALUE rb_f_send | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | recv
| ) |  |

Definition at line 1295 of file vm_eval.c.

References argc, argv, and CALL_FCALL.

Referenced by Init_vm_eval().

## ◆ rb_funcall()

VALUE rb_funcall | ( | VALUE | recv,
|  | ID | mid,
|  | int | n,
|  |  | ...
| ) |  |

Calls a method.

Parameters

  recv | receiver of the method
  mid | an ID that represents the name of the method
  n | the number of arguments
  ... | arbitrary number of method arguments

Precondition
  each of arguments after n must be a VALUE.

Definition at line 1077 of file vm_eval.c.

References ALLOCA_N, argv, and rb_funcallv.

Referenced by default_inspect(), DupConfigPtr(), Init_generator(), Init_ossl_digest(), Init_syslog(), Init_win32ole_variant(), InitVM_Enumerator(), ossl_time_split(), ossl_to_der(), rb_callable_receiver(), rb_class_inherited(), rb_cmpint(), rb_eql(), rb_equal(), rb_fiddle_generic_to_value(), rb_hash_default_value(), rb_io_flush_raw(), rb_iseq_add_local_tracepoint_recursively(), rb_num_coerce_bin(), rb_num_coerce_cmp(), rb_num_coerce_relop(), rb_obj_as_string(), rb_obj_dup(), rb_obj_init_dup_clone(), rb_obj_not_equal(), rb_scheduler_block(), rb_scheduler_close(), rb_scheduler_io_read(), rb_scheduler_io_wait(), rb_scheduler_io_write(), rb_scheduler_kernel_sleep(), rb_scheduler_process_wait(), rb_scheduler_unblock(), rb_str_upto_each(), and ruby_num_interval_step_size().

## ◆ rb_funcall_passing_block()

VALUE rb_funcall_passing_block | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv
| ) |  |

Definition at line 1149 of file vm_eval.c.

References argc, argv, PASS_PASSED_BLOCK_HANDLER, and rb_funcallv_public().

## ◆ rb_funcall_passing_block_kw()

VALUE rb_funcall_passing_block_kw | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | int | kw_splat
| ) |  |

Definition at line 1156 of file vm_eval.c.

References argc, argv, CALL_PUBLIC, CALL_PUBLIC_KW, and PASS_PASSED_BLOCK_HANDLER.

## ◆ rb_funcall_with_block()

VALUE rb_funcall_with_block | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | VALUE | passed_procval
| ) |  |

Definition at line 1163 of file vm_eval.c.

References argc, argv, NIL_P, and rb_funcallv_public().

## ◆ rb_funcall_with_block_kw()

VALUE rb_funcall_with_block_kw | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | VALUE | passed_procval,
|  | int | kw_splat
| ) |  |

Definition at line 1173 of file vm_eval.c.

References argc, argv, CALL_PUBLIC, CALL_PUBLIC_KW, and NIL_P.

Referenced by rb_sym_proc_call().

## ◆ rb_funcallv()

VALUE rb_funcallv | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv
| ) |  |

Calls a method.

Parameters

  recv | receiver of the method
  mid | an ID that represents the name of the method
  argc | the number of arguments
  argv | pointer to an array of method arguments

Definition at line 1024 of file vm_eval.c.

References argc, argv, and CALL_FCALL.

## ◆ rb_funcallv_kw()

VALUE rb_funcallv_kw | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | int | kw_splat
| ) |  |

Definition at line 1030 of file vm_eval.c.

References argc, argv, CALL_FCALL, and CALL_FCALL_KW.

Referenced by rb_eval_cmd_kw(), rb_obj_call_init(), and rb_obj_call_init_kw().

## ◆ rb_funcallv_public()

VALUE rb_funcallv_public | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv
| ) |  |

Calls a method.

Same as rb_funcallv but this function can call only public methods.

Parameters

  recv | receiver of the method
  mid | an ID that represents the name of the method
  argc | the number of arguments
  argv | pointer to an array of method arguments

Definition at line 1137 of file vm_eval.c.

References argc, argv, and CALL_PUBLIC.

Referenced by rb_funcall_passing_block(), rb_funcall_with_block(), and rb_random_ulong_limited().

## ◆ rb_funcallv_public_kw()

VALUE rb_funcallv_public_kw | ( | VALUE | recv,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | int | kw_splat
| ) |  |

Definition at line 1143 of file vm_eval.c.

References argc, argv, CALL_PUBLIC, and CALL_PUBLIC_KW.

## ◆ rb_iterate()

VALUE rb_iterate | ( | VALUE(*)(VALUE) | it_proc,
|  | VALUE | data1,
|  | rb_block_call_func_t | bl_proc,
|  | VALUE | data2
| ) |  |

Definition at line 1544 of file vm_eval.c.

Referenced by rb_block_call(), rb_block_call_kw(), and rb_check_block_call().

## ◆ rb_lambda_call()

VALUE rb_lambda_call | ( | VALUE | obj,
|  | ID | mid,
|  | int | argc,
|  | const VALUE * | argv,
|  | rb_block_call_func_t | bl_proc,
|  | int | min_argc,
|  | int | max_argc,
|  | VALUE | data2
| ) |  |

Definition at line 1598 of file vm_eval.c.

References argc, iter_method_arg::argc, argv, iter_method_arg::argv, iter_method_arg::kw_splat, iter_method_arg::mid, iter_method_arg::obj, rb_eArgError, rb_raise(), and rb_vm_ifunc_new().

## ◆ rb_make_no_method_exception()

VALUE rb_make_no_method_exception | ( | VALUE | exc,
|  | VALUE | format,
|  | VALUE | obj,
|  | int | argc,
|  | const VALUE * | argv,
|  | int | priv
| ) |  |

Definition at line 886 of file vm_eval.c.

References argc, argv, name, rb_ary_new4, rb_eNoMethodError, rb_fstring_lit, rb_name_err_new(), and rb_nomethod_err_new().

## ◆ rb_mod_module_eval()

VALUE rb_mod_module_eval | ( | int | argc,
|  | const VALUE * | argv,
|  | VALUE | mod
| ) |  |

Definition at line 2164 of file vm_eval.c.

References argc, argv, mod, and RB_NO_KEYWORDS.

## ◆ rb_mod_module_exec()

VALUE rb_mod_module_exec | ( | int | argc,
|  | const VALUE * | argv,
|  | VALUE | mod
| ) |  |

Definition at line 2198 of file vm_eval.c.

References argc, argv, mod, and RB_NO_KEYWORDS.

## ◆ rb_obj_instance_eval()

VALUE rb_obj_instance_eval | ( | int | argc,
|  | const VALUE * | argv,
|  | VALUE | self
| ) |  |

Definition at line 2092 of file vm_eval.c.

References argc, argv, RB_NO_KEYWORDS, and rb_captured_block::self.

## ◆ rb_obj_instance_exec()

VALUE rb_obj_instance_exec | ( | int | argc,
|  | const VALUE * | argv,
|  | VALUE | self
| ) |  |

Definition at line 2124 of file vm_eval.c.

References argc, argv, RB_NO_KEYWORDS, and rb_captured_block::self.

## ◆ rb_parser_warn_location()

void rb_parser_warn_location | ( | VALUE | ,
|  | int |
| ) |  |

## ◆ rb_throw()

void rb_throw | ( | const char * | tag,
|  | VALUE | val
| ) |  |

Definition at line 2315 of file vm_eval.c.

References rb_sym_intern_ascii_cstr, rb_throw_obj(), and rb_vm_tag::tag.

## ◆ rb_throw_obj()

void rb_throw_obj | ( | VALUE | tag,
|  | VALUE | value
| ) |  |

Definition at line 2290 of file vm_eval.c.

References EC_JUMP_TAG, rb_execution_context_struct::errinfo, NULL, numberof, rb_vm_tag::prev, rb_class_new_instance(), rb_exc_raise(), rb_str_new_cstr, rb_vm_tag::retval, rb_vm_tag::tag, rb_execution_context_struct::tag, and TAG_THROW.

Referenced by rb_throw().

## ◆ rb_type_str()

const char * rb_type_str | ( | enum ruby_value_type | type | ) |

Definition at line 686 of file vm_eval.c.

References NULL, T_ARRAY, T_BIGNUM, T_CLASS, T_COMPLEX, T_DATA, T_FALSE, T_FILE, T_FIXNUM, T_FLOAT, T_HASH, T_ICLASS, T_IMEMO, T_MASK, T_MATCH, T_MODULE, T_MOVED, T_NIL, T_NODE, T_NONE, T_OBJECT, T_RATIONAL, T_REGEXP, T_STRING, T_STRUCT, T_SYMBOL, T_TRUE, T_UNDEF, T_ZOMBIE, and type_case.

Referenced by rb_insn_operand_intern().

## ◆ rb_vm_call0()

VALUE rb_vm_call0 | ( | rb_execution_context_t * | ec,
|  | VALUE | recv,
|  | ID | id,
|  | int | argc,
|  | const VALUE * | argv,
|  | const rb_callable_method_entry_t * | cme,
|  | int | kw_splat
| ) |  |

Definition at line 46 of file vm_eval.c.

References argc, argv, rb_calling_info::block_handler, rb_calling_info::ci, rb_calling_info::kw_splat, NULL, Qfalse, rb_calling_info::recv, VM_CALL_KW_SPLAT, VM_CC_ON_STACK, and VM_CI_ON_STACK.

Referenced by rb_check_funcall_basic_kw(), and rb_vm_call_kw().

## ◆ rb_vm_call_kw()

VALUE rb_vm_call_kw | ( | rb_execution_context_t * | ec,
|  | VALUE | recv,
|  | VALUE | id,
|  | int | argc,
|  | const VALUE * | argv,
|  | const rb_callable_method_entry_t * | me,
|  | int | kw_splat
| ) |  |

Definition at line 260 of file vm_eval.c.

References argc, argv, and rb_vm_call0().

Referenced by rb_check_funcall_with_hook_kw().

## ◆ rb_yield()

VALUE rb_yield | ( | VALUE | val | ) |

Definition at line 1341 of file vm_eval.c.

References NULL, and Qundef.

Referenced by ossl_generate_cb_2(), rb_ary_delete(), rb_ary_each(), and ruby_float_step().

## ◆ rb_yield_1()

VALUE rb_yield_1 | ( | VALUE | val | ) |

Definition at line 1335 of file vm_eval.c.

## ◆ rb_yield_block()

VALUE rb_yield_block | ( | RB_BLOCK_CALL_FUNC_ARGLIST(val, arg) |  | ) |

Definition at line 1419 of file vm_eval.c.

References argc, argv, NIL_P, rb_keyword_given_p(), and VM_BLOCK_HANDLER_NONE.

## ◆ rb_yield_force_blockarg()

VALUE rb_yield_force_blockarg | ( | VALUE | values | ) |

Definition at line 1413 of file vm_eval.c.

## ◆ rb_yield_refine_block()

VALUE rb_yield_refine_block | ( | VALUE | refinement,
|  | VALUE | refinements
| ) |  |

Definition at line 1980 of file vm_eval.c.

References block_handler_type_iseq, rb_execution_context_struct::cfp, rb_captured_block::ep, FALSE, NULL, rb_bug(), RB_NO_KEYWORDS, rb_captured_block::self, TRUE, and VM_ENV_DATA_INDEX_SPECVAL.

## ◆ rb_yield_splat()

VALUE rb_yield_splat | ( | VALUE | values | ) |

Definition at line 1387 of file vm_eval.c.

References NIL_P, RARRAY_CONST_PTR, rb_check_array_type(), rb_eArgError, RB_GC_GUARD, rb_raise(), and rb_callcache::v.

## ◆ rb_yield_splat_kw()

VALUE rb_yield_splat_kw | ( | VALUE | values,
|  | int | kw_splat
| ) |  |

Definition at line 1400 of file vm_eval.c.

References NIL_P, RARRAY_CONST_PTR, rb_check_array_type(), rb_eArgError, RB_GC_GUARD, rb_raise(), and rb_callcache::v.

## ◆ rb_yield_values()

VALUE rb_yield_values | ( | int | n,
|  |  | ...
| ) |  |

Definition at line 1353 of file vm_eval.c.

References ALLOCA_N, and argv.

## ◆ rb_yield_values2()

VALUE rb_yield_values2 | ( | int | argc,
|  | const VALUE * | argv
| ) |  |

Definition at line 1375 of file vm_eval.c.

References argc, and argv.

## ◆ rb_yield_values_kw()

VALUE rb_yield_values_kw | ( | int | argc,
|  | const VALUE * | argv,
|  | int | kw_splat
| ) |  |

Definition at line 1381 of file vm_eval.c.

References argc, and argv.

## ◆ ruby_eval_string_from_file()

VALUE ruby_eval_string_from_file | ( | const char * | str,
|  | const char * | filename
| ) |  |

Note
  This function name is not stable.

Definition at line 1804 of file vm_eval.c.

References NULL, rb_str_new2, rb_str_new_cstr, rb_vm_top_self(), and str.

Referenced by rb_eval_string().

## ◆ vm_exec()

VALUE vm_exec | ( | rb_execution_context_t * | ec,
|  | bool | mjit_enable_p
| ) |  |

Definition at line 2151 of file vm.c.