[svn:parrot] r41510 - in trunk: . config/auto/sizes docs/book/draft docs/book/pct docs/dev docs/pdds examples/embed examples/languages/abc examples/languages/squaak examples/pge include/parrot ports/cpan ports/cygwin ports/debian ports/fedora ports/mandriva ports/suse runtime/parrot/languages runtime/parrot/library/Math src src/call src/gc src/interp src/ops src/pmc src/runcore t/compilers/tge t/oo t/pmc t/src tools/dev tools/util

darbelo at svn.parrot.org darbelo at svn.parrot.org
Sun Sep 27 02:32:33 UTC 2009


Author: darbelo
Date: Sun Sep 27 02:32:32 2009
New Revision: 41510
URL: https://trac.parrot.org/parrot/changeset/41510

Log:
Moerge remove-next_for_GC brach to trunk.

Modified:
   trunk/   (props changed)
   trunk/config/auto/sizes/intval_maxmin_c.in   (props changed)
   trunk/docs/book/draft/README   (props changed)
   trunk/docs/book/draft/appa_glossary.pod   (props changed)
   trunk/docs/book/draft/appb_patch_submission.pod   (props changed)
   trunk/docs/book/draft/appc_command_line_options.pod   (props changed)
   trunk/docs/book/draft/appd_build_options.pod   (props changed)
   trunk/docs/book/draft/appe_source_code.pod   (props changed)
   trunk/docs/book/draft/ch01_introduction.pod   (props changed)
   trunk/docs/book/draft/ch02_getting_started.pod   (props changed)
   trunk/docs/book/draft/ch07_dynpmcs.pod   (props changed)
   trunk/docs/book/draft/ch08_dynops.pod   (props changed)
   trunk/docs/book/draft/ch10_opcode_reference.pod   (props changed)
   trunk/docs/book/draft/ch11_directive_reference.pod   (props changed)
   trunk/docs/book/draft/ch12_operator_reference.pod   (props changed)
   trunk/docs/book/draft/chXX_hlls.pod   (props changed)
   trunk/docs/book/draft/chXX_library.pod   (props changed)
   trunk/docs/book/draft/chXX_testing_and_debugging.pod   (props changed)
   trunk/docs/book/pct/ch01_introduction.pod   (props changed)
   trunk/docs/book/pct/ch02_getting_started.pod   (props changed)
   trunk/docs/book/pct/ch03_compiler_tools.pod   (props changed)
   trunk/docs/book/pct/ch04_pge.pod   (props changed)
   trunk/docs/book/pct/ch05_nqp.pod   (props changed)
   trunk/docs/dev/c_functions.pod   (props changed)
   trunk/docs/dev/pmc_freeze.pod
   trunk/docs/pdds/pdd17_pmc.pod
   trunk/docs/pdds/pdd30_install.pod   (props changed)
   trunk/examples/embed/cotorra.c   (props changed)
   trunk/examples/languages/abc/   (props changed)
   trunk/examples/languages/squaak/   (props changed)
   trunk/examples/pge/demo.pir   (props changed)
   trunk/include/parrot/call.h   (props changed)
   trunk/include/parrot/gc_api.h   (contents, props changed)
   trunk/include/parrot/pobj.h
   trunk/include/parrot/runcore_api.h   (props changed)
   trunk/include/parrot/runcore_profiling.h   (props changed)
   trunk/include/parrot/runcore_trace.h   (props changed)
   trunk/ports/cpan/pause_guide.pod   (props changed)
   trunk/ports/cygwin/parrot-1.0.0-1.cygport   (props changed)
   trunk/ports/debian/libparrot-dev.install.in   (props changed)
   trunk/ports/debian/libparrot.install.in   (props changed)
   trunk/ports/debian/parrot-doc.install.in   (props changed)
   trunk/ports/debian/parrot.install.in   (props changed)
   trunk/ports/fedora/parrot.spec.fedora   (props changed)
   trunk/ports/mandriva/parrot.spec.mandriva   (props changed)
   trunk/ports/suse/parrot.spec.suse   (props changed)
   trunk/runtime/parrot/languages/   (props changed)
   trunk/runtime/parrot/library/Math/Rand.pir   (props changed)
   trunk/src/call/ops.c   (props changed)
   trunk/src/call/pcc.c   (props changed)
   trunk/src/gc/alloc_memory.c   (props changed)
   trunk/src/gc/alloc_resources.c   (props changed)
   trunk/src/gc/api.c   (contents, props changed)
   trunk/src/gc/gc_ms.c
   trunk/src/gc/gc_private.h
   trunk/src/gc/malloc.c   (props changed)
   trunk/src/gc/malloc_trace.c   (props changed)
   trunk/src/gc/mark_sweep.c   (contents, props changed)
   trunk/src/gc/system.c   (contents, props changed)
   trunk/src/interp/inter_cb.c   (props changed)
   trunk/src/interp/inter_create.c   (props changed)
   trunk/src/interp/inter_misc.c   (props changed)
   trunk/src/ops/set.ops
   trunk/src/pmc/continuation.pmc
   trunk/src/pmc/hash.pmc
   trunk/src/pmc_freeze.c
   trunk/src/runcore/cores.c   (props changed)
   trunk/src/runcore/main.c   (props changed)
   trunk/src/runcore/profiling.c   (props changed)
   trunk/src/runcore/trace.c   (props changed)
   trunk/src/thread.c
   trunk/t/compilers/tge/NoneGrammar.tg   (props changed)
   trunk/t/oo/root_new.t   (props changed)
   trunk/t/pmc/namespace-old.t   (props changed)
   trunk/t/src/embed.t   (props changed)
   trunk/tools/dev/fetch_languages.pl   (props changed)
   trunk/tools/dev/mk_gitignore.pl   (props changed)
   trunk/tools/util/perlcritic-cage.conf   (props changed)

