diff options
author | charliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-29 00:52:38 +0000 |
---|---|---|
committer | charliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-29 00:52:38 +0000 |
commit | 7fafa8f376a4be7ba6ed7f9ea9c549847fae0d79 (patch) | |
tree | 78e2b63103472f79be696b1ee98eaa379d8ba606 /vm_insnhelper.c | |
parent | e2ec76056aec67bd5422df597993f2cfc871b758 (diff) | |
download | ruby-7fafa8f376a4be7ba6ed7f9ea9c549847fae0d79.tar.gz |
* 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
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 8fd6b1ef27..91e9142cb9 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -846,7 +846,7 @@ vm_search_method(rb_call_info_t *ci, VALUE recv) VALUE klass = CLASS_OF(recv); #if OPT_INLINE_METHOD_CACHE - if (LIKELY(GET_VM_STATE_VERSION() == ci->vmstat && RCLASS_EXT(klass)->seq == ci->seq)) { + if (LIKELY(GET_METHOD_STATE_VERSION() == ci->method_state && RCLASS_EXT(klass)->seq == ci->seq)) { /* cache hit! */ return; } @@ -856,7 +856,7 @@ vm_search_method(rb_call_info_t *ci, VALUE recv) ci->klass = klass; ci->call = vm_call_general; #if OPT_INLINE_METHOD_CACHE - ci->vmstat = GET_VM_STATE_VERSION(); + ci->method_state = GET_METHOD_STATE_VERSION(); ci->seq = RCLASS_EXT(klass)->seq; #endif } @@ -924,7 +924,7 @@ rb_equal_opt(VALUE obj1, VALUE obj2) rb_call_info_t ci; ci.mid = idEq; ci.klass = 0; - ci.vmstat = 0; + ci.method_state = 0; ci.me = NULL; ci.defined_class = 0; return opt_eq_func(obj1, obj2, &ci); |