* gc.c: fix indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
06f833e6d5
commit
a0e0fafa0c
@ -1,3 +1,7 @@
|
|||||||
|
Wed Jun 17 06:14:23 2009 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* gc.c: fix indent.
|
||||||
|
|
||||||
Wed Jun 17 06:05:03 2009 Koichi Sasada <ko1@atdot.net>
|
Wed Jun 17 06:05:03 2009 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* gc.c (rb_objspace_each_objects): New C API, added.
|
* gc.c (rb_objspace_each_objects): New C API, added.
|
||||||
|
42
gc.c
42
gc.c
@ -2433,13 +2433,13 @@ rb_objspace_each_objects(int (*callback)(void *vstart, void *vend,
|
|||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < heaps_used) {
|
while (i < heaps_used) {
|
||||||
while (0 < i && (uintptr_t)membase < (uintptr_t)heaps[i-1].membase)
|
while (0 < i && (uintptr_t)membase < (uintptr_t)heaps[i-1].membase)
|
||||||
i--;
|
i--;
|
||||||
while (i < heaps_used && (uintptr_t)heaps[i].membase <= (uintptr_t)membase )
|
while (i < heaps_used && (uintptr_t)heaps[i].membase <= (uintptr_t)membase )
|
||||||
i++;
|
i++;
|
||||||
if (heaps_used <= i)
|
if (heaps_used <= i)
|
||||||
break;
|
break;
|
||||||
membase = heaps[i].membase;
|
membase = heaps[i].membase;
|
||||||
|
|
||||||
pstart = heaps[i].slot;
|
pstart = heaps[i].slot;
|
||||||
pend = pstart + heaps[i].limit;
|
pend = pstart + heaps[i].limit;
|
||||||
@ -2473,29 +2473,29 @@ os_obj_of_i(void *vstart, void *vend, size_t stride, void *data)
|
|||||||
volatile VALUE v;
|
volatile VALUE v;
|
||||||
|
|
||||||
for (; p != pend; p++) {
|
for (; p != pend; p++) {
|
||||||
if (p->as.basic.flags) {
|
if (p->as.basic.flags) {
|
||||||
switch (BUILTIN_TYPE(p)) {
|
switch (BUILTIN_TYPE(p)) {
|
||||||
case T_NONE:
|
case T_NONE:
|
||||||
case T_ICLASS:
|
case T_ICLASS:
|
||||||
case T_NODE:
|
case T_NODE:
|
||||||
case T_ZOMBIE:
|
case T_ZOMBIE:
|
||||||
continue;
|
continue;
|
||||||
case T_CLASS:
|
case T_CLASS:
|
||||||
if (FL_TEST(p, FL_SINGLETON))
|
if (FL_TEST(p, FL_SINGLETON))
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
if (!p->as.basic.klass) continue;
|
if (!p->as.basic.klass) continue;
|
||||||
v = (VALUE)p;
|
v = (VALUE)p;
|
||||||
if (!oes->of || rb_obj_is_kind_of(v, oes->of)) {
|
if (!oes->of || rb_obj_is_kind_of(v, oes->of)) {
|
||||||
rb_yield(v);
|
rb_yield(v);
|
||||||
oes->num++;
|
oes->num++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
os_obj_of(VALUE of)
|
os_obj_of(VALUE of)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user