Modified: trunk/docs/dev/pmc_freeze.pod
==============================================================================
--- trunk/docs/dev/pmc_freeze.pod	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/docs/dev/pmc_freeze.pod	Sun Sep 27 02:32:32 2009	(r41510)
@@ -82,27 +82,10 @@
 to the desired functionality. It gets passed on to all vtable methods and
 callback functions.
 
-=head2 Working loops
-
-These are labeled B<visit_loop_*>. There are currently two schemes to handle
-the B<todo_list>.
+=head2 Working loop
 
 =over 4
 
-=item next_for_GC
-
-All PMCs that can contain other PMCs have the B<next_for_GC> pointer in the
-PMC's extended data area. The B<todo_list> gets built by appending (or        
-prepending) the current PMC to a B<mark_ptr>, which then points to the current
-PMC, forming a linked list of items.
-
-This pointer is also used during GC's B<mark()> functionality, so that
-GC has to be turned off during operations using this scheme.
-
-As the B<next_for_GC> pointer is inside the PMC, this scheme isn't thread-safe
-at low-level, because shared PMCs also would share this pointer, so that there
-can be only one operation at a time.
-
 =item todo list
 
 A B<List> called B<todo> holds items still to be worked on. This method is
@@ -151,41 +134,6 @@
 overhead, 32-bit system assumed). Hash lookups also take a considerable
 amount of time.
 
-=item B<next_for_GC>
-
-The pointer used for the B<todo_list> handling itself can serve as a marker
-that this item was already processed. There are some issues with this though:
-Plain scalars (not being able to contain other PMCs) don't have a
-B<next_for_GC> pointer. This is an optimization reducing the size of scalars
-and increasing performance considerably.
-
-Second, the B<next_for_GC> pointers have to be cleared beforehand. GC uses
-only a nibble-sized flag area located inside the PMCs arena to manage, if a PMC
-was seen already by checking the live bit. The B<next_for_GC> pointer is just
-set and never cleared to avoid touching a PMCs memory and polluting caches when
-possible.
-
-Finally, generating a PMC's B<id> isn't as simple as just incrementing a
-counter used with the B<seen> hash approach.
-
-=item PMC B<id>s
-
-We could of course use the PMC's address as its own B<id>, since we know it is
-unique. However, this is suboptimal for thawing.  To manage duplicates during
-B<thaw> we basically need a mapping B<PMC_in_image =E<gt>
-newly_constructed_PMC>. When now the B<PMC_in_image> (the B<id>) is the
-address, we have to use a hash again, for B<thaw()> with all the negative
-impact on resources and speed.
-
-So both schemes are using small B<id> values and the seen handling inside
-B<thaw> is done via a list lookup, which is a lot faster and takes less
-resources.
-
-The B<seen> hash approach just has a counter for PMC B<id>s, the B<next_for_GC>
-approach calculates the B<id> from the address of the PMC in its arena, again
-yielding a small and unique number. The two low bits of PMC B<id>s are used as
-flags.
-
 =back
 
 =head2 The actual action

