[svn:parrot] r41491 - in branches/remove-next_for_GC: docs/pdds include/parrot src src/gc src/ops src/pmc
darbelo at svn.parrot.org
darbelo at svn.parrot.org
Sat Sep 26 04:41:39 UTC 2009
Author: darbelo
Date: Sat Sep 26 04:41:38 2009
New Revision: 41491
URL: https://trac.parrot.org/parrot/changeset/41491
Log:
Remove _next_for_GC and most mentions in inline comments.
Modified:
branches/remove-next_for_GC/docs/pdds/pdd17_pmc.pod
branches/remove-next_for_GC/include/parrot/gc_api.h
branches/remove-next_for_GC/include/parrot/pobj.h
branches/remove-next_for_GC/src/gc/api.c
branches/remove-next_for_GC/src/gc/system.c
branches/remove-next_for_GC/src/ops/set.ops
branches/remove-next_for_GC/src/pmc/continuation.pmc
branches/remove-next_for_GC/src/pmc/hash.pmc
branches/remove-next_for_GC/src/thread.c
Modified: branches/remove-next_for_GC/docs/pdds/pdd17_pmc.pod
==============================================================================
--- branches/remove-next_for_GC/docs/pdds/pdd17_pmc.pod Sat Sep 26 04:36:57 2009 (r41490)
+++ branches/remove-next_for_GC/docs/pdds/pdd17_pmc.pod Sat Sep 26 04:41:38 2009 (r41491)
@@ -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: branches/remove-next_for_GC/include/parrot/gc_api.h
==============================================================================
--- branches/remove-next_for_GC/include/parrot/gc_api.h Sat Sep 26 04:36:57 2009 (r41490)
+++ branches/remove-next_for_GC/include/parrot/gc_api.h Sat Sep 26 04:41:38 2009 (r41491)
@@ -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: branches/remove-next_for_GC/include/parrot/pobj.h
==============================================================================
--- branches/remove-next_for_GC/include/parrot/pobj.h Sat Sep 26 04:36:57 2009 (r41490)
+++ branches/remove-next_for_GC/include/parrot/pobj.h Sat Sep 26 04:41:38 2009 (r41491)
@@ -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: branches/remove-next_for_GC/src/gc/api.c
==============================================================================
--- branches/remove-next_for_GC/src/gc/api.c Sat Sep 26 04:36:57 2009 (r41490)
+++ branches/remove-next_for_GC/src/gc/api.c Sat Sep 26 04:41:38 2009 (r41491)
@@ -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)
Modified: branches/remove-next_for_GC/src/gc/system.c
==============================================================================
--- branches/remove-next_for_GC/src/gc/system.c Sat Sep 26 04:36:57 2009 (r41490)
+++ branches/remove-next_for_GC/src/gc/system.c Sat Sep 26 04:41:38 2009 (r41491)
@@ -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: branches/remove-next_for_GC/src/ops/set.ops
==============================================================================
--- branches/remove-next_for_GC/src/ops/set.ops Sat Sep 26 04:36:57 2009 (r41490)
+++ branches/remove-next_for_GC/src/ops/set.ops Sat Sep 26 04:41:38 2009 (r41491)
@@ -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: branches/remove-next_for_GC/src/pmc/continuation.pmc
==============================================================================
--- branches/remove-next_for_GC/src/pmc/continuation.pmc Sat Sep 26 04:36:57 2009 (r41490)
+++ branches/remove-next_for_GC/src/pmc/continuation.pmc Sat Sep 26 04:41:38 2009 (r41491)
@@ -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: branches/remove-next_for_GC/src/pmc/hash.pmc
==============================================================================
--- branches/remove-next_for_GC/src/pmc/hash.pmc Sat Sep 26 04:36:57 2009 (r41490)
+++ branches/remove-next_for_GC/src/pmc/hash.pmc Sat Sep 26 04:41:38 2009 (r41491)
@@ -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: branches/remove-next_for_GC/src/thread.c
==============================================================================
--- branches/remove-next_for_GC/src/thread.c Sat Sep 26 04:36:57 2009 (r41490)
+++ branches/remove-next_for_GC/src/thread.c Sat Sep 26 04:41:38 2009 (r41491)
@@ -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