[svn:parrot] r43679 - branches/pmc_freeze_with_pmcs/src/pmc

darbelo at svn.parrot.org darbelo at svn.parrot.org
Mon Feb 1 05:56:29 UTC 2010


Author: darbelo
Date: Mon Feb  1 05:56:29 2010
New Revision: 43679
URL: https://trac.parrot.org/parrot/changeset/43679

Log:
Use the VISIT_PMC() macro in a few more places.
Thanks to plobsing++ for the tip.

Modified:
   branches/pmc_freeze_with_pmcs/src/pmc/fixedpmcarray.pmc
   branches/pmc_freeze_with_pmcs/src/pmc/object.pmc
   branches/pmc_freeze_with_pmcs/src/pmc/parrotinterpreter.pmc
   branches/pmc_freeze_with_pmcs/src/pmc/schedulermessage.pmc

Modified: branches/pmc_freeze_with_pmcs/src/pmc/fixedpmcarray.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/fixedpmcarray.pmc	Mon Feb  1 05:18:15 2010	(r43678)
+++ branches/pmc_freeze_with_pmcs/src/pmc/fixedpmcarray.pmc	Mon Feb  1 05:56:29 2010	(r43679)
@@ -714,8 +714,7 @@
         PMC   **pos    = PMC_array(SELF);
 
         for (i = 0; i < n; ++i, ++pos) {
-            VTABLE_set_pointer(interp, info, pos);
-            (info->visit_pmc_now)(INTERP, *pos, info);
+            VISIT_PMC(INTERP, info, *pos);
         }
 
         SUPER(info);

Modified: branches/pmc_freeze_with_pmcs/src/pmc/object.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/object.pmc	Mon Feb  1 05:18:15 2010	(r43678)
+++ branches/pmc_freeze_with_pmcs/src/pmc/object.pmc	Mon Feb  1 05:56:29 2010	(r43679)
@@ -737,17 +737,12 @@
 
     VTABLE void visit(PMC *info) {
         Parrot_Object_attributes * const obj_data = PARROT_OBJECT(SELF);
-        PMC **pos;
 
         /* 1) visit class */
-        pos            = &obj_data->_class;
-        VTABLEpos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC(INTERP, info, obj_data->_class);
 
         /* 2) visit the attributes */
-        pos      = &obj_data->attrib_store;
-        VTABLE_set_pointer(interp, info, pos);
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC(INTERP, info, obj_data->attrib_store);
     }
 
 /*

Modified: branches/pmc_freeze_with_pmcs/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/parrotinterpreter.pmc	Mon Feb  1 05:18:15 2010	(r43678)
+++ branches/pmc_freeze_with_pmcs/src/pmc/parrotinterpreter.pmc	Mon Feb  1 05:56:29 2010	(r43679)
@@ -684,7 +684,6 @@
 */
 
     VTABLE void visit(PMC *info) {
-        PMC **pos;
         /*
          * the information frozen here is part of all PBCs
          * we probably need to freeze all dynamic extensible
@@ -710,13 +709,11 @@
         /*  HLL_info */
         if (VTABLE_get_integer(INTERP, info) == VISIT_THAW_NORMAL ||
             VTABLE_get_integer(INTERP, info) == VISIT_THAW_CONSTANTS) {
-            pos = &PMC_args(SELF);
+            VISIT_PMC(interp, info, PMC_args(SELF));
         }
         else
-            pos = &INTERP->HLL_info;
+            VISIT_PMC(interp, info, INTERP->HLL_info);
 
-        VTABLE_set_pointer(interp, info, pos);
-        (info->visit_pmc_now)(INTERP, *pos, info);
     }
 
     VTABLE void thaw(PMC *info) {

Modified: branches/pmc_freeze_with_pmcs/src/pmc/schedulermessage.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/schedulermessage.pmc	Mon Feb  1 05:18:15 2010	(r43678)
+++ branches/pmc_freeze_with_pmcs/src/pmc/schedulermessage.pmc	Mon Feb  1 05:56:29 2010	(r43679)
@@ -217,14 +217,8 @@
 */
 
     VTABLE void visit(PMC *info) {
-        Parrot_SchedulerMessage_attributes * const core_struct =
-            PARROT_SCHEDULERMESSAGE(SELF);
-        PMC **pos;
-
-        /* 1) visit message data */
-        pos            = &core_struct->data;
-        VTABLE_set_pointer(interp, info, pos);
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        /* visit message data */
+        VISIT_PMC(INTERP, info, PARROT_SCHEDULERMESSAGE(SELF)->data);
     }
 
 /*


More information about the parrot-commits mailing list