[svn:parrot] r36602 - in trunk: docs include/parrot src src/gc src/ops
cotto at svn.parrot.org
cotto at svn.parrot.org
Wed Feb 11 23:14:53 UTC 2009
Author: cotto
Date: Wed Feb 11 23:14:49 2009
New Revision: 36602
URL: https://trac.parrot.org/parrot/changeset/36602
Log:
[gc] change all occurances of "early_DOD" to "early_gc"
Modified:
trunk/docs/pmc.pod
trunk/include/parrot/pobj.h
trunk/include/parrot/resources.h
trunk/src/gc/api.c
trunk/src/gc/generational_ms.c
trunk/src/gc/incremental_ms.c
trunk/src/gc/mark_sweep.c
trunk/src/inter_misc.c
trunk/src/ops/core.ops
trunk/src/packdump.c
Modified: trunk/docs/pmc.pod
==============================================================================
--- trunk/docs/pmc.pod Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/docs/pmc.pod Wed Feb 11 23:14:49 2009 (r36602)
@@ -85,7 +85,7 @@
The PMC's B<destroy> vtable is called, when this PMC is found to be dead during
DOD.
-=item PObj_needs_early_DOD_FLAG
+=item PObj_needs_early_gc_FLAG
Set this flag too, if the PMC needs timely destruction, e.g. to close a file
handle at the end of a block scope, if the PMC isn't alive any more.
Modified: trunk/include/parrot/pobj.h
==============================================================================
--- trunk/include/parrot/pobj.h Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/include/parrot/pobj.h Wed Feb 11 23:14:49 2009 (r36602)
@@ -268,9 +268,9 @@
*/
b_PObj_is_special_PMC_FLAG = POBJ_FLAG(26),
- /* true if this is connected by some route to a needs_early_DOD object */
+ /* true if this is connected by some route to a needs_early_gc object */
PObj_high_priority_DOD_FLAG = POBJ_FLAG(27),
- PObj_needs_early_DOD_FLAG = (POBJ_FLAG(27) | POBJ_FLAG(28)),
+ PObj_needs_early_gc_FLAG = (POBJ_FLAG(27) | POBJ_FLAG(28)),
/* True if the PMC is a class */
PObj_is_class_FLAG = POBJ_FLAG(29),
@@ -355,7 +355,7 @@
(PObj_active_destroy_FLAG | \
PObj_custom_mark_FLAG | \
PObj_is_PMC_EXT_FLAG | \
- PObj_needs_early_DOD_FLAG))) \
+ PObj_needs_early_gc_FLAG))) \
DOD_flag_SET(is_special_PMC, o); \
else \
DOD_flag_CLEAR(is_special_PMC, o); \
@@ -364,9 +364,9 @@
#define PObj_is_special_PMC_TEST(o) DOD_flag_TEST(is_special_PMC, o)
#define PObj_is_special_PMC_SET(o) DOD_flag_SET(is_special_PMC, o)
-#define PObj_needs_early_DOD_TEST(o) PObj_flag_TEST(needs_early_DOD, o)
-#define PObj_needs_early_DOD_SET(o) PObj_special_SET(needs_early_DOD, o)
-#define PObj_needs_early_DOD_CLEAR(o) PObj_special_CLEAR(needs_early_DOD, o)
+#define PObj_needs_early_gc_TEST(o) PObj_flag_TEST(needs_early_gc, o)
+#define PObj_needs_early_gc_SET(o) PObj_special_SET(needs_early_gc, o)
+#define PObj_needs_early_gc_CLEAR(o) PObj_special_CLEAR(needs_early_gc, o)
#define PObj_high_priority_DOD_TEST(o) PObj_flag_TEST(high_priority_DOD, o)
#define PObj_high_priority_DOD_SET(o) PObj_special_SET(high_priority_DOD, o)
Modified: trunk/include/parrot/resources.h
==============================================================================
--- trunk/include/parrot/resources.h Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/include/parrot/resources.h Wed Feb 11 23:14:49 2009 (r36602)
@@ -162,7 +162,7 @@
* anything */
UINTVAL memory_collected; /* Total amount of memory copied
during collection */
- UINTVAL num_early_DOD_PMCs; /* how many PMCs want immediate destruction */
+ UINTVAL num_early_gc_PMCs; /* how many PMCs want immediate destruction */
UINTVAL num_early_PMCs_seen;/* how many such PMCs has DOD seen */
UINTVAL num_extended_PMCs; /* active PMCs having pmc_ext */
PMC* gc_mark_start; /* first PMC marked during a DOD run */
Modified: trunk/src/gc/api.c
==============================================================================
--- trunk/src/gc/api.c Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/src/gc/api.c Wed Feb 11 23:14:49 2009 (r36602)
@@ -282,8 +282,8 @@
Arenas * const arena_base = interp->arena_base;
/* TODO collect objects with finalizers */
- if (PObj_needs_early_DOD_TEST(p))
- --arena_base->num_early_DOD_PMCs;
+ if (PObj_needs_early_gc_TEST(p))
+ --arena_base->num_early_gc_PMCs;
if (PObj_active_destroy_TEST(p))
VTABLE_destroy(interp, pmc);
Modified: trunk/src/gc/generational_ms.c
==============================================================================
--- trunk/src/gc/generational_ms.c Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/src/gc/generational_ms.c Wed Feb 11 23:14:49 2009 (r36602)
@@ -1477,7 +1477,7 @@
int priority;
PObj_live_SET(obj);
- priority = PObj_needs_early_DOD_TEST(obj);
+ priority = PObj_needs_early_gc_TEST(obj);
if (priority)
++interp->arena_base->num_early_PMCs_seen;
h = PObj_to_GMSH(obj);
@@ -1606,12 +1606,12 @@
UINTVAL bits;
if (lazy_gc && arena_base->num_early_PMCs_seen >=
- arena_base->num_early_DOD_PMCs) {
+ arena_base->num_early_gc_PMCs) {
return 1;
}
/* TODO propagate flag in pobject_lives */
arena_base->gc_trace_ptr = current;
- if (!PObj_needs_early_DOD_TEST(current))
+ if (!PObj_needs_early_gc_TEST(current))
PObj_high_priority_DOD_CLEAR(current);
/* mark children */
@@ -1672,8 +1672,8 @@
for (h = pool->white; h != pool->free_list; h = h->next) {
PMC * const obj = (PMC*)GMSH_to_PObj(h);
- if (PObj_needs_early_DOD_TEST(obj))
- --arena_base->num_early_DOD_PMCs;
+ if (PObj_needs_early_gc_TEST(obj))
+ --arena_base->num_early_gc_PMCs;
if (PObj_active_destroy_TEST(obj))
VTABLE_destroy(interp, (PMC *)obj);
if (PObj_is_PMC_EXT_TEST(obj) && obj->pmc_ext) {
Modified: trunk/src/gc/incremental_ms.c
==============================================================================
--- trunk/src/gc/incremental_ms.c Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/src/gc/incremental_ms.c Wed Feb 11 23:14:49 2009 (r36602)
@@ -1082,7 +1082,7 @@
if (g_ims->state >= GC_IMS_COLLECT) {
/* we are beyond sweep, timely destruction is done */
- if (arena_base->num_early_PMCs_seen >= arena_base->num_early_DOD_PMCs)
+ if (arena_base->num_early_PMCs_seen >= arena_base->num_early_gc_PMCs)
return;
/* when not all seen, start a fresh cycle */
@@ -1096,7 +1096,7 @@
* run through all steps until we see enough PMCs that need timely
* destruction or we finished sweeping
*/
- while (arena_base->num_early_PMCs_seen < arena_base->num_early_DOD_PMCs) {
+ while (arena_base->num_early_PMCs_seen < arena_base->num_early_gc_PMCs) {
parrot_gc_ims_run_increment(interp);
if (g_ims->state >= GC_IMS_COLLECT)
break;
Modified: trunk/src/gc/mark_sweep.c
==============================================================================
--- trunk/src/gc/mark_sweep.c Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/src/gc/mark_sweep.c Wed Feb 11 23:14:49 2009 (r36602)
@@ -353,7 +353,7 @@
/* quick check if we can already bail out */
if (arena_base->lazy_gc
- && arena_base->num_early_PMCs_seen >= arena_base->num_early_DOD_PMCs)
+ && arena_base->num_early_PMCs_seen >= arena_base->num_early_gc_PMCs)
return 0;
/* Find important stuff on the system stack */
@@ -623,7 +623,7 @@
arena_base = interp->arena_base;
- if (PObj_needs_early_DOD_TEST(obj))
+ if (PObj_needs_early_gc_TEST(obj))
++arena_base->num_early_PMCs_seen;
if (PObj_high_priority_DOD_TEST(obj) && arena_base->gc_trace_ptr) {
@@ -975,7 +975,7 @@
PMC *next;
if (lazy_gc && arena_base->num_early_PMCs_seen >=
- arena_base->num_early_DOD_PMCs) {
+ arena_base->num_early_gc_PMCs) {
return 0;
}
@@ -985,7 +985,7 @@
PObj_get_FLAGS(current) |= PObj_custom_GC_FLAG;
/* clearing the flag is much more expensive then testing */
- if (!PObj_needs_early_DOD_TEST(current))
+ if (!PObj_needs_early_gc_TEST(current))
PObj_high_priority_DOD_CLEAR(current);
/* mark properties */
Modified: trunk/src/inter_misc.c
==============================================================================
--- trunk/src/inter_misc.c Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/src/inter_misc.c Wed Feb 11 23:14:49 2009 (r36602)
@@ -290,7 +290,7 @@
ret = arena_base->memory_collected;
break;
case IMPATIENT_PMCS:
- ret = arena_base->num_early_DOD_PMCs;
+ ret = arena_base->num_early_gc_PMCs;
break;
case EXTENDED_PMCS:
ret = arena_base->num_extended_PMCs;
Modified: trunk/src/ops/core.ops
==============================================================================
--- trunk/src/ops/core.ops Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/src/ops/core.ops Wed Feb 11 23:14:49 2009 (r36602)
@@ -1221,7 +1221,7 @@
if ($1)
Parrot_do_gc_run(interp, 0);
else
- if (interp->arena_base->num_early_DOD_PMCs)
+ if (interp->arena_base->num_early_gc_PMCs)
Parrot_do_gc_run(interp, GC_lazy_FLAG);
}
@@ -1283,8 +1283,8 @@
=cut
op needs_destroy(invar PMC) {
- PObj_needs_early_DOD_SET($1);
- ++interp->arena_base->num_early_DOD_PMCs;
+ PObj_needs_early_gc_SET($1);
+ ++interp->arena_base->num_early_gc_PMCs;
}
=back
Modified: trunk/src/packdump.c
==============================================================================
--- trunk/src/packdump.c Wed Feb 11 22:30:33 2009 (r36601)
+++ trunk/src/packdump.c Wed Feb 11 23:14:49 2009 (r36602)
@@ -114,7 +114,7 @@
"need_finalize",
"is_special_PMC",
"high_priority_DOD",
- "needs_early_DOD",
+ "needs_early_gc",
"is_class",
"is_object"
};
More information about the parrot-commits
mailing list