Modified: trunk/docs/pdds/pdd17_pmc.pod
==============================================================================
--- trunk/docs/pdds/pdd17_pmc.pod	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/docs/pdds/pdd17_pmc.pod	Sun Sep 27 02:32:32 2009	(r41510)
@@ -49,7 +49,6 @@
         DPOINTER *data;
         PMC *_metadata;
         struct _Sync *_synchronize;    # [Note: may be deprecated, see STM]
-        PMC *_next_for_GC;
     }
 
 C<flags> holds a set of flags associated with the PMC; these are documented
@@ -69,9 +68,6 @@
 
 C<_synchronize> is for access synchronization between shared PMCs.
 
-C<_next_for_GC> determines the next PMC in the 'used' list during dead object
-detection in the GC.
-
 PMCs are used to implement the basic data types of the high level languages
 running on top of Parrot. For instance, a Perl 5 C<SV> will map onto one (or
 more) types of PMC, while particular Python datatypes will map onto different

Modified: trunk/include/parrot/gc_api.h
==============================================================================
--- trunk/include/parrot/gc_api.h	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/include/parrot/gc_api.h	Sun Sep 27 02:32:32 2009	(r41510)
@@ -179,9 +179,6 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*str);
 
-void Parrot_gc_cleanup_next_for_GC(PARROT_INTERP)
-        __attribute__nonnull__(1);
-
 void Parrot_gc_compact_memory_pool(PARROT_INTERP)
         __attribute__nonnull__(1);
 
@@ -365,8 +362,6 @@
      __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     && PARROT_ASSERT_ARG(str)
-#define ASSERT_ARGS_Parrot_gc_cleanup_next_for_GC __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_Parrot_gc_compact_memory_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_Parrot_gc_completely_unblock __attribute__unused__ int _ASSERT_ARGS_CHECK = \

Modified: trunk/include/parrot/pobj.h
==============================================================================
--- trunk/include/parrot/pobj.h	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/include/parrot/pobj.h	Sun Sep 27 02:32:32 2009	(r41510)
@@ -107,24 +107,6 @@
      * s. parrot/thread.h
      */
     struct _Sync *_synchronize;
-
-    /* This flag determines the next PMC in the 'used' list during
-       dead object detection in the GC. It is a linked list, which is
-       only valid in trace_active_PMCs. Also, the linked list is
-       guaranteed to have the tail element's _next_for_GC point to itself,
-       which makes much of the logic and checks simpler. We then have to
-       check for PMC->_next_for_GC == PMC to find the end of list. */
-    PMC *_next_for_GC;
-
-    /* Yeah, the GC data should be out of
-       band, but that makes things really slow when actually marking
-       things for the GC runs. Unfortunately putting this here makes
-       marking things clear for the GC pre-run slow as well, as we need
-       to touch all the PMC structs. (Though we will for flag setting
-       anyway) We can potentially make this a pointer to the real GC
-       stuff, which'd merit an extra dereference when setting, but let
-       us memset the actual GC data in a big block
-    */
 };
 
 #define PMC_data(pmc)                   (pmc)->data
@@ -133,7 +115,6 @@
 #define PMC_data0(pmc)            (1 ? (pmc)->data : 0)
 #define PMC_data0_typed(pmc)      (type)(1 ? (pmc)->data : 0)
 #define PMC_metadata(pmc)         ((pmc)->_metadata)
-#define PMC_next_for_GC(pmc)      ((pmc)->_next_for_GC)
 #define PMC_sync(pmc)             ((pmc)->_synchronize)
 
 #define POBJ_FLAG(n) ((UINTVAL)1 << (n))

