mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* insns.def, vm.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: split
ruby_vm_global_state_version into two separate counters - one for the global method state and one for the global constant state. This means changes to constants do not affect method caches, and changes to methods do not affect constant caches. In particular, this means inclusions of modules containing constants no longer globally invalidate the method cache. * class.c, eval.c, include/ruby/intern.h, insns.def, vm.c, vm_method.c: rename rb_clear_cache_by_class to rb_clear_method_cache_by_class * class.c, include/ruby/intern.h, variable.c, vm_method.c: add rb_clear_constant_cache * compile.c, vm_core.h, vm_insnhelper.c: rename vmstat field in rb_call_info_struct to method_state * vm_method.c: rename vmstat field in struct cache_entry to method_state git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e2ec76056a
commit
7fafa8f376
12 changed files with 70 additions and 42 deletions
4
eval.c
4
eval.c
|
@ -1263,7 +1263,7 @@ mod_using(VALUE self, VALUE module)
|
|||
}
|
||||
Check_Type(module, T_MODULE);
|
||||
rb_using_module(cref, module);
|
||||
rb_clear_cache_by_class(rb_cObject);
|
||||
rb_clear_method_cache_by_class(rb_cObject);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -1399,7 +1399,7 @@ top_using(VALUE self, VALUE module)
|
|||
}
|
||||
Check_Type(module, T_MODULE);
|
||||
rb_using_module(cref, module);
|
||||
rb_clear_cache_by_class(rb_cObject);
|
||||
rb_clear_method_cache_by_class(rb_cObject);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue