[svn:parrot] r43489 - trunk/src

plobsing at svn.parrot.org plobsing at svn.parrot.org
Wed Jan 20 00:39:41 UTC 2010


Author: plobsing
Date: Wed Jan 20 00:39:40 2010
New Revision: 43489
URL: https://trac.parrot.org/parrot/changeset/43489

Log:
don't need visit_info.id_list when freezing, don't need visit_info.seen when thawing

Modified:
   trunk/src/pmc_freeze.c

Modified: trunk/src/pmc_freeze.c
==============================================================================
--- trunk/src/pmc_freeze.c	Wed Jan 20 00:18:10 2010	(r43488)
+++ trunk/src/pmc_freeze.c	Wed Jan 20 00:39:40 2010	(r43489)
@@ -548,9 +548,15 @@
 
     /* we must use PMCs here so that they get marked properly */
     info->todo        = pmc_new(interp, enum_class_Array);
-    info->seen        = pmc_new(interp, enum_class_Hash);
-    VTABLE_set_pointer(interp, info->seen, parrot_new_intval_hash(interp));
-    info->id_list     = pmc_new(interp, enum_class_Array);
+    if (info->what == VISIT_FREEZE_NORMAL) {
+        info->seen    = pmc_new(interp, enum_class_Hash);
+        VTABLE_set_pointer(interp, info->seen, parrot_new_intval_hash(interp));
+        info->id_list = PMCNULL;
+    }
+    else {
+        info->seen    = PMCNULL;
+        info->id_list = pmc_new(interp, enum_class_Array);
+    }
     info->id          = 0;
     info->extra_flags = EXTRA_IS_NULL;
 


More information about the parrot-commits mailing list