Author: jonathan
Date: Fri Jun  8 03:15:06 2007
New Revision: 18872

Modified:
   trunk/include/parrot/interpreter.h
   trunk/src/gc/dod.c
   trunk/src/global_setup.c
   trunk/src/pmc/pmcproxy.pmc

Log:
[PDD17] We need a place to hang an array of PMC Proxy objects off. Add one, 
init it and make sure it gets marked during GC.

Modified: trunk/include/parrot/interpreter.h
==============================================================================
--- trunk/include/parrot/interpreter.h  (original)
+++ trunk/include/parrot/interpreter.h  Fri Jun  8 03:15:06 2007
@@ -301,8 +301,9 @@
     struct Arenas *arena_base;                /* Pointer to this interpreter's
                                                * arena */
 
-    PMC *class_hash;                          /* Hash of classes */
+    PMC    *class_hash;                       /* Hash of classes */
     VTABLE **vtables;                         /* array of vtable ptrs */
+    PMC    *pmc_proxies;                      /* PMC array of PMC Proxy 
objects */
     int    n_vtable_max;                      /* highest used type */
     int    n_vtable_alloced;                  /* alloced vtable space */
 

Modified: trunk/src/gc/dod.c
==============================================================================
--- trunk/src/gc/dod.c  (original)
+++ trunk/src/gc/dod.c  Fri Jun  8 03:15:06 2007
@@ -284,6 +284,9 @@
     /* Now mark the class hash */
     pobject_lives(interp, (PObj *)interp->class_hash);
 
+    /* Mark the PMC Proxy PMC array. */
+    pobject_lives(interp, (PObj *)interp->pmc_proxies);
+
     /* Mark the registry if any */
     if (interp->DOD_registry)
         pobject_lives(interp, (PObj *)interp->DOD_registry);

Modified: trunk/src/global_setup.c
==============================================================================
--- trunk/src/global_setup.c    (original)
+++ trunk/src/global_setup.c    Fri Jun  8 03:15:06 2007
@@ -181,6 +181,8 @@
     interp->class_hash = classname_hash =
         pmc_new(interp, enum_class_NameSpace);
     Parrot_register_core_pmcs(interp, classname_hash);
+    /* Also a PMC array to store PMC Proxy objects. */
+    interp->pmc_proxies = pmc_new(interp, enum_class_ResizablePMCArray);
     /* init the interpreter globals array */
     iglobals = pmc_new(interp, enum_class_SArray);
     interp->iglobals = iglobals;

Modified: trunk/src/pmc/pmcproxy.pmc
==============================================================================
--- trunk/src/pmc/pmcproxy.pmc  (original)
+++ trunk/src/pmc/pmcproxy.pmc  Fri Jun  8 03:15:06 2007
@@ -11,7 +11,7 @@
 This class is used to describe a PMC. It can sit in an inheritance hierarchy
 of a PDD15 class as well as allowing introspection of the PMC.
 
-Class is not derived from any other PMC.
+PMCProxy is not derived from any other PMC.
 
 =head2 Structure
 

Reply via email to