summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--vm_method.c12
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index fe45746e1..07a8f2821 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jul 16 08:57:44 2009 Koichi Sasada <ko1@atdot.net>
+
+ * vm_method.c: separate clearing cache entry code.
+
Thu Jul 16 08:56:32 2009 Koichi Sasada <ko1@atdot.net>
* dir.c (push_glob): re-fix GC problem.
diff --git a/vm_method.c b/vm_method.c
index e84d4ccba..b85351a67 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++;
}