Modified: trunk/src/gc/api.c
==============================================================================
--- trunk/src/gc/api.c	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/gc/api.c	Sun Sep 27 02:32:32 2009	(r41510)
@@ -101,9 +101,6 @@
 /* HEADERIZER BEGIN: static */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
-static void cleanup_next_for_GC_pool(ARGIN(Fixed_Size_Pool *pool))
-        __attribute__nonnull__(1);
-
 static void fix_pmc_syncs(
     ARGMOD(Interp *dest_interp),
     ARGIN(Fixed_Size_Pool *pool))
@@ -147,8 +144,6 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*pool);
 
-#define ASSERT_ARGS_cleanup_next_for_GC_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(pool)
 #define ASSERT_ARGS_fix_pmc_syncs __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(dest_interp) \
     && PARROT_ASSERT_ARG(pool)
@@ -1318,54 +1313,6 @@
 
 /*
 
-=item C<void Parrot_gc_cleanup_next_for_GC(PARROT_INTERP)>
-
-Cleans up the C<next_for_GC> pointers. Sets all of them in the PMC and Constant
-PMC pools to NULL.
-
-=cut
-
-*/
-
-void
-Parrot_gc_cleanup_next_for_GC(PARROT_INTERP)
-{
-    ASSERT_ARGS(Parrot_gc_cleanup_next_for_GC)
-    cleanup_next_for_GC_pool(interp->mem_pools->pmc_pool);
-    cleanup_next_for_GC_pool(interp->mem_pools->constant_pmc_pool);
-}
-
-/*
-
-=item C<static void cleanup_next_for_GC_pool(Fixed_Size_Pool *pool)>
-
-Sets all the C<next_for_GC> pointers to C<NULL>.
-
-=cut
-
-*/
-
-static void
-cleanup_next_for_GC_pool(ARGIN(Fixed_Size_Pool *pool))
-{
-    ASSERT_ARGS(cleanup_next_for_GC_pool)
-    Fixed_Size_Arena *arena;
-
-    for (arena = pool->last_Arena; arena; arena = arena->prev) {
-        PMC *p = (PMC *)arena->start_objects;
-        UINTVAL i;
-
-        for (i = 0; i < arena->used; i++) {
-            if (!PObj_on_free_list_TEST(p)) {
-                PMC_next_for_GC(p) = PMCNULL;
-            }
-            p++;
-        }
-    }
-}
-
-/*
-
 =item C<int Parrot_gc_active_sized_buffers(PARROT_INTERP)>
 
 Returns the number of actively used sized buffers.

Modified: trunk/src/gc/gc_ms.c
==============================================================================
--- trunk/src/gc/gc_ms.c	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/gc/gc_ms.c	Sun Sep 27 02:32:32 2009	(r41510)
@@ -250,12 +250,14 @@
 gc_ms_trace_active_PMCs(PARROT_INTERP, Parrot_gc_trace_type trace)
 {
     ASSERT_ARGS(gc_ms_trace_active_PMCs)
+
     if (!Parrot_gc_trace_root(interp, trace))
         return 0;
 
-    /* Okay, we've marked the whole root set, and should have a good-sized
-     * list of things to look at. Run through it */
-    return Parrot_gc_trace_children(interp, (size_t) -1);
+    pt_gc_mark_root_finished(interp);
+    interp->mem_pools->gc_trace_ptr  = NULL;
+    return 1;
+
 }
 
 /*

Modified: trunk/src/gc/gc_private.h
==============================================================================
--- trunk/src/gc/gc_private.h	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/gc/gc_private.h	Sun Sep 27 02:32:32 2009	(r41510)
@@ -360,9 +360,6 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*pool);
 
-int Parrot_gc_trace_children(PARROT_INTERP, size_t how_many)
-        __attribute__nonnull__(1);
-
 int Parrot_gc_trace_root(PARROT_INTERP, Parrot_gc_trace_type trace)
         __attribute__nonnull__(1);
 
@@ -407,8 +404,6 @@
 #define ASSERT_ARGS_Parrot_gc_sweep_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     && PARROT_ASSERT_ARG(pool)
-#define ASSERT_ARGS_Parrot_gc_trace_children __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_Parrot_gc_trace_root __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */

