Ruby
2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)
|
Go to the documentation of this file.
20 #define PROC_NEW_REQUIRES_BLOCK 0
22 #if !defined(__GNUC__) || __GNUC__ < 5 || defined(__MINGW32__)
23 # define NO_CLOBBERED(v) (*(volatile VALUE *)&(v))
25 # define NO_CLOBBERED(v) (v)
28 #define UPDATE_TYPED_REFERENCE(_type, _ref) *(_type*)&_ref = (_type)rb_gc_location((VALUE)_ref)
29 #define UPDATE_REFERENCE(_ref) UPDATE_TYPED_REFERENCE(VALUE, _ref)
47 static int method_arity(
VALUE);
48 static int method_min_max_arity(
VALUE,
int *max);
50 #define attached id__attached__
54 #define IS_METHOD_PROC_IFUNC(ifunc) ((ifunc)->func == bmcall)
57 block_mark(
const struct rb_block *block)
59 switch (vm_block_type(block)) {
81 block_compact(
struct rb_block *block)
83 switch (block->
type) {
105 proc_compact(
void *
ptr)
115 block_mark(&proc->
block);
125 proc_memsize(
const void *
ptr)
164 proc_clone(
VALUE self)
286 binding_free(
void *
ptr)
294 binding_mark(
void *
ptr)
299 block_mark(&bind->
block);
305 binding_compact(
void *
ptr)
314 binding_memsize(
const void *
ptr)
342 binding_dup(
VALUE self)
356 binding_clone(
VALUE self)
358 VALUE bindval = binding_dup(
self);
387 rb_f_binding(
VALUE self)
419 get_local_variable_ptr(
const rb_env_t **envp,
ID lid)
462 check_local_id(
VALUE bindval,
volatile VALUE *pname)
502 bind_local_variables(
VALUE bindval)
508 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
532 ID lid = check_local_id(bindval, &
sym);
541 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
542 if ((
ptr = get_local_variable_ptr(&
env, lid)) ==
NULL) {
580 ID lid = check_local_id(bindval, &
sym);
588 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
589 if ((
ptr = get_local_variable_ptr(&
env, lid)) ==
NULL) {
592 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
620 ID lid = check_local_id(bindval, &
sym);
627 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
638 bind_receiver(
VALUE bindval)
642 return vm_block_self(&bind->
block);
652 bind_location(
VALUE bindval)
657 loc[0] = pathobj_path(bind->
pathobj);
671 proc = &sproc->
basic;
724 return IFUNC_NEW(func, data, arity.packed);
730 struct vm_ifunc *ifunc = rb_vm_ifunc_proc_new(
func, (
void *)val);
741 static const char proc_without_block[] =
"tried to create Proc object without a block";
752 #if !PROC_NEW_REQUIRES_BLOCK
760 const char *
name = kernel ?
"Kernel#proc" :
"Proc.new";
800 if (is_lambda && last_ruby_cfp && vm_cfp_forwarded_bh_p(last_ruby_cfp,
block_handler)) {
933 #if SIZEOF_LONG > SIZEOF_INT
939 (
unsigned long)
argc);
944 #define check_argc(argc) (argc)
980 proc_to_block_handler(
VALUE procval)
1054 proc_arity(
VALUE self)
1071 rb_vm_block_min_max_arity(
const struct rb_block *block,
int *max)
1074 switch (vm_block_type(block)) {
1078 block = vm_proc_block(block->
as.
proc);
1085 return method_min_max_arity((
VALUE)ifunc->
data, max);
1104 rb_proc_min_max_arity(
VALUE self,
int *max)
1108 return rb_vm_block_min_max_arity(&proc->
block, max);
1117 min = rb_vm_block_min_max_arity(&proc->
block, &max);
1157 min = rb_vm_block_min_max_arity(&block, &max);
1159 switch (vm_block_type(&block)) {
1190 return rb_vm_block_min_max_arity(&block, max);
1200 block = &
proc->block;
1201 if (is_proc) *is_proc = !
proc->is_lambda;
1203 switch (vm_block_type(block)) {
1213 if (is_proc) *is_proc = 0;
1234 rb_iseq_check(
iseq);
1244 return iseq_location(
iseq);
1265 int n = (arity < 0) ? ~arity : arity;
1291 rb_proc_parameters(
VALUE self)
1315 enum {SYM_PROC_CACHE_SIZE = 67};
1320 if (!sym_proc_cache) {
1327 index = (
id % SYM_PROC_CACHE_SIZE) << 1;
1350 proc_hash(
VALUE self)
1366 switch (vm_block_type(block)) {
1368 block = vm_proc_block(block->
as.
proc);
1400 proc_to_s(
VALUE self)
1416 proc_to_proc(
VALUE self)
1432 bm_compact(
void *
ptr)
1442 bm_memsize(
const void *
ptr)
1444 return sizeof(
struct METHOD);
1508 if (!respond_to_missing_p(
klass,
obj, vid, scope))
return Qfalse;
1523 return mnew_missing(
klass,
obj,
id, mclass);
1585 return defined_class ? defined_class :
me->
owner;
1630 VALUE klass1, klass2;
1641 klass1 = method_entry_defined_class(m1->
me);
1642 klass2 = method_entry_defined_class(m2->
me);
1664 method_hash(
VALUE method)
1690 struct METHOD *orig, *data;
1694 &method_data_type, data);
1780 #define MSG(s) rb_fstring_lit("undefined method `%1$s' for"s" `%2$s'")
1814 VALUE m = mnew_missing_by_name(
klass,
obj, &vid, scope, mclass);
1818 return mnew(
klass,
obj,
id, mclass, scope);
1863 return obj_method(
obj, vid,
FALSE);
1876 return obj_method(
obj, vid,
TRUE);
2036 int is_method =
FALSE;
2039 scope_visi = CREF_SCOPE_VISI(cref);
2046 #if PROC_NEW_REQUIRES_BLOCK
2077 "wrong argument type %s (expected Proc/Method/UnboundMethod)",
2089 "can't bind singleton method to a different class");
2093 "bind argument must be a subclass of % "PRIsVALUE,
2105 if (vm_proc_iseq(procval) !=
NULL) {
2174 rb_warning(
"main.define_method in the wrapped load is effective only in wrapper module");
2200 method_clone(
VALUE self)
2203 struct METHOD *orig, *data;
2268 method_callable_method_entry(
const struct METHOD *data)
2278 vm_passed_block_handler_set(ec, proc_to_block_handler(passed_procval));
2280 method_callable_method_entry(data), kw_splat);
2286 const struct METHOD *data;
2293 return call_method_data(ec, data,
argc,
argv, passed_procval, kw_splat);
2372 "singleton method called for a different object");
2394 *methclass_out = methclass;
2440 convert_umethod_to_method_components(method,
recv, &methclass, &
klass, &
iclass, &
me);
2470 convert_umethod_to_method_components(method,
recv, &methclass, &
klass, &
iclass, &
me);
2490 if (!def)
return *max = 0;
2491 switch (def->
type) {
2511 return rb_iseq_min_max_arity(rb_iseq_check(def->
body.
iseq.
iseqptr), max);
2538 rb_bug(
"rb_method_entry_min_max_arity: invalid method entry type (%d)", def->
type);
2545 int max, min = rb_method_entry_min_max_arity(
me, &max);
2546 return min == max ? min : -min-1;
2593 method_arity_m(
VALUE method)
2595 int n = method_arity(method);
2600 method_arity(
VALUE method)
2623 method_min_max_arity(
VALUE method,
int *max)
2625 const struct METHOD *data;
2628 return rb_method_entry_min_max_arity(data->
me, max);
2648 const struct METHOD *data;
2651 return data->
me->
def;
2657 switch (def->
type) {
2685 method_cref(
VALUE method)
2690 switch (def->
type) {
2709 return iseq_location(method_def_iseq(def));
2716 return method_def_location(
me->
def);
2753 rb_method_parameters(
VALUE method)
2796 method_inspect(
VALUE method)
2800 const char *sharp =
"#";
2802 VALUE defined_class;
2807 mklass = data->
klass;
2821 defined_class = method_entry_defined_class(data->
me);
2834 else if (data->
recv ==
v) {
2848 if (defined_class != mklass) {
2864 VALUE params = rb_method_parameters(method);
2885 if (kind == req || kind == opt) {
2888 else if (kind == rest || kind == keyrest) {
2891 else if (kind == block) {
2894 else if (kind == nokey) {
2902 else if (kind == opt) {
2905 else if (kind == keyreq) {
2908 else if (kind ==
key) {
2911 else if (kind == rest) {
2920 else if (kind == keyrest) {
2923 else if (kind == block) {
2936 else if (kind == nokey) {
2967 mlambda(
VALUE method)
2995 method_to_proc(
VALUE method)
3009 procval =
rb_iterate(mlambda, 0, bmcall, method);
3024 method_super_method(
VALUE method)
3026 const struct METHOD *data;
3036 if (!super_class)
return Qnil;
3086 new_ep = &new_body[
env->ep -
env->env];
3087 new_env = vm_env_new(new_ep, new_body,
env->env_size,
env->iseq);
3107 proc_binding(
VALUE self)
3117 block = &
proc->block;
3120 switch (vm_block_type(block)) {
3128 block = &
proc->block;
3139 binding_self = method_receiver(method);
3142 env = env_clone(
env, method_cref(method));
3164 rb_iseq_check(
iseq);
3199 VALUE proc, passed, arity;
3208 if (!
NIL_P(blockarg)) {
3209 rb_warn(
"given block not used");
3211 arity = make_curry_proc(proc, passed, arity);
3264 int sarity, max_arity, min_arity = rb_proc_min_max_arity(
self, &max_arity);
3277 return make_curry_proc(
self,
rb_ary_new(), arity);
3315 VALUE proc = method_to_proc(
self);
3316 return proc_curry(
argc,
argv, proc);
3369 return rb_proc_compose_to_left(
self, to_callable(g));
3375 VALUE proc, args, procs[2];
3422 return rb_proc_compose_to_right(
self, to_callable(g));
3426 rb_proc_compose_to_right(
VALUE self,
VALUE g)
3428 VALUE proc, args, procs[2];
3463 rb_method_compose_to_left(
VALUE self,
VALUE g)
3466 self = method_to_proc(
self);
3467 return proc_compose_to_left(
self, g);
3487 rb_method_compose_to_right(
VALUE self,
VALUE g)
3490 self = method_to_proc(
self);
3491 return proc_compose_to_right(
self, g);
3527 proc_ruby2_keywords(
VALUE procval)
3535 rb_warn(
"Skipping set of ruby2_keywords flag for proc (proc created from method)");
3547 rb_warn(
"Skipping set of ruby2_keywords flag for proc (proc accepts keywords or proc does not accept argument splat)");
3551 rb_warn(
"Skipping set of ruby2_keywords flag for proc (proc not defined in Ruby)");
4006 "define_method", top_define_method, -1);
VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self)
#define CLONESETUP(clone, obj)
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
#define TypedData_Make_Struct(klass, type, data_type, sval)
VALUE rb_binding_new(void)
VALUE rb_method_call(int argc, const VALUE *argv, VALUE method)
const rb_callable_method_entry_t * rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class)
@ block_handler_type_iseq
ID rb_check_id(volatile VALUE *)
Returns ID for the given name if it is interned already, or 0.
VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq)
rb_method_entry_t * rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def)
#define RUBY_MARK_NO_PIN_UNLESS_NULL(ptr)
#define RUBY_MARK_LEAVE(msg)
VALUE rb_method_call_with_block_kw(int argc, const VALUE *argv, VALUE method, VALUE passed_procval, int kw_splat)
VALUE rb_exc_new_str(VALUE etype, VALUE str)
@ VM_METHOD_TYPE_REFINED
refinement
#define RB_PASS_CALLED_KEYWORDS
MJIT_FUNC_EXPORTED VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, int kw_splat, VALUE passed_block_handler)
const rb_callable_method_entry_t * rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class)
void rb_gc_register_mark_object(VALUE obj)
@ VM_METHOD_TYPE_OPTIMIZED
Kernel::send, Proc::call, etc.
void rb_warn(const char *fmt,...)
int rb_block_given_p(void)
Determines if the current method is given a block.
void rb_warning(const char *fmt,...)
rb_cref_t * cref
class reference, should be marked
#define IFUNC_NEW(a, b, c)
VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath)
#define VM_ENV_DATA_INDEX_ME_CREF
void rb_print_undef(VALUE klass, ID id, rb_method_visibility_t visi)
struct rb_captured_block captured
rb_block_call_func_t func
const struct rb_block block
void rb_method_name_error(VALUE klass, VALUE str)
void rb_ary_store(VALUE ary, long idx, VALUE val)
rb_method_visibility_t method_visi
@ OPTIMIZED_METHOD_TYPE_BLOCK_CALL
#define RB_TYPE_P(obj, type)
VALUE rb_gc_location(VALUE value)
RUBY_EXTERN VALUE rb_cModule
const VALUE * rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars)
@ block_handler_type_proc
void rb_obj_call_init_kw(VALUE obj, int argc, const VALUE *argv, int kw_splat)
VALUE rb_proc_new(rb_block_call_func_t func, VALUE val)
struct rb_method_definition_struct *const def
#define IS_METHOD_PROC_IFUNC(ifunc)
void rb_define_global_function(const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a global function.
const rb_method_entry_t * rb_method_entry_at(VALUE obj, ID id)
VALUE rb_iseq_path(const rb_iseq_t *iseq)
#define UPDATE_TYPED_REFERENCE(_type, _ref)
int rb_is_local_name(VALUE name)
rb_iseq_location_t location
VALUE rb_inspect(VALUE)
Convenient wrapper of Object::inspect.
const struct rb_iseq_constant_body::@178::rb_iseq_param_keyword * keyword
struct rb_iseq_struct * local_iseq
#define VM_ENV_DATA_INDEX_SPECVAL
enum method_optimized_type optimize_type
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
#define Check_TypedStruct(v, t)
@ VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM
MJIT_STATIC VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler)
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
VALUE rb_unnamed_parameters(int arity)
IFUNC (Internal FUNCtion)
rb_iseq_t * iseqptr
iseq pointer, should be separated from iseqval
rb_iseq_t * rb_iseq_new(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type type)
#define RARRAY_ASET(a, i, v)
struct vm_ifunc_argc argc
int rb_proc_arity(VALUE self)
#define RBASIC_SET_CLASS(obj, cls)
int rb_obj_respond_to(VALUE, ID, int)
rb_method_entry_t * rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex)
@ OPTIMIZED_METHOD_TYPE_SEND
VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE *, VALUE, int)
rb_method_bmethod_t bmethod
void rb_free_tmp_buffer(volatile VALUE *store)
@ VM_METHOD_TYPE_IVAR
attr_reader or attr_accessor
int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2)
void rb_define_alias(VALUE klass, const char *name1, const char *name2)
Defines an alias of a method.
#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)
void rb_undef_method(VALUE klass, const char *name)
VALUE rb_proc_call_with_block_kw(VALUE self, int argc, const VALUE *argv, VALUE passed_procval, int kw_splat)
#define VM_BLOCK_HANDLER_NONE
#define rb_vm_register_special_exception(sp, e, m)
#define UNLIMITED_ARGUMENTS
#define RUBY_TYPED_DEFAULT_FREE
void rb_raise(VALUE exc, const char *fmt,...)
VALUE rb_ivar_get(VALUE, ID)
VALUE rb_method_entry_location(const rb_method_entry_t *me)
int rb_block_min_max_arity(int *max)
MJIT_FUNC_EXPORTED VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val)
VALUE rb_obj_class(VALUE)
Equivalent to Object#class in Ruby.
const rb_cref_t * rb_vm_cref_in_context(VALUE self, VALUE cbase)
union rb_method_definition_struct::@118 body
VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp)
@ OPTIMIZED_METHOD_TYPE_CALL
const rb_method_entry_t *const me
struct rb_iseq_constant_body::@178 param
parameter information
#define VM_ENV_DATA_INDEX_ENV
st_index_t rb_hash_proc(st_index_t hash, VALUE prc)
#define VM_UNREACHABLE(func)
#define rb_check_frozen(obj)
const VALUE defined_class
VALUE rb_str_intern(VALUE)
VALUE rb_proc_call_with_block(VALUE self, int argc, const VALUE *argv, VALUE passed_procval)
VALUE rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp)
void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src)
VALUE rb_iv_get(VALUE, const char *)
#define METHOD_ENTRY_VISI(me)
unsigned int local_table_size
VALUE env[VM_ENV_DATA_SIZE+1]
VALUE rb_ary_tmp_new(long capa)
VALUE rb_vm_top_self(void)
#define RB_OBJ_WRITTEN(a, oldv, b)
@ VM_METHOD_TYPE_CFUNC
C method.
void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep)
VALUE rb_obj_public_method(VALUE obj, VALUE vid)
@ VM_METHOD_TYPE_NOTIMPLEMENTED
MJIT_FUNC_EXPORTED VALUE rb_sym_to_proc(VALUE sym)
VALUE rb_method_call_kw(int argc, const VALUE *argv, VALUE method, int kw_splat)
VALUE rb_ary_push(VALUE ary, VALUE item)
VALUE rb_include_class_new(VALUE module, VALUE super)
st_index_t rb_hash_start(st_index_t)
VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
const struct rb_block block
VALUE rb_block_lambda(void)
#define RBASIC_CLASS(obj)
void rb_print_inaccessible(VALUE klass, ID id, rb_method_visibility_t visi)
struct rb_method_entry_struct * original_me
#define RUBY_FREE_LEAVE(msg)
@ block_handler_type_ifunc
VALUE rb_method_call_with_block(int argc, const VALUE *argv, VALUE method, VALUE passed_procval)
#define RUBY_FREE_ENTER(msg)
const rb_iseq_t * rb_method_iseq(VALUE method)
#define RARRAY_AREF(a, i)
void rb_str_set_len(VALUE, long)
int rb_mod_method_arity(VALUE mod, ID id)
void rb_gc_mark_movable(VALUE ptr)
VALUE rb_proc_call(VALUE self, VALUE args)
VALUE rb_proc_alloc(VALUE klass)
struct rb_iseq_constant_body::@178::@180 flags
VALUE rb_obj_method(VALUE obj, VALUE vid)
#define RB_OBJ_WRITE(a, slot, b)
#define CONST_ID(var, str)
VALUE rb_proc_lambda_p(VALUE procval)
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
#define GetProcPtr(obj, ptr)
const rb_data_type_t ruby_binding_data_type
const rb_method_entry_t * rb_method_entry_clone(const rb_method_entry_t *me)
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)
#define RARRAY_CONST_PTR(a)
int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type)
#define VM_ENV_DATA_INDEX_FLAGS
VALUE rb_str_buf_append(VALUE, VALUE)
VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc)
unsigned int is_from_method
RUBY_EXTERN VALUE rb_cObject
void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi)
int rb_method_entry_arity(const rb_method_entry_t *me)
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
#define TypedData_Get_Struct(obj, type, data_type, sval)
VALUE rb_str_append(VALUE, VALUE)
@ VM_METHOD_TYPE_MISSING
wrapper for method_missing(id)
void rb_bug(const char *fmt,...)
#define RUBY_MARK_ENTER(msg)
rb_block_call_func * rb_block_call_func_t
RUBY_EXTERN VALUE rb_mKernel
#define rb_hash_uint(h, i)
const rb_method_entry_t * rb_method_entry(VALUE klass, ID id)
VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc)
MJIT_FUNC_EXPORTED rb_control_frame_t * rb_vm_get_ruby_level_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
@ VM_METHOD_TYPE_ATTRSET
attr_writer or attr_accessor
void rb_warn_deprecated(const char *fmt, const char *suggest,...)
VALUE rb_sprintf(const char *format,...)
VALUE rb_obj_is_method(VALUE m)
struct vm_ifunc * rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc)
const rb_iseq_t * rb_proc_get_iseq(VALUE self, int *is_proc)
char str[HTML_ESCAPE_MAX_LEN+1]
VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info)
VALUE rb_vm_env_local_variables(const rb_env_t *env)
union rb_captured_block::@186 code
#define RUBY_TYPED_FREE_IMMEDIATELY
#define UPDATE_REFERENCE(_ref)
#define MEMCPY(p1, p2, type, n)
MJIT_FUNC_EXPORTED VALUE rb_ary_tmp_new_from_values(VALUE klass, long n, const VALUE *elts)
int rb_obj_method_arity(VALUE obj, ID id)
@ block_handler_type_symbol
#define GetBindingPtr(obj, ptr)
@ VM_METHOD_TYPE_ISEQ
Ruby method.
const char * rb_obj_classname(VALUE)
VALUE rb_singleton_class(VALUE obj)
Returns the singleton class of obj.
MJIT_FUNC_EXPORTED VALUE rb_iseq_location(const rb_iseq_t *iseq)
int rb_is_local_id(ID id)
VALUE rb_adjust_argv_kw_splat(int *, const VALUE **, int *)
VALUE rb_proc_dup(VALUE self)
const rb_method_entry_t * rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class)
#define rb_name_err_raise_str(mesg, recv, name)
VALUE rb_ary_freeze(VALUE ary)
VALUE rb_mRubyVMFrozenCore
#define MJIT_FUNC_EXPORTED
struct rb_method_definition_struct *const def
VALUE rb_str_catf(VALUE str, const char *format,...)
st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me)
VALUE rb_binding_alloc(VALUE klass)
VALUE rb_iterate(VALUE(*q)(VALUE), VALUE w, type *e, VALUE r)
Old way to implement iterators.
struct rb_iseq_constant_body * body
VALUE rb_ary_dup(VALUE ary)
VALUE rb_proc_call_kw(VALUE self, VALUE args, int kw_splat)
#define UNDEFINED_REFINED_METHOD_P(def)
#define rb_intern_str(string)
const rb_method_definition_t * rb_method_def(VALUE method)
VALUE rb_obj_is_proc(VALUE proc)
VALUE rb_ary_plus(VALUE x, VALUE y)
const rb_method_entry_t * rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class)
#define rb_fstring_lit(str)
const struct vm_ifunc * ifunc
rb_cref_t * rb_vm_cref_new_toplevel(void)
#define rb_name_err_raise(mesg, recv, name)
VALUE rb_block_proc(void)
VALUE rb_obj_singleton_method(VALUE obj, VALUE vid)
void rb_undef_alloc_func(VALUE)
#define UNREACHABLE_RETURN(val)
void rb_define_private_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
#define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp)
VALUE rb_obj_is_kind_of(VALUE, VALUE)
Determines if obj is a kind of c.
unsigned short first_lineno
const rb_env_t * rb_vm_env_prev_env(const rb_env_t *env)
MJIT_FUNC_EXPORTED VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda)
#define RUBY_TYPED_WB_PROTECTED
VALUE rb_proc_location(VALUE self)
#define UNDEFINED_METHOD_ENTRY_P(me)
VALUE rb_class_inherited_p(VALUE mod, VALUE arg)
Determines if mod inherits arg.
VALUE rb_method_location(VALUE method)