5 #define CACHE_SIZE 0x800
6 #define CACHE_MASK 0x7ff
7 #define EXPR1(c,m) ((((c)>>3)^(m))&CACHE_MASK)
23 #define ruby_running (GET_VM()->running)
94 ume->
next =
GET_VM()->unlinked_method_entry_list;
95 GET_VM()->unlinked_method_entry_list = ume;
184 rb_warn(
"defining %s.allocate is deprecated; use rb_define_alloc_func()",
208 switch (old_def->
type) {
221 "previous definition of %s was here",
241 if (klass ==
rb_cObject && mid == idInitialize) {
242 rb_warn(
"redefining Object#initialize may cause infinite loop");
245 if (mid ==
object_id || mid == id__send__) {
256 #define CALL_METHOD_HOOK(klass, hook, mid) do { \
257 const VALUE arg = ID2SYM(mid); \
258 VALUE recv_class = (klass); \
259 ID hook_id = (hook); \
260 if (FL_TEST((klass), FL_SINGLETON)) { \
261 recv_class = rb_ivar_get((klass), attached); \
262 hook_id = singleton_##hook; \
264 rb_funcall2(recv_class, hook_id, 1, &arg); \
319 rb_bug(
"rb_add_method: unsupported method type (%d)\n", type);
422 ent->
mid ==
id && ent->
klass == klass) {
442 if (mid ==
object_id || mid == id__send__ || mid == idInitialize) {
487 for (i = 0; i <
argc; i++) {
493 #undef rb_disable_super
494 #undef rb_enable_super
526 if (me->
flag != noex) {
529 if (klass == me->
klass) {
547 if (!me->
def)
return 0;
572 "attribute accessor as module_function" :
573 "private attribute?");
616 if (
id ==
object_id ||
id == id__send__ ||
id == idInitialize) {
623 const char *s0 =
" class";
695 for (i = 0; i <
argc; i++) {
737 #define VISI_CHECK(x,f) (((x)&NOEX_MASK) == (f))
856 if (d1 == d2)
return 1;
857 if (!d1 || !d2)
return 0;
882 rb_bug(
"rb_method_entry_eq: unsupported method type (%d)\n", d1->
type);
915 flag = orig_me->
flag;
957 "Insecure: can't change method visibility");
971 for (i = 0; i <
argc; i++) {
1169 for (i = 0; i <
argc; i++) {
1285 #define rb_intern(str) rb_intern_const(str)