summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-04 05:25:06 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-04 05:25:06 +0000
commit2f522b9cc6f3e184404040b12af4486520a73b26 (patch)
tree7e24db4e9d97f1096442eadb272215340865336f /vm_insnhelper.c
parent4142e8301dd618a775f611bc7bf6c049ce6a4bf9 (diff)
* class.c, compile.c, eval.c, gc.h, insns.def, internal.h, method.h,
variable.c, vm.c, vm_core.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: Implement class hierarchy method cache invalidation. [ruby-core:55053] [Feature #8426] [GH-387] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index fa7791e38a..a6166596b6 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -848,16 +848,18 @@ 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 && klass == ci->klass)) {
+ if (LIKELY(GET_VM_STATE_VERSION() == ci->vmstat && RCLASS_EXT(klass)->seq == ci->seq && klass == ci->klass)) {
/* cache hit! */
return;
}
#endif
+
ci->me = rb_method_entry(klass, ci->mid, &ci->defined_class);
- ci->call = vm_call_general;
ci->klass = klass;
+ ci->call = vm_call_general;
#if OPT_INLINE_METHOD_CACHE
ci->vmstat = GET_VM_STATE_VERSION();
+ ci->seq = RCLASS_EXT(klass)->seq;
#endif
}