mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit.c: add class serial of singleton class
for toplevel self. Toplevel self's class is not `Object` but `#<Class:Object>`. This commit allows to inline method call setup for toplevel methods. I've thought r63053 works but it doesn't... I actually want to add all singleton classes but I'm not sure what's the good way for it. I assumed that using ObjectSpace.each_object is suboptimal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7f30b84c4f
commit
bc34d92f3d
1 changed files with 1 additions and 0 deletions
1
mjit.c
1
mjit.c
|
@ -1380,6 +1380,7 @@ mjit_init(struct mjit_options *opts)
|
|||
rb_obj_hide(valid_class_serials);
|
||||
rb_gc_register_mark_object(valid_class_serials);
|
||||
mjit_add_class_serial(RCLASS_SERIAL(rb_cObject));
|
||||
mjit_add_class_serial(RCLASS_SERIAL(CLASS_OF(rb_vm_top_self())));
|
||||
if (RCLASS_CONST_TBL(rb_cObject)) {
|
||||
rb_id_table_foreach(RCLASS_CONST_TBL(rb_cObject), valid_class_serials_add_i, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue