[svn:parrot] r41155 - in branches/gc-refactor: docs/pdds include/parrot src src/gc
jrtayloriv at svn.parrot.org
jrtayloriv at svn.parrot.org
Tue Sep 8 14:10:34 UTC 2009
Author: jrtayloriv
Date: Tue Sep 8 14:10:29 2009
New Revision: 41155
URL: https://trac.parrot.org/parrot/changeset/41155
Log:
Fixed coding standards errors and removed leftover write barrier checks (bacek++)
Modified:
branches/gc-refactor/docs/pdds/pdd09_gc.pod
branches/gc-refactor/include/parrot/gc_api.h
branches/gc-refactor/include/parrot/interpreter.h
branches/gc-refactor/src/gc/api.c
branches/gc-refactor/src/gc/gc_private.h
branches/gc-refactor/src/hash.c
branches/gc-refactor/src/pmc_freeze.c
Modified: branches/gc-refactor/docs/pdds/pdd09_gc.pod
==============================================================================
--- branches/gc-refactor/docs/pdds/pdd09_gc.pod Tue Sep 8 08:39:49 2009 (r41154)
+++ branches/gc-refactor/docs/pdds/pdd09_gc.pod Tue Sep 8 14:10:29 2009 (r41155)
@@ -350,7 +350,8 @@
=head4 Memory_Pools structure function pointers
-Each GC system declares 3 function pointers, stored in the Memory_Pools structure.
+Each GC system declares 3 function pointers, stored in the Memory_Pools
+structure.
=over 4
Modified: branches/gc-refactor/include/parrot/gc_api.h
==============================================================================
--- branches/gc-refactor/include/parrot/gc_api.h Tue Sep 8 08:39:49 2009 (r41154)
+++ branches/gc-refactor/include/parrot/gc_api.h Tue Sep 8 14:10:29 2009 (r41155)
@@ -311,17 +311,6 @@
int Parrot_gc_total_sized_buffers(PARROT_INTERP)
__attribute__nonnull__(1);
-void Parrot_gc_write_barrier(PARROT_INTERP, PMC *agg, PMC *old, PMC *new)
- __attribute__nonnull__(1);
-
-void Parrot_gc_write_barrier_key(PARROT_INTERP,
- PMC *agg,
- PMC *old,
- PObj *old_key,
- PMC *_new,
- PObj *new_key)
- __attribute__nonnull__(1);
-
#define ASSERT_ARGS_Parrot_block_GC_mark __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_block_GC_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -454,10 +443,6 @@
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_gc_total_sized_buffers __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_gc_write_barrier __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_gc_write_barrier_key __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/gc/api.c */
Modified: branches/gc-refactor/include/parrot/interpreter.h
==============================================================================
--- branches/gc-refactor/include/parrot/interpreter.h Tue Sep 8 08:39:49 2009 (r41154)
+++ branches/gc-refactor/include/parrot/interpreter.h Tue Sep 8 14:10:29 2009 (r41155)
@@ -195,7 +195,7 @@
struct Memory_Pools *mem_pools; /* Pointer to this interpreter's
* arena */
- struct GC_Subsystem *gc_sys; /*functions and data specific
+ struct GC_Subsystem *gc_sys; /*functions and data specific
to current GC subsystem*/
PMC *gc_registry; /* root set of registered PMCs */
Modified: branches/gc-refactor/src/gc/api.c
==============================================================================
--- branches/gc-refactor/src/gc/api.c Tue Sep 8 08:39:49 2009 (r41154)
+++ branches/gc-refactor/src/gc/api.c Tue Sep 8 14:10:29 2009 (r41155)
@@ -198,40 +198,40 @@
/* TODO: Have each core register a ->pobject_lives function pointer in the
Memory_Pools struct, and call that pointer directly instead of having a messy
set of #if preparser conditions. */
-
+
/* if object is live or on free list return */
if (PObj_is_live_or_free_TESTALL(obj))
return;
-# if ! DISABLE_GC_DEBUG
-# if GC_VERBOSE
+#if ! DISABLE_GC_DEBUG
+# if GC_VERBOSE
if (CONSERVATIVE_POINTER_CHASING)
fprintf(stderr, "GC Warning! Unanchored %s %p found in system areas \n",
PObj_is_PMC_TEST(obj) ? "PMC" : "Buffer", obj);
-
-# endif
+
# endif
+#endif
/* mark it live */
PObj_live_SET(obj);
-
+
/* if object is a PMC and contains buffers or PMCs, then attach the PMC
* to the chained mark list. */
if (PObj_is_PMC_TEST(obj)) {
PMC * const p = (PMC *)obj;
-
+
if (PObj_is_special_PMC_TEST(obj))
mark_special(interp, p);
-
+
else if (PMC_metadata(p))
Parrot_gc_mark_PObj_alive(interp, (PObj*)PMC_metadata(p));
}
-# if GC_VERBOSE
+#if GC_VERBOSE
/* buffer GC_DEBUG stuff */
if (GC_DEBUG(interp) && PObj_report_TEST(obj))
fprintf(stderr, "GC: buffer %p pointing to %p marked live\n",
obj, Buffer_bufstart((Buffer *)obj));
-# endif
-
+#endif
+
}
/*
@@ -265,11 +265,11 @@
interp->gc_sys = mem_allocate_zeroed_typed(GC_Subsystem);
/*TODO: add ability to specify GC core at command line w/ --gc= */
- if(0) /*If they chose sys_type with the --gc command line switch,*/
+ if (0) /*If they chose sys_type with the --gc command line switch,*/
; /* set sys_type to value they gave */
else
interp->gc_sys->sys_type = PARROT_GC_DEFAULT_TYPE;
-
+
/*Call appropriate initialization function for GC subsystem*/
switch (interp->gc_sys->sys_type) {
case MS:
Modified: branches/gc-refactor/src/gc/gc_private.h
==============================================================================
--- branches/gc-refactor/src/gc/gc_private.h Tue Sep 8 08:39:49 2009 (r41154)
+++ branches/gc-refactor/src/gc/gc_private.h Tue Sep 8 14:10:29 2009 (r41155)
@@ -107,7 +107,7 @@
union { /* Holds system-specific data structures*/
struct gc_gms_sys_data gms_data;
} gc_sys_data;
-
+
/** Function hooks that each subsystem MUST provide */
void (*do_gc_mark)(PARROT_INTERP, UINTVAL flags);
void (*finalize_gc_system) (PARROT_INTERP);
@@ -175,7 +175,7 @@
struct Variable_Size_Pool *mem_pool;
/* Size in bytes of an individual pool item. This size may include
* a GC-system specific GC header. (e.g. GMS headers) */
- size_t object_size;
+ size_t object_size;
size_t start_arena_memory;
size_t end_arena_memory;
@@ -192,10 +192,10 @@
int skip;
size_t replenish_level;
- add_free_object_fn_type add_free_object; /* adds a free object to
+ add_free_object_fn_type add_free_object; /* adds a free object to
the pool's free list */
- get_free_object_fn_type get_free_object; /* gets and removes a free
- object from the pool's
+ get_free_object_fn_type get_free_object; /* gets and removes a free
+ object from the pool's
free list */
alloc_objects_fn_type alloc_objects; /* allocates more objects */
alloc_objects_fn_type more_objects;
Modified: branches/gc-refactor/src/hash.c
==============================================================================
--- branches/gc-refactor/src/hash.c Tue Sep 8 08:39:49 2009 (r41154)
+++ branches/gc-refactor/src/hash.c Tue Sep 8 14:10:29 2009 (r41155)
@@ -1302,11 +1302,8 @@
bucket = bucket->next;
}
- if (bucket) {
- if (hash->entry_type == enum_type_PMC && hash->container) {
- }
+ if (bucket)
bucket->value = value;
- }
else {
bucket = hash->free_list;
Modified: branches/gc-refactor/src/pmc_freeze.c
==============================================================================
--- branches/gc-refactor/src/pmc_freeze.c Tue Sep 8 08:39:49 2009 (r41154)
+++ branches/gc-refactor/src/pmc_freeze.c Tue Sep 8 14:10:29 2009 (r41155)
@@ -1399,14 +1399,6 @@
#else
PARROT_ASSERT(must_have_seen);
#endif
- /*
- * that's a duplicate
- if (info->container){
- if (interp->gc_sys->write_barrier){
- Parrot_gc_write_barrier(interp, info->container, NULL, pmc);
- }
- }
- */
*info->thaw_ptr = pmc;
return;
}
More information about the parrot-commits
mailing list