develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35571 - in trunk: docs/pdds include/parrot src src/gc src/pmc

From:
Whiteknight
Date:
January 14, 2009 16:44
Subject:
[svn:parrot] r35571 - in trunk: docs/pdds include/parrot src src/gc src/pmc
Message ID:
20090115004442.1F57ECB9AE@x12.develooper.com
Author: Whiteknight
Date: Wed Jan 14 16:44:41 2009
New Revision: 35571

Modified:
   trunk/include/parrot/pobj.h
   trunk/src/gc/generational_ms.c
   trunk/src/inter_call.c
   trunk/src/pmc/deleg_pmc.pmc

Changes in other areas also in this revision:
Modified:
   trunk/docs/pdds/pdd09_gc.pod

Log:
[Core] remove the last few mentions of PObj_data_is_PMC_array_FLAG, and fix an error that I apparently uncovered when I ran make headerizer last time. My bad.

Modified: trunk/include/parrot/pobj.h
==============================================================================
--- trunk/include/parrot/pobj.h	(original)
+++ trunk/include/parrot/pobj.h	Wed Jan 14 16:44:41 2009
@@ -259,10 +259,6 @@
     PObj_report_FLAG            = POBJ_FLAG(23),
 
 /* PMC specific FLAGs */
-    /* Set to true if the PMC data pointer points to a malloced
-     * array of PObjs
-     */
-    PObj_data_is_PMC_array_FLAG = POBJ_FLAG(24),
     /* call object finalizer */
     PObj_need_finalize_FLAG     = POBJ_FLAG(25),
     /* a PMC that needs special handling in DOD, i.e one that has either:
@@ -358,7 +354,6 @@
     if ((PObj_get_FLAGS(o) & \
                 (PObj_active_destroy_FLAG | \
                  PObj_custom_mark_FLAG | \
-                 PObj_data_is_PMC_array_FLAG  | \
                  PObj_is_PMC_EXT_FLAG | \
                  PObj_needs_early_DOD_FLAG))) \
         DOD_flag_SET(is_special_PMC, o); \
@@ -369,19 +364,6 @@
 #define PObj_is_special_PMC_TEST(o) DOD_flag_TEST(is_special_PMC, o)
 #define PObj_is_special_PMC_SET(o) DOD_flag_SET(is_special_PMC, o)
 
-#define PObj_data_is_PMC_array_SET(o) do { \
-    PObj_special_SET(data_is_PMC_array, o); \
-    PObj_flag_SET(active_destroy, o); \
-    } while (0)
-
-#define PObj_data_is_PMC_array_CLEAR(o) do {\
-    PObj_special_CLEAR(data_is_PMC_array, o); \
-    PObj_flag_CLEAR(active_destroy, o); \
-    } while (0)
-
-#define PObj_data_is_PMC_array_TEST(o) \
-    PObj_flag_TEST(data_is_PMC_array, o)
-
 #define PObj_needs_early_DOD_TEST(o) PObj_flag_TEST(needs_early_DOD, o)
 #define PObj_needs_early_DOD_SET(o) PObj_special_SET(needs_early_DOD, o)
 #define PObj_needs_early_DOD_CLEAR(o) PObj_special_CLEAR(needs_early_DOD, o)

Modified: trunk/src/gc/generational_ms.c
==============================================================================
--- trunk/src/gc/generational_ms.c	(original)
+++ trunk/src/gc/generational_ms.c	Wed Jan 14 16:44:41 2009
@@ -1599,7 +1599,6 @@
     ASSERT_ARGS(trace_children_cb)
     Arenas * const arena_base = interp->arena_base;
     const int lazy_dod = arena_base->lazy_dod;
-    const UINTVAL mask = PObj_data_is_PMC_array_FLAG | PObj_custom_mark_FLAG;
     Gc_gms_hdr *h;
 
     for (h = pool->gray; h != pool->white;) {
@@ -1614,26 +1613,10 @@
         arena_base->dod_trace_ptr = current;
         if (!PObj_needs_early_DOD_TEST(current))
             PObj_high_priority_DOD_CLEAR(current);
+
         /* mark children */
-        bits = PObj_get_FLAGS(current) & mask;
-        if (bits) {
-            if (bits == PObj_data_is_PMC_array_FLAG) {
-                /* malloced array of PMCs */
-                PMC ** const data = PMC_data(current);
-
-                if (data) {
-                    INTVAL i;
-                    for (i = 0; i < PMC_int_val(current); i++) {
-                        if (data[i]) {
-                            pobject_lives(interp, (PObj *)data[i]);
-                        }
-                    }
-                }
-            }
-            else {
-                /* All that's left is the custom */
-                VTABLE_mark(interp, current);
-            }
+        if (PObj_custom_mark_TEST(current)) {
+            VTABLE_mark(interp, current);
         }
         if (h != pool->gray) {
             /* if a gray was inserted DFS, it is next */

Modified: trunk/src/inter_call.c
==============================================================================
--- trunk/src/inter_call.c	(original)
+++ trunk/src/inter_call.c	Wed Jan 14 16:44:41 2009
@@ -2782,7 +2782,7 @@
 Parrot_pcc_invoke_from_sig_object(PARROT_INTERP, ARGIN(PMC *sub_obj),
         ARGIN(PMC *sig_obj))
 {
-    ASSERT_ARGS(Parrot_pcc_invoke_sub_from_sig_object)
+    ASSERT_ARGS(Parrot_pcc_invoke_from_sig_object)
 #define PCC_ARG_MAX 1024
     /* variables from PCCINVOKE impl in PCCMETHOD.pm */
     /* args INSP, returns INSP */

Modified: trunk/src/pmc/deleg_pmc.pmc
==============================================================================
--- trunk/src/pmc/deleg_pmc.pmc	(original)
+++ trunk/src/pmc/deleg_pmc.pmc	Wed Jan 14 16:44:41 2009
@@ -42,11 +42,7 @@
     }
 
     VTABLE void mark() {
-        /* don't pass that on
-         *
-         * NB objects have the flag PObj_data_is_PMC_array_FLAG set,
-         * marking is done internally in src/gc/api.c
-         */
+        /* don't pass that on */
     }
 
     VTABLE void destroy() {



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About