[svn:parrot] r49643 - branches/generational_gc/src/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Oct 24 10:08:11 UTC 2010


Author: bacek
Date: Sun Oct 24 10:08:10 2010
New Revision: 49643
URL: https://trac.parrot.org/parrot/changeset/49643

Log:
Initialize custom mark and destroy flags in thawed objects. It's required because ImageIO uses pmc_new_noinit which doesn't initialize these flags

Modified:
   branches/generational_gc/src/pmc/fixedpmcarray.pmc
   branches/generational_gc/src/pmc/hash.pmc

Modified: branches/generational_gc/src/pmc/fixedpmcarray.pmc
==============================================================================
--- branches/generational_gc/src/pmc/fixedpmcarray.pmc	Sun Oct 24 04:47:34 2010	(r49642)
+++ branches/generational_gc/src/pmc/fixedpmcarray.pmc	Sun Oct 24 10:08:10 2010	(r49643)
@@ -730,13 +730,13 @@
     }
 
     VTABLE void freeze(PMC *info) {
-        SUPER(info);
         VTABLE_push_integer(INTERP, info, VTABLE_elements(INTERP, SELF));
     }
 
     VTABLE void thaw(PMC *info) {
-        SUPER(info);
         SELF.set_integer_native(VTABLE_shift_integer(INTERP, info));
+        /* Thawed array was created from pmc_new_noinit */
+        PObj_custom_mark_destroy_SETALL(SELF);
     }
 
 /*

Modified: branches/generational_gc/src/pmc/hash.pmc
==============================================================================
--- branches/generational_gc/src/pmc/hash.pmc	Sun Oct 24 04:47:34 2010	(r49642)
+++ branches/generational_gc/src/pmc/hash.pmc	Sun Oct 24 10:08:10 2010	(r49643)
@@ -1201,6 +1201,8 @@
 
     VTABLE void thaw(PMC *info) {
         SELF.set_pointer((void *)Parrot_hash_thaw(INTERP, info));
+        /* Thawed Hash was created from pmc_new_noinit */
+        PObj_custom_mark_destroy_SETALL(SELF);
     }
 }
 


More information about the parrot-commits mailing list