Modified: trunk/src/gc/mark_sweep.c
==============================================================================
--- trunk/src/gc/mark_sweep.c	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/gc/mark_sweep.c	Sun Sep 27 02:32:32 2009	(r41510)
@@ -410,16 +410,18 @@
             interp->mem_pools->gc_mark_ptr = obj;
     }
 
-    /* put it on the end of the list */
-    PMC_next_for_GC(interp->mem_pools->gc_mark_ptr) = obj;
+    PObj_get_FLAGS(obj) |= PObj_custom_GC_FLAG;
 
-    /* Explicitly make the tail of the linked list self-referential */
-    interp->mem_pools->gc_mark_ptr = PMC_next_for_GC(obj) = obj;
+    /* clearing the flag is much more expensive then testing */
+    if (!PObj_needs_early_gc_TEST(obj))
+        PObj_high_priority_gc_CLEAR(obj);
+
+    /* mark properties */
+    Parrot_gc_mark_PMC_alive(interp, PMC_metadata(obj));
 
     if (PObj_custom_mark_TEST(obj)) {
-        PObj_get_FLAGS(obj) |= PObj_custom_GC_FLAG;
-        if (!PObj_constant_TEST(obj))
-            VTABLE_mark(interp, obj);
+        PARROT_ASSERT(!PObj_on_free_list_TEST(obj));
+        VTABLE_mark(interp, obj);
     }
 }
 
