[svn:parrot] r38574 - in branches/gc_api: docs/pdds include/parrot src src/gc src/interp src/ops src/pmc src/runcore src/string
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Fri May 8 01:28:31 UTC 2009
Author: whiteknight
Date: Fri May 8 01:28:30 2009
New Revision: 38574
URL: https://trac.parrot.org/parrot/changeset/38574
Log:
[gc_api] rename Parrot_do_gc_run to Parrot_gc_mark_and_sweep
Modified:
branches/gc_api/docs/pdds/pdd09_gc.pod
branches/gc_api/include/parrot/gc_api.h
branches/gc_api/src/gc/api.c
branches/gc_api/src/gc/generational_ms.c
branches/gc_api/src/gc/incremental_ms.c
branches/gc_api/src/gc/mark_sweep.c
branches/gc_api/src/gc/resources.c
branches/gc_api/src/interp/inter_create.c
branches/gc_api/src/ops/core.ops
branches/gc_api/src/pmc/filehandle.pmc
branches/gc_api/src/pmc/parrotinterpreter.pmc
branches/gc_api/src/pmc_freeze.c
branches/gc_api/src/runcore/cores.c
branches/gc_api/src/string/api.c
Modified: branches/gc_api/docs/pdds/pdd09_gc.pod
==============================================================================
--- branches/gc_api/docs/pdds/pdd09_gc.pod Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/docs/pdds/pdd09_gc.pod Fri May 8 01:28:30 2009 (r38574)
@@ -380,7 +380,7 @@
For a concurrent collector, calls to this function may activate a concurrent
collection thread or, if such a thread is already running, do nothing at all.
-The C<do_gc_mark> function is called from the C<Parrot_do_gc_run> function,
+The C<do_gc_mark> function is called from the C<Parrot_gc_mark_and_sweep> function,
and should not usually be called directly.
C<flags> is one of:
Modified: branches/gc_api/include/parrot/gc_api.h
==============================================================================
--- branches/gc_api/include/parrot/gc_api.h Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/include/parrot/gc_api.h Fri May 8 01:28:30 2009 (r38574)
@@ -55,7 +55,7 @@
/* HEADERIZER BEGIN: src/gc/api.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-void Parrot_do_gc_run(PARROT_INTERP, UINTVAL flags)
+void Parrot_gc_mark_and_sweep(PARROT_INTERP, UINTVAL flags)
__attribute__nonnull__(1);
void Parrot_gc_add_pmc_ext(PARROT_INTERP, ARGMOD(PMC *pmc))
@@ -95,7 +95,7 @@
STRING * Parrot_gc_new_string_header(PARROT_INTERP, UINTVAL flags)
__attribute__nonnull__(1);
-#define ASSERT_ARGS_Parrot_do_gc_run __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_gc_mark_and_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_gc_add_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
Modified: branches/gc_api/src/gc/api.c
==============================================================================
--- branches/gc_api/src/gc/api.c Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/gc/api.c Fri May 8 01:28:30 2009 (r38574)
@@ -301,7 +301,7 @@
/*
-=item C<void Parrot_do_gc_run(PARROT_INTERP, UINTVAL flags)>
+=item C<void Parrot_gc_mark_and_sweep(PARROT_INTERP, UINTVAL flags)>
Calls the configured garbage collector to find and reclaim unused
headers.
@@ -311,9 +311,9 @@
*/
void
-Parrot_do_gc_run(PARROT_INTERP, UINTVAL flags)
+Parrot_gc_mark_and_sweep(PARROT_INTERP, UINTVAL flags)
{
- ASSERT_ARGS(Parrot_do_gc_run)
+ ASSERT_ARGS(Parrot_gc_mark_and_sweep)
interp->arena_base->do_gc_mark(interp, flags);
parrot_gc_context(interp);
}
Modified: branches/gc_api/src/gc/generational_ms.c
==============================================================================
--- branches/gc_api/src/gc/generational_ms.c Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/gc/generational_ms.c Fri May 8 01:28:30 2009 (r38574)
@@ -744,7 +744,7 @@
if (pool->skip)
pool->skip = 0;
else if (pool->last_Arena) {
- Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
if (pool->num_free_objects <= pool->replenish_level)
pool->skip = 1;
}
@@ -1815,7 +1815,7 @@
=item C<static void parrot_gc_gms_run(PARROT_INTERP, UINTVAL flags)>
-Interface to C<Parrot_do_gc_run>. C<flags> is one of:
+Interface to C<Parrot_gc_mark_and_sweep>. C<flags> is one of:
GC_lazy_FLAG ... timely destruction
GC_finish_FLAG ... run a final sweep to destruct objects at
Modified: branches/gc_api/src/gc/incremental_ms.c
==============================================================================
--- branches/gc_api/src/gc/incremental_ms.c Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/gc/incremental_ms.c Fri May 8 01:28:30 2009 (r38574)
@@ -1011,7 +1011,7 @@
=item C<static void parrot_gc_ims_run(PARROT_INTERP, UINTVAL flags)>
-Interface to C<Parrot_do_gc_run>. C<flags> is one of:
+Interface to C<Parrot_gc_mark_and_sweep>. C<flags> is one of:
GC_lazy_FLAG ... timely destruction
GC_finish_FLAG ... run until live bits are clear
Modified: branches/gc_api/src/gc/mark_sweep.c
==============================================================================
--- branches/gc_api/src/gc/mark_sweep.c Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/gc/mark_sweep.c Fri May 8 01:28:30 2009 (r38574)
@@ -765,14 +765,14 @@
Small_Object_Arena * const arena = pool->last_Arena;
if (arena) {
if (arena->used == arena->total_objects)
- Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
if (pool->num_free_objects <= pool->replenish_level)
pool->skip = 1;
}
}
- /* requires that num_free_objects be updated in Parrot_do_gc_run. If gc
+ /* requires that num_free_objects be updated in Parrot_gc_mark_and_sweep. If gc
* is disabled, then we must check the free list directly. */
if (!pool->free_list)
(*pool->alloc_objects) (interp, pool);
Modified: branches/gc_api/src/gc/resources.c
==============================================================================
--- branches/gc_api/src/gc/resources.c Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/gc/resources.c Fri May 8 01:28:30 2009 (r38574)
@@ -249,7 +249,7 @@
*/
if (!interp->arena_base->gc_mark_block_level
&& interp->arena_base->mem_allocs_since_last_collect) {
- Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
#if !PARROT_GC_IMS
/* Compact the pool if allowed and worthwhile */
if (pool->compact) {
Modified: branches/gc_api/src/interp/inter_create.c
==============================================================================
--- branches/gc_api/src/interp/inter_create.c Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/interp/inter_create.c Fri May 8 01:28:30 2009 (r38574)
@@ -348,7 +348,7 @@
if (interp->thread_data)
interp->thread_data->state |= THREAD_STATE_SUSPENDED_GC;
- Parrot_do_gc_run(interp, GC_finish_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_finish_FLAG);
/*
* that doesn't get rid of constant PMCs like these in vtable->data
Modified: branches/gc_api/src/ops/core.ops
==============================================================================
--- branches/gc_api/src/ops/core.ops Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/ops/core.ops Fri May 8 01:28:30 2009 (r38574)
@@ -1245,10 +1245,10 @@
op sweep(inconst INT) {
if ($1)
- Parrot_do_gc_run(interp, 0);
+ Parrot_gc_mark_and_sweep(interp, 0);
else
if (interp->arena_base->num_early_gc_PMCs)
- Parrot_do_gc_run(interp, GC_lazy_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_lazy_FLAG);
}
=item B<collect>()
Modified: branches/gc_api/src/pmc/filehandle.pmc
==============================================================================
--- branches/gc_api/src/pmc/filehandle.pmc Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/pmc/filehandle.pmc Fri May 8 01:28:30 2009 (r38574)
@@ -509,7 +509,7 @@
#if ! DISABLE_GC_DEBUG
/* trigger GC for debug - but not during tests */
if (0 && GC_DEBUG(interp))
- Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
#endif
if (Parrot_io_is_encoding(interp, SELF, CONST_STRING(interp, "utf8")))
Modified: branches/gc_api/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/gc_api/src/pmc/parrotinterpreter.pmc Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/pmc/parrotinterpreter.pmc Fri May 8 01:28:30 2009 (r38574)
@@ -757,7 +757,7 @@
}
METHOD run_gc() {
- Parrot_do_gc_run(PMC_interp(SELF), 0);
+ Parrot_gc_mark_and_sweep(PMC_interp(SELF), 0);
}
/*
Modified: branches/gc_api/src/pmc_freeze.c
==============================================================================
--- branches/gc_api/src/pmc_freeze.c Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/pmc_freeze.c Fri May 8 01:28:30 2009 (r38574)
@@ -1855,7 +1855,7 @@
* collected under us.
*/
if (1 || (Parrot_str_byte_length(interp, image) > THAW_BLOCK_GC_SIZE)) {
- Parrot_do_gc_run(interp, 1);
+ Parrot_gc_mark_and_sweep(interp, 1);
Parrot_block_GC_mark(interp);
Parrot_block_GC_sweep(interp);
gc_block = 1;
Modified: branches/gc_api/src/runcore/cores.c
==============================================================================
--- branches/gc_api/src/runcore/cores.c Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/runcore/cores.c Fri May 8 01:28:30 2009 (r38574)
@@ -487,7 +487,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"attempt to access code outside of current code segment");
- Parrot_do_gc_run(interp, 0);
+ Parrot_gc_mark_and_sweep(interp, 0);
CONTEXT(interp)->current_pc = pc;
DO_OP(pc, interp);
@@ -579,7 +579,7 @@
"attempt to access code outside of current code segment");
if (interp->pdb->state & PDB_GCDEBUG)
- Parrot_do_gc_run(interp, 0);
+ Parrot_gc_mark_and_sweep(interp, 0);
if (interp->pdb->state & PDB_TRACING) {
trace_op(interp,
Modified: branches/gc_api/src/string/api.c
==============================================================================
--- branches/gc_api/src/string/api.c Fri May 8 01:24:12 2009 (r38573)
+++ branches/gc_api/src/string/api.c Fri May 8 01:28:30 2009 (r38574)
@@ -1613,7 +1613,7 @@
#if ! DISABLE_GC_DEBUG
/* trigger GC for debug */
if (interp && GC_DEBUG(interp))
- Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
#endif
make_writable(interp, &res, minlen, enum_stringrep_one);
@@ -1766,7 +1766,7 @@
#if ! DISABLE_GC_DEBUG
/* trigger GC for debug */
if (interp && GC_DEBUG(interp))
- Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
#endif
make_writable(interp, &res, maxlen, enum_stringrep_one);
@@ -1842,7 +1842,7 @@
#if ! DISABLE_GC_DEBUG
/* trigger GC for debug */
if (interp && GC_DEBUG(interp))
- Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
#endif
make_writable(interp, &res, maxlen, enum_stringrep_one);
@@ -1921,7 +1921,7 @@
#if ! DISABLE_GC_DEBUG
/* trigger GC for debug */
if (interp && GC_DEBUG(interp))
- Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
#endif
make_writable(interp, &res, len, enum_stringrep_one);
More information about the parrot-commits
mailing list