19 #define PROC_NEW_REQUIRES_BLOCK 0 21 #if !defined(__GNUC__) || __GNUC__ < 5 || defined(__MINGW32__) 22 # define NO_CLOBBERED(v) (*(volatile VALUE *)&(v)) 24 # define NO_CLOBBERED(v) (v) 43 static int method_arity(
VALUE);
44 static int method_min_max_arity(
VALUE,
int *max);
46 #define attached id__attached__ 50 #define IS_METHOD_PROC_IFUNC(ifunc) ((ifunc)->func == bmcall) 53 block_mark(
const struct rb_block *block)
55 switch (vm_block_type(block)) {
80 block_mark(&proc->
block);
90 proc_memsize(
const void *ptr)
127 int8_t safe_level, int8_t is_from_method, int8_t is_lambda);
145 proc_clone(
VALUE self)
147 VALUE procval = proc_dup(
self);
265 binding_free(
void *ptr)
273 binding_mark(
void *ptr)
278 block_mark(&bind->
block);
284 binding_memsize(
const void *ptr)
311 binding_dup(
VALUE self)
325 binding_clone(
VALUE self)
327 VALUE bindval = binding_dup(
self);
356 rb_f_binding(
VALUE self)
388 get_local_variable_ptr(
const rb_env_t **envp,
ID lid)
398 for (i=0; i<iseq->body->local_table_size; i++) {
399 if (iseq->body->local_table[i] == lid) {
421 check_local_id(
VALUE bindval,
volatile VALUE *pname)
461 bind_local_variables(
VALUE bindval)
467 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
491 ID lid = check_local_id(bindval, &sym);
500 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
501 if ((ptr = get_local_variable_ptr(&env, lid)) ==
NULL) {
539 ID lid = check_local_id(bindval, &
sym);
547 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
548 if ((ptr = get_local_variable_ptr(&env, lid)) ==
NULL) {
551 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
579 ID lid = check_local_id(bindval, &sym);
586 env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->
block));
587 return get_local_variable_ptr(&env, lid) ?
Qtrue :
Qfalse;
597 bind_receiver(
VALUE bindval)
601 return vm_block_self(&bind->
block);
612 proc = &sproc->
basic;
663 arity.argc.min = min_argc;
664 arity.argc.max = max_argc;
665 return IFUNC_NEW(func, data, arity.packed);
671 struct vm_ifunc *ifunc = rb_vm_ifunc_proc_new(func, (
void *)val);
682 static const char proc_without_block[] =
"tried to create Proc object without a block";
693 #if !PROC_NEW_REQUIRES_BLOCK 699 if (VM_ENV_ESCAPED_P(lep)) {
700 procval = VM_ENV_PROCVAL(lep);
701 goto return_existing_proc;
717 switch (vm_block_handler_type(block_handler)) {
719 procval = VM_BH_TO_PROC(block_handler);
721 return_existing_proc:
726 VALUE newprocval = proc_dup(procval);
734 sym_proc_new(klass, VM_BH_TO_SYMBOL(block_handler)) :
851 proc_call(
int argc,
VALUE *argv,
VALUE procval)
857 #if SIZEOF_LONG > SIZEOF_INT 861 if (argc > INT_MAX || argc < 0) {
863 (
unsigned long)argc);
868 #define check_argc(argc) (argc) 886 proc_to_block_handler(
VALUE procval)
898 vret =
rb_vm_invoke_proc(th, proc, argc, argv, proc_to_block_handler(passed_procval));
946 proc_arity(
VALUE self)
953 rb_iseq_min_max_arity(
const rb_iseq_t *iseq,
int *max)
963 rb_vm_block_min_max_arity(
const struct rb_block *block,
int *max)
966 switch (vm_block_type(block)) {
970 block = vm_proc_block(block->
as.
proc);
977 return method_min_max_arity((
VALUE)ifunc->
data, max);
996 rb_proc_min_max_arity(
VALUE self,
int *max)
1000 return rb_vm_block_min_max_arity(&proc->
block, max);
1009 min = rb_vm_block_min_max_arity(&proc->
block, &max);
1016 switch (vm_block_handler_type(block_handler)) {
1019 block->
as.
captured = *VM_BH_TO_ISEQ_BLOCK(block_handler);
1023 block->
as.
captured = *VM_BH_TO_IFUNC_BLOCK(block_handler);
1027 block->
as.
symbol = VM_BH_TO_SYMBOL(block_handler);
1031 block->
as.
proc = VM_BH_TO_PROC(block_handler);
1048 block_setup(&block, block_handler);
1049 min = rb_vm_block_min_max_arity(&block, &max);
1051 switch (vm_block_type(&block)) {
1057 VALUE procval = block_handler;
1081 block_setup(&block, block_handler);
1082 return rb_vm_block_min_max_arity(&block, max);
1092 block = &proc->
block;
1093 if (is_proc) *is_proc = !proc->
is_lambda;
1095 switch (vm_block_type(block)) {
1105 if (is_proc) *is_proc = 0;
1125 if (!iseq)
return Qnil;
1126 rb_iseq_check(iseq);
1148 unnamed_parameters(
int arity)
1151 int n = (arity < 0) ? ~arity : arity;
1177 rb_proc_parameters(
VALUE self)
1201 enum {SYM_PROC_CACHE_SIZE = 67};
1207 if (!sym_proc_cache) {
1214 index = (
id % SYM_PROC_CACHE_SIZE) << 1;
1217 if (aryp[index] == sym) {
1218 return aryp[index + 1];
1223 aryp[index + 1] = proc;
1238 proc_hash(
VALUE self)
1254 switch (vm_block_type(block)) {
1256 block = vm_proc_block(block->
as.
proc);
1289 proc_to_s(
VALUE self)
1306 proc_to_proc(
VALUE self)
1314 struct METHOD *data = ptr;
1322 bm_memsize(
const void *ptr)
1324 return sizeof(
struct METHOD);
1354 if (obj ==
Qundef)
return 0;
1373 def->original_id =
id;
1394 if (respond_to_missing_p(klass, obj,
ID2SYM(
id), scope)) {
1395 return mnew_missing(klass, obj,
id, mclass);
1397 if (!error)
return Qnil;
1403 if (!error)
return Qnil;
1410 id = me->
def->original_id;
1415 id = me->
def->original_id;
1436 return mnew_internal(me, klass, iclass, obj,
id, mclass, scope,
TRUE);
1451 return mnew_from_me(me, klass, iclass, obj,
id, mclass, scope);
1458 return defined_class ? defined_class : me->
owner;
1499 VALUE klass1, klass2;
1510 klass1 = method_entry_defined_class(m1->
me);
1511 klass2 = method_entry_defined_class(m2->
me);
1533 method_hash(
VALUE method)
1556 method_unbind(
VALUE obj)
1559 struct METHOD *orig, *data;
1563 &method_data_type, data);
1580 method_receiver(
VALUE obj)
1596 method_name(
VALUE obj)
1618 method_original_name(
VALUE obj)
1634 method_owner(
VALUE obj)
1644 #define MSG(s) rb_fstring_cstr("undefined method `%1$s' for"s" `%2$s'") 1678 if (respond_to_missing_p(klass, obj, vid, scope)) {
1680 return mnew_missing(klass, obj,
id, mclass);
1684 return mnew(klass, obj,
id, mclass, scope);
1718 return obj_method(obj, vid,
FALSE);
1731 return obj_method(obj, vid,
TRUE);
1767 respond_to_missing_p(klass, obj, vid,
FALSE)) {
1769 return mnew_missing(klass, obj,
id,
rb_cMethod);
1833 rb_mod_public_instance_method(
VALUE mod,
VALUE vid)
1880 rb_mod_define_method(
int argc,
VALUE *argv,
VALUE mod)
1888 int is_method =
FALSE;
1891 scope_visi = CREF_SCOPE_VISI(cref);
1898 #if PROC_NEW_REQUIRES_BLOCK 1905 switch (vm_block_handler_type(block_handler)) {
1907 body = VM_BH_TO_PROC(block_handler);
1929 "wrong argument type %s (expected Proc/Method)",
1941 "can't bind singleton method to a different class");
1945 "bind argument must be a subclass of % "PRIsVALUE,
1956 VALUE procval = proc_dup(body);
1957 if (vm_proc_iseq(procval) !=
NULL) {
1999 rb_obj_define_method(
int argc,
VALUE *argv,
VALUE obj)
2003 return rb_mod_define_method(argc, argv, klass);
2014 top_define_method(
int argc,
VALUE *argv,
VALUE obj)
2021 rb_warning(
"main.define_method in the wrapped load is effective only in wrapper module");
2026 return rb_mod_define_method(argc, argv, klass);
2047 method_clone(
VALUE self)
2050 struct METHOD *orig, *data;
2082 method_callable_method_entry(
const struct METHOD *data)
2090 int argc,
const VALUE *argv,
VALUE passed_procval)
2092 vm_passed_block_handler_set(th, proc_to_block_handler(passed_procval));
2094 method_callable_method_entry(data));
2099 int argc,
const VALUE *argv,
VALUE passed_procval,
2109 NO_CLOBBERED(result) = call_method_data(th, data, argc, argv, passed_procval);
2121 const struct METHOD *data;
2131 if (safe < safe_level_to_run) {
2133 return call_method_data_safe(th, data, argc, argv, passed_procval, safe);
2136 return call_method_data(th, data, argc, argv, passed_procval);
2233 struct METHOD *data, *bound;
2244 "singleton method called for a different object");
2284 if (!def)
return *max = 0;
2285 switch (def->type) {
2287 if (def->body.cfunc.argc < 0) {
2291 return *max =
check_argc(def->body.cfunc.argc);
2300 def = def->body.alias.original_me->def;
2303 return rb_proc_min_max_arity(def->body.proc, max);
2305 return rb_iseq_min_max_arity(rb_iseq_check(def->body.iseq.iseqptr), max);
2313 switch (def->body.optimize_type) {
2329 rb_bug(
"rb_method_entry_min_max_arity: invalid method entry type (%d)", def->type);
2336 int max, min = rb_method_entry_min_max_arity(me, &max);
2337 return min == max ? min : -min-1;
2374 method_arity_m(
VALUE method)
2376 int n = method_arity(method);
2381 method_arity(
VALUE method)
2390 original_method_entry(
VALUE mod,
ID id)
2398 id = def->original_id;
2404 method_min_max_arity(
VALUE method,
int *max)
2406 const struct METHOD *data;
2409 return rb_method_entry_min_max_arity(data->
me, max);
2427 method_def(
VALUE method)
2429 const struct METHOD *data;
2432 return data->
me->
def;
2438 switch (def->type) {
2440 return rb_iseq_check(def->body.iseq.iseqptr);
2444 return method_def_iseq(def->body.alias.original_me->def);
2462 return method_def_iseq(method_def(method));
2466 method_cref(
VALUE method)
2471 switch (def->type) {
2473 return def->body.iseq.cref;
2475 def = def->body.alias.original_me->def;
2486 if (!def->body.attr.location)
2490 return iseq_location(method_def_iseq(def));
2496 if (!me)
return Qnil;
2497 return method_def_location(me->
def);
2524 return method_def_location(method_def(method));
2547 rb_method_parameters(
VALUE method)
2551 return unnamed_parameters(method_arity(method));
2567 method_inspect(
VALUE method)
2571 const char *sharp =
"#";
2573 VALUE defined_class;
2579 mklass = data->
klass;
2582 defined_class = data->
me->
def->body.alias.original_me->owner;
2585 defined_class = method_entry_defined_class(data->
me);
2598 else if (data->
recv == v) {
2612 if (defined_class != mklass) {
2637 mlambda(
VALUE method)
2665 method_to_proc(
VALUE method)
2679 procval =
rb_iterate(mlambda, 0, bmcall, method);
2694 method_super_method(
VALUE method)
2696 const struct METHOD *data;
2705 if (!super_class)
return Qnil;
2707 if (!me)
return Qnil;
2718 localjump_xvalue(
VALUE exc)
2732 localjump_reason(
VALUE exc)
2755 new_ep = &new_body[env->
ep - env->
env];
2756 new_env = vm_env_new(new_ep, new_body, env->
env_size, env->
iseq);
2778 proc_binding(
VALUE self)
2788 block = &proc->
block;
2791 switch (vm_block_type(block)) {
2799 block = &proc->
block;
2808 binding_self = method_receiver(method);
2811 env = env_clone(env, method_cref(method));
2832 rb_iseq_check(iseq);
2867 VALUE proc, passed, arity;
2876 if (!
NIL_P(passed_proc)) {
2877 rb_warn(
"given block not used");
2879 arity = make_curry_proc(proc, passed, arity);
2930 proc_curry(
int argc,
const VALUE *argv,
VALUE self)
2932 int sarity, max_arity, min_arity = rb_proc_min_max_arity(
self, &max_arity);
2946 return make_curry_proc(
self,
rb_ary_new(), arity);
2982 rb_method_curry(
int argc,
const VALUE *argv,
VALUE self)
2984 VALUE proc = method_to_proc(
self);
2985 return proc_curry(argc, argv, proc);
3153 "define_method", top_define_method, -1);
#define UNDEFINED_REFINED_METHOD_P(def)
const rb_iseq_t * rb_method_iseq(VALUE method)
wrapper for method_missing(id)
#define UNDEFINED_METHOD_ENTRY_P(me)
ID rb_check_id(volatile VALUE *)
Returns ID for the given name if it is interned already, or 0.
int rb_block_min_max_arity(int *max)
VALUE rb_proc_alloc(VALUE klass)
VALUE rb_vm_call(rb_thread_t *th, VALUE recv, VALUE id, int argc, const VALUE *argv, const rb_callable_method_entry_t *me)
void rb_warn(const char *fmt,...)
void rb_bug(const char *fmt,...)
VALUE rb_obj_public_method(VALUE obj, VALUE vid)
rb_method_entry_t * rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex)
#define RUBY_TYPED_FREE_IMMEDIATELY
VALUE(* rb_block_call_func_t)(ANYARGS)
void rb_print_undef(VALUE klass, ID id, rb_method_visibility_t visi)
VALUE rb_ary_freeze(VALUE ary)
const rb_method_entry_t * rb_method_entry_clone(const rb_method_entry_t *me)
#define RB_OBJ_WRITTEN(a, oldv, b)
void rb_undef_alloc_func(VALUE)
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
#define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp)
#define GetProcPtr(obj, ptr)
int rb_block_given_p(void)
Determines if the current method is given a block.
VALUE rb_fstring_cstr(const char *str)
void rb_raise(VALUE exc, const char *fmt,...)
#define rb_name_err_raise_str(mesg, recv, name)
int rb_mod_method_arity(VALUE mod, ID id)
struct rb_method_definition_struct rb_method_definition_t
st_index_t rb_hash_end(st_index_t)
#define TypedData_Get_Struct(obj, type, data_type, sval)
struct rb_iseq_constant_body::@135::@136 flags
void rb_define_private_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
VALUE rb_iterate(VALUE(*)(VALUE), VALUE, VALUE(*)(ANYARGS), VALUE)
#define rb_vm_register_special_exception(sp, e, m)
#define TH_JUMP_TAG(th, st)
VALUE rb_vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc, int argc, const VALUE *argv, VALUE passed_block_handler)
VALUE rb_ary_push(VALUE ary, VALUE item)
#define VM_BLOCK_HANDLER_NONE
rb_method_entry_t * rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def)
VALUE rb_ary_tmp_new(long capa)
struct rb_iseq_constant_body * body
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
VALUE rb_proc_lambda_p(VALUE procval)
#define RBASIC_SET_CLASS(obj, cls)
VALUE rb_iv_get(VALUE, const char *)
void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep)
VALUE rb_ivar_get(VALUE, ID)
#define RUBY_MARK_LEAVE(msg)
VALUE rb_obj_method_location(VALUE obj, ID id)
void rb_gc_mark(VALUE ptr)
void rb_method_name_error(VALUE klass, VALUE str)
const rb_callable_method_entry_t * rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class)
void rb_define_global_function(const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a global function.
VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self)
VALUE rb_method_call(int argc, const VALUE *argv, VALUE method)
void rb_obj_call_init(VALUE obj, int argc, const VALUE *argv)
Calls #initialize method of obj with the given arguments.
VALUE rb_inspect(VALUE)
Convenient wrapper of Object::inspect.
VALUE env[VM_ENV_DATA_SIZE+1]
void rb_undef_method(VALUE klass, const char *name)
VALUE rb_str_buf_append(VALUE, VALUE)
int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2)
#define rb_name_err_raise(mesg, recv, name)
#define VM_ENV_DATA_INDEX_ME_CREF
const char * rb_obj_classname(VALUE)
int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type)
VALUE rb_proc_new(VALUE(*func)(ANYARGS), VALUE val)
VALUE rb_singleton_class(VALUE obj)
Returns the singleton class of obj.
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
#define RB_TYPE_P(obj, type)
VALUE rb_obj_is_kind_of(VALUE, VALUE)
call-seq: obj.is_a?(class) -> true or false obj.kind_of?(class) -> true or false
VALUE rb_proc_create(VALUE klass, const struct rb_block *block, int8_t safe_level, int8_t is_from_method, int8_t is_lambda)
rb_cref_t * rb_vm_cref_new_toplevel(void)
#define RUBY_TYPED_WB_PROTECTED
unsigned short first_lineno
VALUE rb_obj_is_method(VALUE m)
#define rb_intern_str(string)
#define RUBY_SAFE_LEVEL_MAX
const rb_env_t * rb_vm_env_prev_env(const rb_env_t *env)
RUBY_EXTERN VALUE rb_cObject
VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath)
VALUE rb_vm_make_proc_lambda(rb_thread_t *th, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda)
#define GetBindingPtr(obj, ptr)
VALUE rb_str_buf_cat2(VALUE, const char *)
RUBY_EXTERN VALUE rb_mKernel
VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq)
void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src)
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
struct vm_ifunc_argc argc
struct rb_method_definition_struct *const def
void rb_print_inaccessible(VALUE klass, ID id, rb_method_visibility_t visi)
void rb_ary_store(VALUE ary, long idx, VALUE val)
#define RUBY_MARK_ENTER(msg)
const rb_data_type_t ruby_binding_data_type
#define CLONESETUP(clone, obj)
VALUE rb_binding_new(void)
union rb_captured_block::@141 code
RUBY_EXTERN VALUE rb_cModule
void rb_gc_register_mark_object(VALUE obj)
#define MEMCPY(p1, p2, type, n)
VALUE rb_block_proc(void)
rb_iseq_t * rb_iseq_new(NODE *node, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type type)
#define VM_ENV_DATA_INDEX_SPECVAL
const rb_method_entry_t *const me
VALUE rb_block_lambda(void)
attr_writer or attr_accessor
VALUE rb_mod_method_location(VALUE mod, ID id)
void rb_define_alias(VALUE klass, const char *name1, const char *name2)
Defines an alias of a method.
const VALUE * rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars)
#define RARRAY_CONST_PTR(a)
VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val)
struct rb_iseq_constant_body::@135 param
parameter information
VALUE rb_sprintf(const char *format,...)
VALUE rb_include_class_new(VALUE module, VALUE super)
const rb_method_entry_t * rb_method_entry(VALUE klass, ID id)
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
const rb_method_entry_t * rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class)
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
VALUE rb_class_inherited_p(VALUE mod, VALUE arg)
call-seq: mod <= other -> true, false, or nil
VALUE rb_vm_make_binding(rb_thread_t *th, const rb_control_frame_t *src_cfp)
st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me)
IFUNC (Internal FUNCtion)
#define METHOD_ENTRY_VISI(me)
int rb_obj_method_arity(VALUE obj, ID id)
const rb_cref_t * rb_vm_cref_in_context(VALUE self, VALUE cbase)
VALUE rb_vm_top_self(void)
const VALUE defined_class
rb_method_visibility_t method_visi
#define VM_ENV_DATA_INDEX_FLAGS
const struct vm_ifunc * ifunc
#define IS_METHOD_PROC_IFUNC(ifunc)
const rb_method_entry_t * rb_method_entry_at(VALUE obj, ID id)
const struct rb_iseq_constant_body::@135::rb_iseq_param_keyword * keyword
Kernel::send, Proc::call, etc.
struct rb_captured_block captured
#define VM_ENV_DATA_INDEX_ENV
void rb_set_safe_level_force(int)
VALUE rb_mRubyVMFrozenCore
#define RB_OBJ_WRITE(a, slot, b)
VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp)
VALUE rb_proc_location(VALUE self)
#define UNLIMITED_ARGUMENTS
const VALUE * rb_vm_ep_local_ep(const VALUE *ep)
st_index_t rb_hash_proc(st_index_t hash, VALUE prc)
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)
#define RARRAY_AREF(a, i)
VALUE rb_method_location(VALUE method)
VALUE rb_ary_plus(VALUE x, VALUE y)
#define RBASIC_CLASS(obj)
#define RUBY_FREE_LEAVE(msg)
const rb_iseq_t * rb_proc_get_iseq(VALUE self, int *is_proc)
#define RUBY_FREE_ENTER(msg)
VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc)
VALUE rb_str_catf(VALUE str, const char *format,...)
VALUE rb_proc_call(VALUE self, VALUE args)
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
const struct rb_block block
VALUE rb_obj_singleton_method(VALUE obj, VALUE vid)
void rb_warning(const char *fmt,...)
rb_method_entry_t * rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi)
VALUE rb_proc_call_with_block(VALUE self, int argc, const VALUE *argv, VALUE passed_procval)
st_index_t rb_hash_uint(st_index_t, st_index_t)
VALUE rb_sym_to_proc(VALUE sym)
int rb_is_local_name(VALUE name)
int rb_method_basic_definition_p(VALUE, ID)
VALUE rb_str_cat_cstr(VALUE, const char *)
#define RUBY_MARK_UNLESS_NULL(ptr)
VALUE rb_method_call_with_block(int argc, const VALUE *argv, VALUE method, VALUE passed_procval)
struct vm_ifunc * rb_vm_ifunc_new(VALUE(*func)(ANYARGS), const void *data, int min_argc, int max_argc)
#define VM_UNREACHABLE(func)
#define TypedData_Make_Struct(klass, type, data_type, sval)
VALUE rb_ary_dup(VALUE ary)
VALUE rb_iseq_path(const rb_iseq_t *iseq)
int rb_is_local_id(ID id)
VALUE rb_obj_method(VALUE obj, VALUE vid)
rb_execution_context_t ec
int rb_proc_arity(VALUE self)
VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info)
#define CONST_ID(var, str)
VALUE rb_vm_env_local_variables(const rb_env_t *env)
#define RUBY_TYPED_DEFAULT_FREE
#define OBJ_INFECT_RAW(x, s)
VALUE rb_method_entry_location(const rb_method_entry_t *me)
const struct rb_block block
attr_reader or attr_accessor
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
VALUE rb_str_append(VALUE, VALUE)
VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc)
#define Check_TypedStruct(v, t)
VALUE rb_binding_alloc(VALUE klass)
st_index_t rb_hash_start(st_index_t)
VALUE rb_obj_is_proc(VALUE proc)
int rb_method_entry_arity(const rb_method_entry_t *me)
rb_iseq_location_t location
#define IFUNC_NEW(a, b, c)