@@ -458,77 +460,6 @@
 
 /*
 
-=item C<int Parrot_gc_trace_children(PARROT_INTERP, size_t how_many)>
-
-Traces through the linked list formed by the C<next_for_GC> pointer.
-Returns 0 if this is a lazy GC run and we've found all impatient PMCs.
-Returns 1 if we've traced the entire list.
-
-=cut
-
-*/
-
-int
-Parrot_gc_trace_children(PARROT_INTERP, size_t how_many)
-{
-    ASSERT_ARGS(Parrot_gc_trace_children)
-    Memory_Pools * const mem_pools = interp->mem_pools;
-    const int      lazy_gc    = mem_pools->lazy_gc;
-    PMC           *current    = mem_pools->gc_mark_start;
-
-    /*
-     * First phase of mark is finished. Now if we are the owner
-     * of a shared pool, we must run the mark phase of other
-     * interpreters in our pool, so that live shared PMCs in that
-     * interpreter are appended to our mark_ptrs chain.
-     *
-     * If there is a count of shared PMCs and we have already seen
-     * all these, we could skip that.
-     */
-    pt_gc_mark_root_finished(interp);
-
-    do {
-        PMC *next;
-
-        if (lazy_gc && mem_pools->num_early_PMCs_seen >=
-                mem_pools->num_early_gc_PMCs) {
-            return 0;
-        }
-
-        PARROT_ASSERT(current);
-        mem_pools->gc_trace_ptr = current;
-
-        /* short-term hack to color objects black */
-        PObj_get_FLAGS(current) |= PObj_custom_GC_FLAG;
-
-        /* clearing the flag is much more expensive then testing */
-        if (!PObj_needs_early_gc_TEST(current))
-            PObj_high_priority_gc_CLEAR(current);
-
-        /* mark properties */
-        Parrot_gc_mark_PMC_alive(interp, PMC_metadata(current));
-
-        if (PObj_custom_mark_TEST(current)) {
-            PARROT_ASSERT(!PObj_on_free_list_TEST(current));
-            VTABLE_mark(interp, current);
-        }
-
-        next = PMC_next_for_GC(current);
-
-        if (!PMC_IS_NULL(next) && next == current)
-            break;
-
-        current = next;
-    } while (--how_many > 0);
-
-    mem_pools->gc_mark_start = current;
-    mem_pools->gc_trace_ptr  = NULL;
-
-    return 1;
-}
-
-/*
-
 =item C<void Parrot_add_to_free_list(PARROT_INTERP, Fixed_Size_Pool *pool,
 Fixed_Size_Arena *arena)>
 

Modified: trunk/src/gc/system.c
==============================================================================
--- trunk/src/gc/system.c	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/gc/system.c	Sun Sep 27 02:32:32 2009	(r41510)
@@ -451,9 +451,6 @@
              * free headers... */
             if (pmc_min <= ptr && ptr < pmc_max &&
                     is_pmc_ptr(interp, (void *)ptr)) {
-                /* ...so ensure that Parrot_gc_mark_PObj_alive checks PObj_on_free_list_FLAG
-                 * before adding it to the next_for_GC list, to have
-                 * vtable->mark() called. */
                 Parrot_gc_mark_PObj_alive(interp, (PObj *)ptr);
             }
             else if (buffer_min <= ptr && ptr < buffer_max &&

Modified: trunk/src/ops/set.ops
==============================================================================
--- trunk/src/ops/set.ops	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/ops/set.ops	Sun Sep 27 02:32:32 2009	(r41510)
@@ -514,7 +514,6 @@
         PMC_data(clone)        = NULL;
         PMC_sync(clone)        = NULL;
         PMC_metadata(clone)    = NULL;
-        PMC_next_for_GC(clone) = NULL;
 
         /* Restore metadata. */
         if (!PMC_IS_NULL(meta)) {

Modified: trunk/src/pmc/continuation.pmc
==============================================================================
--- trunk/src/pmc/continuation.pmc	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/pmc/continuation.pmc	Sun Sep 27 02:32:32 2009	(r41510)
@@ -41,8 +41,6 @@
  * A Continuation (and RetContinuation, ExceptionHandler) has in its
  * context a pointer to the register frame, which contains active objects.
  * Additionally ct->current_cont has the continuation of the caller.
- * To avoid deep recursion during marking of nested subroutines, we
- * need the next_for_GC pointer.
  */
 
 pmclass Continuation auto_attrs {

Modified: trunk/src/pmc/hash.pmc
==============================================================================
--- trunk/src/pmc/hash.pmc	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/pmc/hash.pmc	Sun Sep 27 02:32:32 2009	(r41510)
@@ -372,10 +372,6 @@
     return ret;
 }
 
-
-/* Needs ext struct for the next_for_GC pointer
- * We would get recursive marking of a deeply nested HoHoH...
- */
 pmclass Hash provides hash auto_attrs {
     ATTR Hash *hash;
 

Modified: trunk/src/pmc_freeze.c
==============================================================================
--- trunk/src/pmc_freeze.c	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/pmc_freeze.c	Sun Sep 27 02:32:32 2009	(r41510)
@@ -8,11 +8,6 @@
 
 =head1 DESCRIPTION
 
-Freeze uses the C<next_for_GC pointer()> to remember seen PMCs. PMCs are
-written as IDs (or tags), which are calculated from their arena address.
-This PMC number is multiplied by four. The 2 low bits indicate a seen
-PMC or a PMC of the same type as the previous one respectively.
-
 Thawing PMCs uses a list with (maximum) size of the amount of PMCs to
 keep track of retrieved PMCs.
 

Modified: trunk/src/thread.c
==============================================================================
--- trunk/src/thread.c	Sun Sep 27 02:23:32 2009	(r41509)
+++ trunk/src/thread.c	Sun Sep 27 02:32:32 2009	(r41510)
@@ -1620,8 +1620,7 @@
 =item C<void pt_gc_start_mark(PARROT_INTERP)>
 
 Record that the mark phase of GC is about to begin. In the presence of shared
-PMCs, we can only run one GC run at a time because C<< PMC->next_for_GC >> may
-be changed.
+PMCs, we can only run one GC run at a time.
 
 C<flags> are the GC flags. We check if we need to collect shared objects or
 not.
@@ -1696,8 +1695,7 @@
 
     DEBUG_ONLY(fprintf(stderr, "actually mark\n"));
     /*
-     * We can't allow parallel running GCs; both would mess with shared PMCs'
-     * next_for_GC pointers
+     * We can't allow parallel running GCs.
      */
     LOCK(interpreter_array_mutex);
     DEBUG_ONLY(fprintf(stderr, "got marking lock\n"));


More information about the parrot-commits mailing list