[svn:parrot] r49481 - branches/generational_gc/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Fri Oct 8 11:36:57 UTC 2010
Author: bacek
Date: Fri Oct 8 11:36:57 2010
New Revision: 49481
URL: https://trac.parrot.org/parrot/changeset/49481
Log:
Don't kill "constant" objects...
Modified:
branches/generational_gc/src/gc/gc_ms2.c
Modified: branches/generational_gc/src/gc/gc_ms2.c
==============================================================================
--- branches/generational_gc/src/gc/gc_ms2.c Fri Oct 8 11:15:35 2010 (r49480)
+++ branches/generational_gc/src/gc/gc_ms2.c Fri Oct 8 11:36:57 2010 (r49481)
@@ -706,8 +706,8 @@
old_object_tails[i] = tmp->prev;
}
- if (PObj_live_TEST(pmc)) {
- if (!PObj_constant_TEST(pmc)) {
+ if (!PObj_constant_TEST(pmc)) {
+ if (PObj_live_TEST(pmc)) {
/* "Seal" object with write barrier */
VTABLE *t = pmc->vtable;
@@ -725,23 +725,23 @@
LIST_APPEND(self->objects[i+1], tmp);
pmc->flags &= ~(PObj_GC_generation_0_FLAG
- | PObj_GC_generation_1_FLAG
- | PObj_GC_generation_2_FLAG);
+ | PObj_GC_generation_1_FLAG
+ | PObj_GC_generation_2_FLAG);
pmc->flags |= generation_to_flags(i+1);
- }
- /* Paint white for next cycle */
- PObj_live_CLEAR(pmc);
- }
- else {
- /* Object is dead. Bury it */
- PObj_on_free_list_SET(pmc);
- LIST_REMOVE(self->objects[i], tmp);
+ /* Paint white for next cycle */
+ PObj_live_CLEAR(pmc);
+ }
+ else {
+ /* Object is dead. Bury it */
+ PObj_on_free_list_SET(pmc);
+ LIST_REMOVE(self->objects[i], tmp);
- Parrot_pmc_destroy(interp, pmc);
- gc_ms2_free_pmc_header(interp, pmc);
+ Parrot_pmc_destroy(interp, pmc);
+ gc_ms2_free_pmc_header(interp, pmc);
- Parrot_gc_pool_free(interp, self->pmc_allocator, tmp);
+ Parrot_gc_pool_free(interp, self->pmc_allocator, tmp);
+ }
}
tmp = next;
More information about the parrot-commits
mailing list