9 #if OPT_GLOBAL_METHOD_CACHE 10 #ifndef GLOBAL_METHOD_CACHE_SIZE 11 #define GLOBAL_METHOD_CACHE_SIZE 0x800 13 #define LSB_ONLY(x) ((x) & ~((x) - 1)) 14 #define POWER_OF_2_P(x) ((x) == LSB_ONLY(x)) 15 #if !POWER_OF_2_P(GLOBAL_METHOD_CACHE_SIZE) 16 # error GLOBAL_METHOD_CACHE_SIZE must be power of 2 18 #ifndef GLOBAL_METHOD_CACHE_MASK 19 #define GLOBAL_METHOD_CACHE_MASK (GLOBAL_METHOD_CACHE_SIZE-1) 22 #define GLOBAL_METHOD_CACHE_KEY(c,m) ((((c)>>3)^(m))&(global_method_cache.mask)) 23 #define GLOBAL_METHOD_CACHE(c,m) (global_method_cache.entries + GLOBAL_METHOD_CACHE_KEY(c,m)) 25 #define GLOBAL_METHOD_CACHE(c,m) (rb_bug("global method cache disabled improperly"), NULL) 28 static int vm_redefinition_check_flag(
VALUE klass);
31 #define object_id idObject_id 32 #define added idMethod_added 33 #define singleton_added idSingleton_method_added 34 #define removed idMethod_removed 35 #define singleton_removed idSingleton_method_removed 36 #define undefined idMethod_undefined 37 #define singleton_undefined idSingleton_method_undefined 38 #define attached id__attached__ 48 #if OPT_GLOBAL_METHOD_CACHE 53 } global_method_cache = {
54 GLOBAL_METHOD_CACHE_SIZE,
55 GLOBAL_METHOD_CACHE_MASK,
59 #define ruby_running (GET_VM()->running) 63 rb_class_clear_method_cache(
VALUE klass,
VALUE arg)
76 rb_bug(
"RCLASS_CALLABLE_M_TBL(klass) != 0");
92 if (klass && klass !=
Qundef) {
101 rb_class_clear_method_cache(klass,
Qnil);
108 for (; entry !=
NULL; entry = entry->
next) {
140 rb_define_notimplement_method_id(klass, mid, visi);
148 const int alias_count = def->alias_count;
149 const int complemented_count = def->complemented_count;
153 if (alias_count + complemented_count == 0) {
154 if (
METHOD_DEBUG) fprintf(stderr,
"-%p-%s:%d,%d (remove)\n", def,
rb_id2name(def->original_id), alias_count, complemented_count);
158 if (complemented) def->complemented_count--;
159 else if (def->alias_count > 0) def->alias_count--;
162 alias_count, def->alias_count, complemented_count, def->complemented_count);
177 lookup_method_table(
VALUE klass,
ID id)
194 case -2:
return &call_cfunc_m2;
195 case -1:
return &call_cfunc_m1;
196 case 0:
return &call_cfunc_0;
197 case 1:
return &call_cfunc_1;
198 case 2:
return &call_cfunc_2;
199 case 3:
return &call_cfunc_3;
200 case 4:
return &call_cfunc_4;
201 case 5:
return &call_cfunc_5;
202 case 6:
return &call_cfunc_6;
203 case 7:
return &call_cfunc_7;
204 case 8:
return &call_cfunc_8;
205 case 9:
return &call_cfunc_9;
206 case 10:
return &call_cfunc_10;
207 case 11:
return &call_cfunc_11;
208 case 12:
return &call_cfunc_12;
209 case 13:
return &call_cfunc_13;
210 case 14:
return &call_cfunc_14;
211 case 15:
return &call_cfunc_15;
213 rb_bug(
"call_cfunc_func: unsupported length: %d", argc);
222 cfunc->
invoker = call_cfunc_invoker_func(argc);
240 if (0) vm_cref_dump(
"rb_method_definition_create", cref);
246 method_cref = vm_cref_new_toplevel(
GET_THREAD());
265 def->body.attr.id = (
ID)(
VALUE)opts;
345 def->original_id =
mid;
360 def->complemented_count++;
373 filter_defined_class(
VALUE klass)
389 rb_method_entry_t *me = rb_method_entry_alloc(called_id, klass, filter_defined_class(klass), def);
391 if (def !=
NULL) method_definition_reset(me);
399 method_definition_addref(src_me->
def));
400 METHOD_ENTRY_FLAGS_COPY(me, src_me);
408 method_definition_addref_complement(src_me->
def));
409 METHOD_ENTRY_FLAGS_COPY(me, src_me);
421 method_definition_reset(dst);
425 METHOD_ENTRY_FLAGS_COPY(dst, src);
440 rb_vm_check_redefinition_opt_method(me, me->
owner);
446 method_definition_addref(me->
def));
447 METHOD_ENTRY_FLAGS_COPY(refined.orig_me, me);
448 refined.owner =
owner;
461 make_method_entry_refined(refined_class, me);
470 check_override_opt_method(
VALUE klass,
VALUE arg)
475 if (vm_redefinition_check_flag(klass)) {
479 if (newme != me) rb_vm_check_redefinition_opt_method(me, me->
owner);
498 int make_refined = 0;
508 case idInitialize_copy:
509 case idInitialize_clone:
510 case idInitialize_dup:
524 if (old_me) rb_vm_check_redefinition_opt_method(old_me, klass);
536 if (rb_method_definition_eq(old_def, def))
return old_me;
537 rb_vm_check_redefinition_opt_method(old_me, klass);
543 (old_def->alias_count == 0) &&
551 switch (old_def->type) {
553 iseq = def_iseq_ptr(old_def);
564 "previous definition of %"PRIsVALUE" was here",
572 if (def ==
NULL) def = method_definition_create(type, original_id);
573 method_definition_set(me, def, opts);
578 if (klass ==
rb_cObject && mid == idInitialize) {
579 rb_warn(
"redefining Object#initialize may cause infinite loop");
582 if (mid ==
object_id || mid == id__send__) {
589 make_method_entry_refined(klass, me);
599 check_override_opt_method(klass, (
VALUE)mid);
605 #define CALL_METHOD_HOOK(klass, hook, mid) do { \ 606 const VALUE arg = ID2SYM(mid); \ 607 VALUE recv_class = (klass); \ 608 ID hook_id = (hook); \ 609 if (FL_TEST((klass), FL_SINGLETON)) { \ 610 recv_class = rb_ivar_get((klass), attached); \ 611 hook_id = singleton_##hook; \ 613 rb_funcallv(recv_class, hook_id, 1, &arg); \ 617 method_added(
VALUE klass,
ID mid)
630 method_added(klass, mid);
644 iseq_body.iseqptr = iseq;
645 iseq_body.cref = cref;
654 me->
def->type, method_definition_addref(me->
def), 0,
NULL);
655 method_added(klass, mid);
662 return method_entry_set(klass, mid, me, visi, klass);
665 #define UNDEF_ALLOC_FUNC ((rb_alloc_func_t)-1) 688 if (allocator)
return allocator;
694 search_method(
VALUE klass,
ID id,
VALUE *defined_class_ptr)
700 if ((me = lookup_method_table(klass,
id)) != 0)
break;
703 if (defined_class_ptr)
704 *defined_class_ptr = klass;
711 return lookup_method_table(klass,
id);
721 method_entry_get_without_cache(
VALUE klass,
ID id,
722 VALUE *defined_class_ptr)
751 if (defined_class_ptr)
756 #if VM_DEBUG_VERIFY_METHOD_CACHE 760 VALUE actual_defined_class;
762 method_entry_get_without_cache(klass,
id, &actual_defined_class);
764 if (me != actual_me || defined_class != actual_defined_class) {
765 rb_bug(
"method cache verification failed");
771 method_entry_get(
VALUE klass,
ID id,
VALUE *defined_class_ptr)
773 #if OPT_GLOBAL_METHOD_CACHE 779 #if VM_DEBUG_VERIFY_METHOD_CACHE 782 if (defined_class_ptr) *defined_class_ptr = ent->
defined_class;
789 return method_entry_get_without_cache(klass,
id, defined_class_ptr);
795 return method_entry_get(klass,
id,
NULL);
837 return prepare_callable_method_entry(defined_class,
id, me);
843 method_entry_resolve_refinement(
VALUE klass,
ID id,
int with_refinement,
VALUE *defined_class_ptr)
849 if (with_refinement) {
851 VALUE refinements = cref ? CREF_REFINEMENTS(cref) :
Qnil;
852 me = resolve_refined_method(refinements, me, defined_class_ptr);
855 me = resolve_refined_method(
Qnil, me, defined_class_ptr);
868 return method_entry_resolve_refinement(klass,
id,
TRUE, defined_class_ptr);
876 return prepare_callable_method_entry(*dcp,
id, me);
882 return method_entry_resolve_refinement(klass,
id,
FALSE, defined_class_ptr);
890 return prepare_callable_method_entry(*dcp,
id, me);
898 if (me->
def->body.refined.orig_me) {
899 if (defined_class_ptr) *defined_class_ptr = me->
def->body.refined.orig_me->defined_class;
900 return me->
def->body.refined.orig_me;
907 tmp_me = method_entry_get(super, me->
called_id, defined_class_ptr);
908 return resolve_refined_method(refinements, tmp_me, defined_class_ptr);
919 refinement = find_refinement(refinements, me->
owner);
920 if (
NIL_P(refinement)) {
921 return refined_method_original_method_entry(refinements, me, defined_class_ptr);
924 tmp_me = method_entry_get(refinement, me->
called_id, defined_class_ptr);
930 return refined_method_original_method_entry(refinements, me, defined_class_ptr);
942 return resolve_refined_method(refinements, me,
NULL);
960 remove_method(
VALUE klass,
ID mid)
968 if (mid ==
object_id || mid == id__send__ || mid == idInitialize) {
982 rb_vm_check_redefinition_opt_method(me, klass);
995 remove_method(klass, mid);
1019 for (i = 0; i <
argc; i++) {
1026 remove_method(mod,
id);
1037 me = search_method(klass, name, &defined_class);
1039 me = search_method(
rb_cObject, name, &defined_class);
1048 rb_vm_check_redefinition_opt_method(me, klass);
1050 if (klass == defined_class ||
RCLASS_ORIGIN(klass) == defined_class) {
1051 METHOD_ENTRY_VISI_SET(me, visi);
1064 #define BOUND_PRIVATE 0x01 1065 #define BOUND_RESPONDS 0x02 1080 if (ex & BOUND_RESPONDS)
return 2;
1089 rb_scope_visibility_get(
void)
1094 if (!vm_env_cref_by_cref(cfp->
ep)) {
1098 return CREF_SCOPE_VISI(
rb_vm_cref())->method_visi;
1103 rb_scope_module_func_check(
void)
1108 if (!vm_env_cref_by_cref(cfp->
ep)) {
1112 return CREF_SCOPE_VISI(
rb_vm_cref())->module_func;
1127 vm_cref_set_visibility(visi,
FALSE);
1131 rb_scope_module_func_set(
void)
1146 switch (rb_scope_visibility_get()) {
1148 if (rb_scope_module_func_check()) {
1149 rb_warning(
"attribute accessor as module_function");
1180 if (
id ==
object_id ||
id == id__send__ ||
id == idInitialize) {
1184 me = search_method(klass,
id, 0);
1245 rb_mod_undef_method(
int argc,
VALUE *argv,
VALUE mod)
1248 for (i = 0; i <
argc; i++) {
1346 rb_mod_public_method_defined(
VALUE mod,
VALUE mid)
1380 rb_mod_private_method_defined(
VALUE mod,
VALUE mid)
1414 rb_mod_protected_method_defined(
VALUE mod,
VALUE mid)
1422 return rb_method_definition_eq(m1->
def, m2->
def);
1430 switch (def->type) {
1432 if (def->body.refined.orig_me) {
1433 def = def->body.refined.orig_me->def;
1438 def = def->body.alias.original_me->def;
1450 d1 = original_method_definition(d1);
1451 d2 = original_method_definition(d2);
1453 if (d1 == d2)
return 1;
1454 if (!d1 || !d2)
return 0;
1455 if (d1->type != d2->type)
return 0;
1459 return d1->body.iseq.iseqptr == d2->body.iseq.iseqptr;
1462 d1->body.cfunc.func == d2->body.cfunc.func &&
1463 d1->body.cfunc.argc == d2->body.cfunc.argc;
1466 return d1->body.attr.id == d2->body.attr.id;
1470 return d1->original_id == d2->original_id;
1476 return d1->body.optimize_type == d2->body.optimize_type;
1481 rb_bug(
"rb_method_definition_eq: unsupported type: %d\n", d1->type);
1488 def = original_method_definition(def);
1490 if (!def)
return hash;
1492 switch (def->type) {
1515 rb_bug(
"rb_hash_method_definition: unsupported method type (%d)\n", def->type);
1521 return rb_hash_method_definition(hash, me->
def);
1527 const VALUE target_klass = klass;
1539 orig_me = search_method(klass, original_name, &defined_class);
1547 (orig_me = search_method(
rb_cObject, original_name, &defined_class),
1555 original_name = orig_me->
def->original_id;
1563 rb_method_entry_make(target_klass, alias_name, target_klass, visi,
1566 method_added(target_klass, alias_name);
1571 alias_me = method_entry_set(target_klass, alias_name, orig_me, visi, orig_me->
owner);
1622 for (i = 0; i <
argc; i++) {
1628 rb_export_method(
self,
id, visi);
1639 set_method_visibility(module, argc, argv, visi);
1657 rb_mod_public(
int argc,
VALUE *argv,
VALUE module)
1684 rb_mod_protected(
int argc,
VALUE *argv,
VALUE module)
1713 rb_mod_private(
int argc,
VALUE *argv,
VALUE module)
1729 rb_mod_public_method(
int argc,
VALUE *argv,
VALUE obj)
1755 rb_mod_private_method(
int argc,
VALUE *argv,
VALUE obj)
1775 top_public(
int argc,
VALUE *argv)
1777 return rb_mod_public(argc, argv,
rb_cObject);
1793 top_private(
int argc,
VALUE *argv)
1795 return rb_mod_private(argc, argv,
rb_cObject);
1837 rb_mod_modfunc(
int argc,
VALUE *argv,
VALUE module)
1848 rb_scope_module_func_set();
1854 for (i = 0; i <
argc; i++) {
1859 me = search_method(m,
id, 0);
1882 if (!klass)
return TRUE;
1892 prepare_callable_method_entry(defined_class,
id, me);
1893 VALUE passed_block_handler = vm_passed_block_handler(th);
1894 VALUE result = vm_call0(th, obj,
id, argc, argv, cme);
1895 vm_passed_block_handler_set(th, passed_block_handler);
1906 method_entry_get(klass, rtmid, &defined_class);
1911 return call_method_entry(th, defined_class, obj, rtmid, me, 2, args);
1924 ret = basic_obj_respond_to_missing(th, klass, obj,
ID2SYM(
id),
1938 method_entry_get(klass, resid, &defined_class);
1955 "respond_to? must accept 1 or 2 arguments (requires %d)",
1964 " the deprecated method signature, which takes one parameter",
1968 if (!
NIL_P(location)) {
1973 "respond_to? is defined here");
1978 result = call_method_entry(th, defined_class, obj, resid, me, argc, args);
1979 return RTEST(result);
1988 int ret = vm_respond_to(th, klass, obj,
id, priv);
1989 if (ret == -1) ret = basic_obj_respond_to(th, obj,
id, !priv);
2021 obj_respond_to(
int argc,
VALUE *argv,
VALUE obj)
2029 VALUE ret = basic_obj_respond_to_missing(th,
CLASS_OF(obj), obj,
2034 if (basic_obj_respond_to(th, obj,
id, !
RTEST(priv)))
2063 #if OPT_GLOBAL_METHOD_CACHE 2064 char *ptr =
getenv(
"RUBY_GLOBAL_METHOD_CACHE_SIZE");
2067 if (ptr !=
NULL && (val = atoi(ptr)) > 0) {
2068 if ((val & (val - 1)) == 0) {
2069 global_method_cache.size =
val;
2070 global_method_cache.mask = val - 1;
2073 fprintf(stderr,
"RUBY_GLOBAL_METHOD_CACHE_SIZE was set to %d but ignored because the value is not a power of 2.\n", val);
2078 if (global_method_cache.entries ==
NULL) {
2079 fprintf(stderr,
"[FATAL] failed to allocate memory\n");
2089 #define rb_intern(str) rb_intern_const(str) 2110 "public", top_public, -1);
2112 "private", top_private, -1);
2115 #define REPLICATE_METHOD(klass, id) do { \ 2116 const rb_method_entry_t *me = rb_method_entry((klass), (id)); \ 2117 rb_method_entry_set((klass), (id), me, METHOD_ENTRY_VISI(me)); \ #define UNDEFINED_REFINED_METHOD_P(def)
int rb_method_boundp(VALUE klass, ID id, int ex)
rb_control_frame_t * rb_vm_get_ruby_level_next_cfp(const rb_thread_t *th, const rb_control_frame_t *cfp)
wrapper for method_missing(id)
void rb_add_method_cfunc(VALUE klass, ID mid, VALUE(*func)(ANYARGS), int argc, rb_method_visibility_t visi)
#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.
void rb_warn(const char *fmt,...)
void rb_bug(const char *fmt,...)
int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp)
void rb_print_undef(VALUE klass, ID id, rb_method_visibility_t visi)
VALUE rb_ary_freeze(VALUE ary)
int rb_vm_get_sourceline(const rb_control_frame_t *cfp)
#define RB_OBJ_WRITTEN(a, oldv, b)
void rb_remove_method(VALUE klass, const char *name)
st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me)
rb_subclass_entry_t * next
const rb_iseq_t * rb_proc_get_iseq(VALUE proc, int *is_proc)
void rb_raise(VALUE exc, const char *fmt,...)
rb_cref_t *const cref
class reference, should be marked
struct rb_method_definition_struct rb_method_definition_t
void rb_add_refined_method_entry(VALUE refined_class, ID mid)
VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
rb_alloc_func_t rb_get_alloc_func(VALUE klass)
void rb_define_private_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
rb_method_entry_t * rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_visibility_t visi)
const rb_method_entry_t * rb_method_entry_clone(const rb_method_entry_t *src_me)
if(len<=MAX_WORD_LENGTH &&len >=MIN_WORD_LENGTH)
const rb_callable_method_entry_t * rb_callable_method_entry(VALUE klass, ID id)
struct rb_iseq_constant_body * body
void rb_print_undef_str(VALUE klass, VALUE name)
const rb_callable_method_entry_t * rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class_ptr)
#define METHOD_ENTRY_COMPLEMENTED(me)
VALUE rb_refinement_module_get_refined_class(VALUE module)
void rb_method_name_error(VALUE klass, VALUE str)
#define GET_GLOBAL_METHOD_STATE()
#define RUBY_DTRACE_HOOK(name, arg)
void rb_obj_info_dump(VALUE obj)
int rb_method_basic_definition_p(VALUE klass, ID id)
void rb_id_table_clear(struct rb_id_table *tbl)
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj)
#define rb_name_err_raise(mesg, recv, name)
#define UNALIGNED_MEMBER_PTR(ptr, mem)
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t
VALUE rb_singleton_class(VALUE obj)
Returns the singleton class of obj.
void rb_attr(VALUE klass, ID id, int read, int write, int ex)
int rb_obj_respond_to(VALUE obj, ID id, int priv)
#define RB_TYPE_P(obj, type)
const rb_scope_visibility_t scope_visi
const rb_method_entry_t * rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class_ptr)
const rb_method_entry_t * rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me)
#define rb_intern_str(string)
VALUE rb_equal(VALUE, VALUE)
call-seq: obj === other -> true or false
#define METHOD_ENTRY_COMPLEMENTED_SET(me)
RUBY_EXTERN VALUE rb_cObject
int rb_respond_to(VALUE obj, ID id)
RUBY_EXTERN VALUE rb_cBasicObject
const rb_callable_method_entry_t * rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me)
rb_method_entry_t * rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def)
RUBY_EXTERN VALUE rb_mKernel
void rb_remove_method_id(VALUE klass, ID mid)
void rb_frozen_class_p(VALUE klass)
Asserts that klass is not a frozen class.
void rb_undef_alloc_func(VALUE klass)
struct rb_method_definition_struct *const def
struct rb_id_table * rb_id_table_create(size_t capa)
void rb_compile_warn(const char *file, int line, const char *fmt,...)
int rb_method_entry_arity(const rb_method_entry_t *me)
void rb_notimplement(void)
const rb_method_entry_t * rb_method_entry(VALUE klass, ID id)
const VALUE defined_class
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)
RUBY_EXTERN VALUE rb_cModule
void rb_clear_constant_cache(void)
#define OPT_GLOBAL_METHOD_CACHE
const rb_method_entry_t * rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class_ptr)
VALUE rb_method_entry_location(const rb_method_entry_t *me)
void rb_alias(VALUE klass, ID alias_name, ID original_name)
attr_writer or attr_accessor
int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val)
VALUE(* invoker)(VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
void rb_class_foreach_subclass(VALUE klass, void(*f)(VALUE, VALUE), VALUE arg)
VALUE rb_sprintf(const char *format,...)
unsigned long rb_serial_t
VALUE rb_to_symbol(VALUE name)
int rb_id_table_delete(struct rb_id_table *tbl, ID id)
void rb_compile_warning(const char *file, int line, const char *fmt,...)
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
#define INC_GLOBAL_METHOD_STATE()
#define INC_GLOBAL_CONSTANT_STATE()
#define METHOD_ENTRY_VISI(me)
VALUE rb_vm_top_self(void)
const VALUE defined_class
const char * rb_class2name(VALUE)
rb_method_visibility_t method_visi
void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi)
const char * rb_id2name(ID)
#define CALL_METHOD_HOOK(klass, hook, mid)
Kernel::send, Proc::call, etc.
#define RB_OBJ_WRITE(a, slot, b)
#define RARRAY_AREF(a, i)
ID rb_frame_callee(void)
The name of the current method.
#define METHOD_ENTRY_BASIC(me)
const rb_method_entry_t * rb_method_entry_at(VALUE klass, ID id)
int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2)
#define RCLASS_CALLABLE_M_TBL(c)
void rb_warning(const char *fmt,...)
st_index_t rb_hash_uint(st_index_t, st_index_t)
void rb_define_alloc_func(VALUE klass, VALUE(*func)(VALUE))
#define GLOBAL_METHOD_CACHE(c, m)
const char * rb_obj_info(VALUE obj)
VALUE rb_iseq_path(const rb_iseq_t *iseq)
const rb_callable_method_entry_t * rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class_ptr)
void Init_eval_method(void)
#define RB_DEBUG_COUNTER_INC(type)
rb_execution_context_t ec
#define REPLICATE_METHOD(klass, id)
void rb_undef(VALUE klass, ID id)
rb_serial_t rb_next_class_serial(void)
rb_method_entry_t * rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *me, rb_method_visibility_t visi)
#define rb_check_frozen(obj)
const rb_iseq_t *const iseqptr
iseq pointer, should be separated from iseqval
st_index_t rb_hash_proc(st_index_t hash, VALUE proc)
void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src)
const struct rb_method_entry_struct *const orig_me
VALUE(* rb_alloc_func_t)(VALUE)
void rb_free_method_entry(const rb_method_entry_t *me)
void rb_scope_visibility_set(rb_method_visibility_t visi)
attr_reader or attr_accessor
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
rb_cref_t * rb_vm_cref(void)
void rb_clear_method_cache_by_class(VALUE klass)
rb_iseq_location_t location