summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-15 23:59:15 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-15 23:59:15 +0000
commitd4628c0bcd0479b15593cfa4ed0907b4360857e0 (patch)
tree6131c589b8df287a12b2814fdb853202019b613a /vm_method.c
parent0e03a296e63b9694709de9bc462c08de60873a58 (diff)
* vm_method.c: separate clearing cache entry code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/vm_method.c b/vm_method.c
index e84d4ccba6..b85351a671 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -34,7 +34,8 @@ rb_clear_cache(void)
ent = cache;
end = ent + CACHE_SIZE;
while (ent < end) {
- ent->me = ent->mid = 0;
+ ent->me = 0;
+ ent->mid = 0;
ent++;
}
}
@@ -52,7 +53,8 @@ rb_clear_cache_for_undef(VALUE klass, ID id)
end = ent + CACHE_SIZE;
while (ent < end) {
if ((ent->me && ent->me->klass == klass) && ent->mid == id) {
- ent->me = ent->mid = 0;
+ ent->me = 0;
+ ent->mid = 0;
}
ent++;
}
@@ -71,7 +73,8 @@ rb_clear_cache_by_id(ID id)
end = ent + CACHE_SIZE;
while (ent < end) {
if (ent->mid == id) {
- ent->me = ent->mid = 0;
+ ent->me = 0;
+ ent->mid = 0;
}
ent++;
}
@@ -90,7 +93,8 @@ rb_clear_cache_by_class(VALUE klass)
end = ent + CACHE_SIZE;
while (ent < end) {
if (ent->klass == klass || (ent->me && ent->me->klass == klass)) {
- ent->me = ent->mid = 0;
+ ent->me = 0;
+ ent->mid = 0;
}
ent++;
}