Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
|
#include "id_table.h"
Go to the source code of this file.
Data Structures | |
struct | cache_entry |
Macros | |
#define | METHOD_DEBUG 0 |
#define | GLOBAL_METHOD_CACHE(c, m) (rb_bug("global method cache disabled improperly"), NULL) |
#define | object_id idObject_id |
#define | added idMethod_added |
#define | singleton_added idSingleton_method_added |
#define | removed idMethod_removed |
#define | singleton_removed idSingleton_method_removed |
#define | undefined idMethod_undefined |
#define | singleton_undefined idSingleton_method_undefined |
#define | attached id__attached__ |
#define | ruby_running (GET_VM()->running) |
#define | CALL_METHOD_HOOK(klass, hook, mid) |
#define | UNDEF_ALLOC_FUNC ((rb_alloc_func_t)-1) |
#define | BOUND_PRIVATE 0x01 |
#define | BOUND_RESPONDS 0x02 |
#define | rb_intern(str) rb_intern_const(str) |
#define | REPLICATE_METHOD(klass, id) |
#define added idMethod_added |
Definition at line 32 of file vm_method.c.
#define attached id__attached__ |
Definition at line 38 of file vm_method.c.
#define BOUND_PRIVATE 0x01 |
Definition at line 1115 of file vm_method.c.
#define BOUND_RESPONDS 0x02 |
Definition at line 1116 of file vm_method.c.
#define CALL_METHOD_HOOK | ( | klass, | |
hook, | |||
mid | |||
) |
Definition at line 655 of file vm_method.c.
#define GLOBAL_METHOD_CACHE | ( | c, | |
m | |||
) | (rb_bug("global method cache disabled improperly"), NULL) |
Definition at line 25 of file vm_method.c.
#define METHOD_DEBUG 0 |
Definition at line 7 of file vm_method.c.
#define object_id idObject_id |
Definition at line 31 of file vm_method.c.
#define rb_intern | ( | str | ) | rb_intern_const(str) |
#define removed idMethod_removed |
Definition at line 34 of file vm_method.c.
#define ruby_running (GET_VM()->running) |
Definition at line 59 of file vm_method.c.
#define singleton_added idSingleton_method_added |
Definition at line 33 of file vm_method.c.
#define singleton_removed idSingleton_method_removed |
Definition at line 35 of file vm_method.c.
#define singleton_undefined idSingleton_method_undefined |
Definition at line 37 of file vm_method.c.
#define UNDEF_ALLOC_FUNC ((rb_alloc_func_t)-1) |
Definition at line 719 of file vm_method.c.
#define undefined idMethod_undefined |
Definition at line 36 of file vm_method.c.
Definition at line 2298 of file vm_method.c.
References rb_define_method(), and rb_mKernel.
Definition at line 2274 of file vm_method.c.
References atoi(), calloc(), exit(), EXIT_FAILURE, fprintf(), getenv, NULL, OPT_GLOBAL_METHOD_CACHE, ptr, and stderr.
void rb_add_method | ( | VALUE | klass, |
ID | mid, | ||
rb_method_type_t | type, | ||
void * | opts, | ||
rb_method_visibility_t | visi | ||
) |
Definition at line 675 of file vm_method.c.
Referenced by rb_add_method_cfunc(), rb_add_method_iseq(), and rb_undef_method().
void rb_add_method_cfunc | ( | VALUE | klass, |
ID | mid, | ||
VALUE(*)(ANYARGS) | func, | ||
int | argc, | ||
rb_method_visibility_t | visi | ||
) |
Definition at line 134 of file vm_method.c.
References rb_method_cfunc_struct::argc, argc, rb_method_cfunc_struct::func, klass, rb_add_method(), rb_eArgError, rb_f_notimplement(), rb_raise(), and VM_METHOD_TYPE_CFUNC.
MJIT_FUNC_EXPORTED void rb_add_method_iseq | ( | VALUE | klass, |
ID | mid, | ||
const rb_iseq_t * | iseq, | ||
rb_cref_t * | cref, | ||
rb_method_visibility_t | visi | ||
) |
Definition at line 685 of file vm_method.c.
References iseq, klass, rb_add_method(), and VM_METHOD_TYPE_ISEQ.
Definition at line 491 of file vm_method.c.
References me.
Definition at line 1598 of file vm_method.c.
References klass, METHOD_VISI_UNDEF, NIL_P, rb_class_modify_check(), rb_eTypeError, and rb_raise().
Referenced by rb_define_alias().
Definition at line 1180 of file vm_method.c.
References GET_EC, klass, METHOD_VISI_PUBLIC, and rb_vm_cref_in_context().
Referenced by rb_define_attr().
MJIT_FUNC_EXPORTED const rb_callable_method_entry_t * rb_callable_method_entry | ( | VALUE | klass, |
ID | id | ||
) |
Definition at line 895 of file vm_method.c.
References me.
Referenced by rb_vm_search_method_slowpath().
MJIT_FUNC_EXPORTED const rb_callable_method_entry_t * rb_callable_method_entry_with_refinements | ( | VALUE | klass, |
ID | id, | ||
VALUE * | defined_class_ptr | ||
) |
Definition at line 934 of file vm_method.c.
References me.
MJIT_FUNC_EXPORTED const rb_callable_method_entry_t * rb_callable_method_entry_without_refinements | ( | VALUE | klass, |
ID | id, | ||
VALUE * | defined_class_ptr | ||
) |
Definition at line 948 of file vm_method.c.
References me.
Definition at line 87 of file vm_method.c.
References INC_GLOBAL_CONSTANT_STATE.
Definition at line 93 of file vm_method.c.
References INC_GLOBAL_METHOD_STATE, klass, PREV_CLASS_SERIAL, Qundef, rb_cBasicObject, rb_class2name(), rb_cObject, rb_mKernel, and RUBY_DTRACE_HOOK.
Definition at line 722 of file vm_method.c.
References Check_Type, klass, RCLASS_EXT, and T_CLASS.
Referenced by rb_undef_alloc_func().
Definition at line 120 of file vm_method.c.
References Qnil, rb_notimplement(), and UNREACHABLE_RETURN.
Referenced by rb_add_method_cfunc().
void rb_free_method_entry | ( | const rb_method_entry_t * | me | ) |
Definition at line 174 of file vm_method.c.
rb_alloc_func_t rb_get_alloc_func | ( | VALUE | klass | ) |
Definition at line 735 of file vm_method.c.
References Check_Type, klass, RCLASS_EXT, RCLASS_SUPER, T_CLASS, and UNDEF_ALLOC_FUNC.
st_index_t rb_hash_method_entry | ( | st_index_t | hash, |
const rb_method_entry_t * | me | ||
) |
Definition at line 1592 of file vm_method.c.
Definition at line 2089 of file vm_method.c.
References FALSE, klass, me, METHOD_ENTRY_BASIC, rb_method_entry(), and TRUE.
bool rb_method_basic_definition_p_with_cc | ( | struct rb_call_data * | cd, |
VALUE | klass, | ||
ID | mid | ||
) |
Definition at line 2074 of file vm_method.c.
References rb_call_data::ci, and rb_call_info::mid.
Definition at line 1119 of file vm_method.c.
References BOUND_RESPONDS, and me.
MJIT_FUNC_EXPORTED rb_method_definition_t * rb_method_definition_create | ( | rb_method_type_t | type, |
ID | mid | ||
) |
Definition at line 348 of file vm_method.c.
References rb_method_definition_struct::method_serial, rb_method_definition_struct::original_id, rb_method_definition_struct::type, and ZALLOC.
int rb_method_definition_eq | ( | const rb_method_definition_t * | d1, |
const rb_method_definition_t * | d2 | ||
) |
MJIT_FUNC_EXPORTED void rb_method_definition_set | ( | const rb_method_entry_t * | me, |
rb_method_definition_t * | def, | ||
void * | opts | ||
) |
Definition at line 232 of file vm_method.c.
References rb_callable_method_entry_struct::def, if(), me, NULL, rb_method_definition_struct::type, and VM_METHOD_TYPE_ISEQ.
MJIT_FUNC_EXPORTED const rb_method_entry_t * rb_method_entry | ( | VALUE | klass, |
ID | id | ||
) |
Definition at line 854 of file vm_method.c.
Referenced by rb_method_basic_definition_p().
const rb_method_entry_t * rb_method_entry_at | ( | VALUE | klass, |
ID | id | ||
) |
Definition at line 767 of file vm_method.c.
const rb_method_entry_t * rb_method_entry_clone | ( | const rb_method_entry_t * | src_me | ) |
Definition at line 406 of file vm_method.c.
References me.
Referenced by rb_method_entry_complement_defined_class().
MJIT_FUNC_EXPORTED 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 | ||
) |
Definition at line 415 of file vm_method.c.
References rb_method_definition_struct::body, rb_method_entry_struct::def, rb_method_entry_struct::defined_class, me, NULL, rb_method_refined_struct::orig_me, rb_method_entry_struct::owner, rb_method_entry_clone(), RB_OBJ_WRITE, rb_method_definition_struct::refined, rb_method_definition_struct::type, and VM_METHOD_TYPE_REFINED.
void rb_method_entry_copy | ( | rb_method_entry_t * | dst, |
const rb_method_entry_t * | src | ||
) |
Definition at line 451 of file vm_method.c.
References rb_method_entry_struct::def.
rb_method_entry_t * rb_method_entry_create | ( | ID | called_id, |
VALUE | klass, | ||
rb_method_visibility_t | visi, | ||
const rb_method_definition_t * | def | ||
) |
Definition at line 397 of file vm_method.c.
References me.
int rb_method_entry_eq | ( | const rb_method_entry_t * | m1, |
const rb_method_entry_t * | m2 | ||
) |
Definition at line 1493 of file vm_method.c.
References rb_method_entry_struct::def, and rb_method_definition_eq().
rb_method_entry_t * rb_method_entry_set | ( | VALUE | klass, |
ID | mid, | ||
const rb_method_entry_t * | me, | ||
rb_method_visibility_t | visi | ||
) |
Definition at line 714 of file vm_method.c.
const rb_method_entry_t * rb_method_entry_with_refinements | ( | VALUE | klass, |
ID | id, | ||
VALUE * | defined_class_ptr | ||
) |
Definition at line 928 of file vm_method.c.
const rb_method_entry_t * rb_method_entry_without_refinements | ( | VALUE | klass, |
ID | id, | ||
VALUE * | defined_class_ptr | ||
) |
Definition at line 942 of file vm_method.c.
Definition at line 2197 of file vm_method.c.
References CLASS_OF, GET_EC, klass, and obj.
Referenced by rb_respond_to().
Definition at line 1049 of file vm_method.c.
Definition at line 1043 of file vm_method.c.
const rb_method_entry_t * rb_resolve_refined_method | ( | VALUE | refinements, |
const rb_method_entry_t * | me | ||
) |
Definition at line 989 of file vm_method.c.
MJIT_FUNC_EXPORTED const rb_callable_method_entry_t * rb_resolve_refined_method_callable | ( | VALUE | refinements, |
const rb_callable_method_entry_t * | me | ||
) |
Definition at line 996 of file vm_method.c.
References rb_callable_method_entry_struct::defined_class, and me.
Definition at line 2207 of file vm_method.c.
References FALSE, obj, and rb_obj_respond_to().
Referenced by ossl_to_der_if_possible(), and rb_str_equal().
void rb_scope_visibility_set | ( | rb_method_visibility_t | visi | ) |
Definition at line 1155 of file vm_method.c.
Definition at line 1217 of file vm_method.c.
References id__send__, idInitialize, klass, me, NIL_P, object_id, rb_class_modify_check(), rb_eTypeError, rb_id2name(), rb_raise(), and rb_warn().
Definition at line 729 of file vm_method.c.
References klass, rb_define_alloc_func(), and UNDEF_ALLOC_FUNC.
Referenced by Init_Binding(), Init_ISeq(), Init_ossl_engine(), Init_Proc(), Init_VM(), and InitVM_Struct().