[svn:parrot] r47325 - branches/gc_massacre/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Jun 3 08:39:09 UTC 2010
Author: bacek
Date: Thu Jun 3 08:39:08 2010
New Revision: 47325
URL: https://trac.parrot.org/parrot/changeset/47325
Log:
Simplify TMS.is_owned
Modified:
branches/gc_massacre/src/gc/gc_tms.c
Modified: branches/gc_massacre/src/gc/gc_tms.c
==============================================================================
--- branches/gc_massacre/src/gc/gc_tms.c Thu Jun 3 06:55:51 2010 (r47324)
+++ branches/gc_massacre/src/gc/gc_tms.c Thu Jun 3 08:39:08 2010 (r47325)
@@ -832,23 +832,19 @@
TriColor_GC *self = (TriColor_GC *)interp->gc_sys->gc_private;
List_Item_Header *item = Obj2LLH(ptr);
PMC *pmc = (PMC *)ptr;
+
if (!ptr || !item)
return 0;
- if (!Parrot_gc_pool_is_owned(self->pmc_allocator, Obj2LLH(ptr)))
+
+ if (!Parrot_gc_pool_is_owned(self->pmc_allocator, item))
return 0;
-#if 1
/* Pool.is_owned isn't precise enough (yet) */
- if (Parrot_gc_list_is_owned(interp, self->grey_objects, item))
- return 1;
if (Parrot_gc_list_is_owned(interp, self->dead_objects, item))
return 1;
- if (Parrot_gc_list_is_owned(interp, self->objects, item))
- return 1;
+
+ /* We don't care about non-dead objects here. They will be marked anyway */
return 0;
-#else
- return 1;
-#endif
}
/*
More information about the parrot-commits
mailing list