# New Ticket Created by Andrew Whitworth # Please include the string: [perl #55364] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=55364 >
PDD09 contained a number of deprecation notes, for functions and macros whose names are to be updated. The attached patch makes these changes globally, including in PDD09 and other documentation. The following macros and functions are renamed: (*do_dod_run) -> (*do_gc_mark) (*de_init_gc_system) -> (*finalize_gc_system) DOD_trace_normal -> GC_trace_normal DOD_trace_stack_FLAG -> GC_trace_stack_FLAG DOD_lazy_FLAG -> GC_lazy_FLAG DOD_finish_FLAG -> GC_finish_FLAG DOD_no_trace_volatile_roots -> GC_no_trace_volatile_roots DOD_WRITE_BARRIER -> GC_WRITE_BARRIER DOD_WRITE_BARRIER_KEY -> GC_WRITE_BARRIER_KEY Parrot_block_GC -> Parrot_block_GC_mark Parrot_unblock_GC -> Parrot_unblock_GC_mark Parrot_block_DOD -> Parrot_block_GC_sweep Parrot_unblock_DOD -> Parrot_unblock_GC_sweep PDD09 includes a note "The phrase 'dead object detection' and abbreviation 'DOD' are deprecated". I will note here that many many other functions, macros, variables and flags use the abbreviation "DOD" or "dod". Fixing all instances of those, if they indeed need fixing, is outside the scope of this patch. This patch only removes deprecation notes from PDD09 and updates the codebase to use the new names described in that document. --Andrew Whitworth
Index: src/pdb.c =================================================================== --- src/pdb.c (revision 28110) +++ src/pdb.c (working copy) @@ -143,8 +143,8 @@ interp->debugger = debugger; pdb->debugee = interp; - Parrot_block_DOD(interp); - Parrot_block_GC(interp); + Parrot_block_GC_mark(interp); + Parrot_block_GC_sweep(interp); imcc_init(interp); do_yylex_init(interp, &yyscanner); @@ -194,8 +194,8 @@ PackFile_fixup_subs(interp, PBC_POSTCOMP, NULL); } - Parrot_unblock_DOD(interp); - Parrot_unblock_GC(interp); + Parrot_unblock_GC_mark(interp); + Parrot_unblock_GC_sweep(interp); PDB_printwelcome(); Index: src/exit.c =================================================================== --- src/exit.c (revision 28110) +++ src/exit.c (working copy) @@ -80,8 +80,8 @@ */ handler_node_t *node = interp->exit_handler_list; - Parrot_block_DOD(interp); - Parrot_block_GC(interp); + Parrot_block_GC_mark(interp); + Parrot_block_GC_sweep(interp); while (node) { handler_node_t * const next = node->next; Index: src/ops/core.ops =================================================================== --- src/ops/core.ops (revision 28110) +++ src/ops/core.ops (working copy) @@ -1123,7 +1123,7 @@ Parrot_do_dod_run(interp, 0); else if (interp->arena_base->num_early_DOD_PMCs) - Parrot_do_dod_run(interp, DOD_lazy_FLAG); + Parrot_do_dod_run(interp, GC_lazy_FLAG); } =item B<collect>() @@ -1143,7 +1143,7 @@ =cut op sweepoff() { - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); } =item B<sweepon>() @@ -1153,7 +1153,7 @@ =cut op sweepon() { - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); } =item B<collectoff>() @@ -1163,7 +1163,7 @@ =cut op collectoff() { - Parrot_block_GC(interp); + Parrot_block_GC_sweep(interp); } =item B<collecton>() @@ -1173,7 +1173,7 @@ =cut op collecton() { - Parrot_unblock_GC(interp); + Parrot_unblock_GC_sweep(interp); } =item B<needs_destroy>(invar PMC) Index: src/stm/backend.c =================================================================== --- src/stm/backend.c (revision 28110) +++ src/stm/backend.c (working copy) @@ -1863,7 +1863,7 @@ STM_profile_data *profile; INTVAL i; - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); log = Parrot_STM_tx_log_get(interp); profile = &PROFILE(log); @@ -1895,7 +1895,7 @@ fprintf(stderr, "\nAverage cycles: %f\n", (double) profile->total_wait_cycles / (double) profile->num_waits); - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); } /* Index: src/hash.c =================================================================== --- src/hash.c (revision 28110) +++ src/hash.c (working copy) @@ -1085,14 +1085,14 @@ if (bucket) { if (hash->entry_type == enum_type_PMC && hash->container) { - DOD_WRITE_BARRIER_KEY(interp, hash->container, + GC_WRITE_BARRIER_KEY(interp, hash->container, (PMC*)bucket->value, bucket->key, (PMC*)value, key); } bucket->value = value; /* replace value */ } else { if (hash->entry_type == enum_type_PMC && hash->container) { - DOD_WRITE_BARRIER_KEY(interp, hash->container, + GC_WRITE_BARRIER_KEY(interp, hash->container, NULL, NULL, (PMC*)value, key); } Index: src/pbc_merge.c =================================================================== --- src/pbc_merge.c (revision 28110) +++ src/pbc_merge.c (working copy) @@ -843,7 +843,7 @@ struct longopt_opt_info opt = LONGOPT_OPT_INFO_INIT; Interp * const interp = Parrot_new(NULL); - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); /* Get options, ensuring we have at least one input file and an output file. */ Index: src/global.c =================================================================== --- src/global.c (revision 28110) +++ src/global.c (working copy) @@ -765,7 +765,7 @@ PMC *ns; /* PF structures aren't fully constructed yet */ - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); /* store relative to HLL namespace */ CONTEXT(interp)->current_HLL = PMC_sub(sub)->HLL_id; @@ -793,7 +793,7 @@ /* restore HLL_id */ CONTEXT(interp)->current_HLL = cur_id; - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); } /* Index: src/gc/gc_gms.c =================================================================== --- src/gc/gc_gms.c (revision 28110) +++ src/gc/gc_gms.c (working copy) @@ -467,9 +467,9 @@ /* * set function hooks according to pdd09 */ - arena_base->do_dod_run = parrot_gc_gms_run; - arena_base->de_init_gc_system = parrot_gc_gms_deinit; - arena_base->init_pool = gc_gms_pool_init; + arena_base->do_gc_mark = parrot_gc_gms_run; + arena_base->finalize_gc_system = parrot_gc_gms_deinit; + arena_base->init_pool = gc_gms_pool_init; } @@ -634,7 +634,7 @@ if (pool->skip) pool->skip = 0; else if (pool->last_Arena) { - Parrot_do_dod_run(interp, DOD_trace_stack_FLAG); + Parrot_do_dod_run(interp, GC_trace_stack_FLAG); if (pool->num_free_objects <= pool->replenish_level) pool->skip = 1; } @@ -1712,8 +1712,8 @@ Interface to C<Parrot_do_dod_run>. C<flags> is one of: - DOD_lazy_FLAG ... timely destruction - DOD_finish_FLAG ... run a final sweep to destruct objects at + GC_lazy_FLAG ... timely destruction + GC_finish_FLAG ... run a final sweep to destruct objects at interpreter shutdown =cut @@ -1731,7 +1731,7 @@ } ++arena_base->DOD_block_level; g_gms = arena_base->gc_private; - if (flags & DOD_finish_FLAG) { + if (flags & GC_finish_FLAG) { Small_Object_Pool * const pool = arena_base->pmc_pool; pool->white = pool->marker.next; @@ -1744,7 +1744,7 @@ /* normal or lazy DOD run */ arena_base->dod_runs++; - arena_base->lazy_dod = (flags & DOD_lazy_FLAG); + arena_base->lazy_dod = (flags & GC_lazy_FLAG); gc_gms_init_mark(interp); if (gc_gms_trace_root(interp, !arena_base->lazy_dod) && gc_gms_trace_children(interp)) { Index: src/gc/smallobject.c =================================================================== --- src/gc/smallobject.c (revision 28110) +++ src/gc/smallobject.c (working copy) @@ -158,7 +158,7 @@ Small_Object_Arena * const arena = pool->last_Arena; if (arena) { if (arena->used == arena->total_objects) - Parrot_do_dod_run(interp, DOD_trace_stack_FLAG); + Parrot_do_dod_run(interp, GC_trace_stack_FLAG); if (pool->num_free_objects <= pool->replenish_level) pool->skip = 1; @@ -482,9 +482,9 @@ { Arenas * const arena_base = interp->arena_base; - arena_base->do_dod_run = Parrot_dod_ms_run; - arena_base->de_init_gc_system = NULL; - arena_base->init_pool = gc_ms_pool_init; + arena_base->do_gc_mark = Parrot_dod_ms_run; + arena_base->finalize_gc_system = NULL; + arena_base->init_pool = gc_ms_pool_init; } /* Index: src/gc/gc_ims.c =================================================================== --- src/gc/gc_ims.c (revision 28110) +++ src/gc/gc_ims.c (working copy) @@ -633,9 +633,9 @@ /* set function hooks according to pdd09 */ - arena_base->do_dod_run = parrot_gc_ims_run; - arena_base->de_init_gc_system = parrot_gc_ims_deinit; - arena_base->init_pool = gc_ims_pool_init; + arena_base->do_gc_mark = parrot_gc_ims_run; + arena_base->finalize_gc_system = parrot_gc_ims_deinit; + arena_base->init_pool = gc_ims_pool_init; /* run init state */ parrot_gc_ims_run_increment(interp); @@ -770,7 +770,7 @@ */ /* TODO mark volatile roots */ - Parrot_dod_trace_root(interp, g_ims->lazy ? 0 : DOD_trace_stack_FLAG); + Parrot_dod_trace_root(interp, g_ims->lazy ? 0 : GC_trace_stack_FLAG); /* mark (again) rest of children */ Parrot_dod_trace_children(interp, (size_t) -1); @@ -966,8 +966,8 @@ Interface to C<Parrot_do_dod_run>. C<flags> is one of: - DOD_lazy_FLAG ... timely destruction - DOD_finish_FLAG ... run until live bits are clear + GC_lazy_FLAG ... timely destruction + GC_finish_FLAG ... run until live bits are clear =cut @@ -983,7 +983,7 @@ if (arena_base->DOD_block_level || g_ims->state == GC_IMS_DEAD) return; - if (flags & DOD_finish_FLAG) { + if (flags & GC_finish_FLAG) { /* * called from really_destroy. This interpreter is gonna die. * The destruction includes a sweep over PMCs, so that @@ -1003,7 +1003,7 @@ /* make the test happy that checks the count ;) */ arena_base->dod_runs++; - lazy = flags & DOD_lazy_FLAG; + lazy = flags & GC_lazy_FLAG; if (!lazy) { /* run a full cycle @@ -1066,7 +1066,7 @@ =item C<void Parrot_dod_ims_wb> -Write barrier called by the DOD_WRITE_BARRIER macro. Always when storing +Write barrier called by the GC_WRITE_BARRIER macro. Always when storing a white object into a black aggregate, either the object must be greyed or the aggregate must be rescanned -- so grey it. Index: src/gc/dod.c =================================================================== --- src/gc/dod.c (revision 28110) +++ src/gc/dod.c (working copy) @@ -1098,7 +1098,7 @@ * the sync sweep is always at the end, so that * the live bits are cleared */ - if (flags & DOD_finish_FLAG) { + if (flags & GC_finish_FLAG) { clear_live_bits(interp->arena_base->pmc_pool); clear_live_bits(interp->arena_base->constant_pmc_pool); @@ -1109,7 +1109,7 @@ } ++arena_base->DOD_block_level; - arena_base->lazy_dod = flags & DOD_lazy_FLAG; + arena_base->lazy_dod = flags & GC_lazy_FLAG; /* tell the threading system that we're doing DOD mark */ pt_DOD_start_mark(interp); @@ -1119,7 +1119,7 @@ Parrot_go_collect(interp); /* Now go trace the PMCs */ - if (trace_active_PMCs(interp, flags & DOD_trace_stack_FLAG)) { + if (trace_active_PMCs(interp, flags & GC_trace_stack_FLAG)) { int ignored; arena_base->dod_trace_ptr = NULL; @@ -1168,7 +1168,7 @@ void Parrot_do_dod_run(PARROT_INTERP, UINTVAL flags) { - interp->arena_base->do_dod_run(interp, flags); + interp->arena_base->do_gc_mark(interp, flags); parrot_gc_context(interp); } Index: src/gc/resources.c =================================================================== --- src/gc/resources.c (revision 28110) +++ src/gc/resources.c (working copy) @@ -216,7 +216,7 @@ */ if (!interp->arena_base->DOD_block_level && interp->arena_base->mem_allocs_since_last_collect) { - Parrot_do_dod_run(interp, DOD_trace_stack_FLAG); + Parrot_do_dod_run(interp, GC_trace_stack_FLAG); #if !PARROT_GC_IMS /* Compact the pool if allowed and worthwhile */ if (pool->compact) { Index: src/list.c =================================================================== --- src/list.c (revision 28110) +++ src/list.c (working copy) @@ -317,8 +317,8 @@ { List_chunk *chunk; - Parrot_block_DOD(interp); - /*Parrot_block_GC(interp); - why */ + Parrot_block_GC_mark(interp); + /*Parrot_block_GC_sweep(interp); - why */ chunk = (List_chunk *)new_bufferlike_header(interp, sizeof (*chunk)); chunk->items = items; chunk->n_chunks = 0; @@ -329,10 +329,10 @@ memset(PObj_bufstart((Buffer*)chunk), 0, size); /* see also src/hash.c */ if (list->container) { - DOD_WRITE_BARRIER(interp, list->container, 0, chunk); + GC_WRITE_BARRIER(interp, list->container, 0, chunk); } - Parrot_unblock_DOD(interp); - /*Parrot_unblock_GC(interp); */ + Parrot_unblock_GC_mark(interp); + /*Parrot_unblock_GC_sweep(interp); */ return chunk; } @@ -446,7 +446,7 @@ Parrot_reallocate(interp, (Buffer *)prev, MAX_ITEMS * list->item_size); if (list->container) { - DOD_WRITE_BARRIER(interp, list->container, 0, prev); + GC_WRITE_BARRIER(interp, list->container, 0, prev); } mem_sys_memmove( (char *) PObj_bufstart(&prev->data) + @@ -466,7 +466,7 @@ Parrot_reallocate(interp, (Buffer *)prev, (prev->items + chunk->items) * list->item_size); if (list->container) { - DOD_WRITE_BARRIER(interp, list->container, 0, prev); + GC_WRITE_BARRIER(interp, list->container, 0, prev); } mem_sys_memmove( (char *) PObj_bufstart(&prev->data) + @@ -529,8 +529,8 @@ List_chunk *chunk, *prev, *first; UINTVAL len; - Parrot_block_DOD(interp); - Parrot_block_GC(interp); + Parrot_block_GC_mark(interp); + Parrot_block_GC_sweep(interp); /* count chunks and fix prev pointers */ rebuild_chunk_ptrs(list, 0); /* if not regular, check & optimize */ @@ -551,7 +551,7 @@ Parrot_reallocate(interp, (Buffer *)list, len * sizeof (List_chunk *)); if (list->container) { - DOD_WRITE_BARRIER(interp, list->container, 0, list); + GC_WRITE_BARRIER(interp, list->container, 0, list); } list->collect_runs = interp->arena_base->collect_runs; } @@ -619,8 +619,8 @@ if (list->grow_policy && list->grow_policy != enum_grow_growing && list->grow_policy != enum_grow_fixed) list->grow_policy = enum_grow_mixed; - Parrot_unblock_DOD(interp); - Parrot_unblock_GC(interp); + Parrot_unblock_GC_mark(interp); + Parrot_unblock_GC_sweep(interp); return len; } @@ -982,7 +982,7 @@ Parrot_reallocate(interp, (Buffer *)chunk, chunk->items * list->item_size); if (list->container) { - DOD_WRITE_BARRIER(interp, list->container, 0, chunk); + GC_WRITE_BARRIER(interp, list->container, 0, chunk); } chunk->flags |= no_power_2; chunk->flags &= ~sparse; @@ -999,7 +999,7 @@ Parrot_reallocate(interp, (Buffer *)chunk, chunk->items * list->item_size); if (list->container) { - DOD_WRITE_BARRIER(interp, list->container, 0, chunk); + GC_WRITE_BARRIER(interp, list->container, 0, chunk); } chunk->flags &= ~sparse; if (n3) { @@ -1078,7 +1078,7 @@ break; case enum_type_PMC: if (list->container) { - DOD_WRITE_BARRIER(interp, list->container, + GC_WRITE_BARRIER(interp, list->container, ((PMC **) PObj_bufstart(&chunk->data))[idx], (PMC*)item); } @@ -1355,7 +1355,7 @@ /* * this is a new PMC, so no old value */ - DOD_WRITE_BARRIER(interp, container, NULL, l->user_data); + GC_WRITE_BARRIER(interp, container, NULL, l->user_data); } /* @@ -1382,8 +1382,8 @@ PMC *op; STRING *s; - Parrot_block_DOD(interp); - Parrot_block_GC(interp); + Parrot_block_GC_mark(interp); + Parrot_block_GC_sweep(interp); l = list_new(interp, other->item_type); STRUCT_COPY(l, other); @@ -1431,8 +1431,8 @@ l->user_data = VTABLE_clone(interp, other->user_data); } rebuild_chunk_list(interp, l); - Parrot_unblock_DOD(interp); - Parrot_unblock_GC(interp); + Parrot_unblock_GC_mark(interp); + Parrot_unblock_GC_sweep(interp); return l; } Index: src/pmc.c =================================================================== --- src/pmc.c (revision 28110) +++ src/pmc.c (working copy) @@ -607,13 +607,13 @@ dod_register_pmc(PARROT_INTERP, ARGIN(PMC* pmc)) { /* Better not trigger a DOD run with a potentially unanchored PMC */ - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); if (!interp->DOD_registry) interp->DOD_registry = pmc_new(interp, enum_class_AddrRegistry); VTABLE_set_pmc_keyed(interp, interp->DOD_registry, pmc, PMCNULL); - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); } /* Index: src/string.c =================================================================== --- src/string.c (revision 28110) +++ src/string.c (working copy) @@ -1509,7 +1509,7 @@ #if ! DISABLE_GC_DEBUG /* trigger GC for debug */ if (interp && GC_DEBUG(interp)) - Parrot_do_dod_run(interp, DOD_trace_stack_FLAG); + Parrot_do_dod_run(interp, GC_trace_stack_FLAG); #endif make_writable(interp, &res, minlen, enum_stringrep_one); @@ -1625,7 +1625,7 @@ #if ! DISABLE_GC_DEBUG /* trigger GC for debug */ if (interp && GC_DEBUG(interp)) - Parrot_do_dod_run(interp, DOD_trace_stack_FLAG); + Parrot_do_dod_run(interp, GC_trace_stack_FLAG); #endif make_writable(interp, &res, maxlen, enum_stringrep_one); @@ -1700,7 +1700,7 @@ #if ! DISABLE_GC_DEBUG /* trigger GC for debug */ if (interp && GC_DEBUG(interp)) - Parrot_do_dod_run(interp, DOD_trace_stack_FLAG); + Parrot_do_dod_run(interp, GC_trace_stack_FLAG); #endif make_writable(interp, &res, maxlen, enum_stringrep_one); @@ -1776,7 +1776,7 @@ #if ! DISABLE_GC_DEBUG /* trigger GC for debug */ if (interp && GC_DEBUG(interp)) - Parrot_do_dod_run(interp, DOD_trace_stack_FLAG); + Parrot_do_dod_run(interp, GC_trace_stack_FLAG); #endif make_writable(interp, &res, len, enum_stringrep_one); @@ -2135,9 +2135,9 @@ * * We have to block GC here, as we have a pointer to bufstart */ - Parrot_block_GC(interp); + Parrot_block_GC_sweep(interp); Parrot_allocate_string(interp, s, size); - Parrot_unblock_GC(interp); + Parrot_unblock_GC_sweep(interp); mem_sys_memcopy(PObj_bufstart(s), memory, size); /* Mark the memory as neither immobile nor system allocated */ Index: src/pmc/resizablepmcarray.pmc =================================================================== --- src/pmc/resizablepmcarray.pmc (revision 28110) +++ src/pmc/resizablepmcarray.pmc (working copy) @@ -241,7 +241,7 @@ SELF.set_integer_native(key+1); data = (PMC **)PMC_data(SELF); - DOD_WRITE_BARRIER(INTERP, SELF, data[key], src); + GC_WRITE_BARRIER(INTERP, SELF, data[key], src); data[key] = src; } Index: src/pmc/parrotinterpreter.pmc =================================================================== --- src/pmc/parrotinterpreter.pmc (revision 28110) +++ src/pmc/parrotinterpreter.pmc (working copy) @@ -45,7 +45,7 @@ clone_interpreter(Parrot_Interp d, Parrot_Interp s, INTVAL flags) { /* we block DOD runs while cloning since C<d> is not yet running */ - Parrot_block_DOD(d); + Parrot_block_GC_mark(d); d->scheduler = pmc_new(d, enum_class_Scheduler); d->scheduler = VTABLE_share_ro(d, d->scheduler); @@ -136,7 +136,7 @@ if (flags & PARROT_CLONE_GLOBALS) pt_clone_globals(d, s); - Parrot_unblock_DOD(d); + Parrot_unblock_GC_sweep(d); } Index: src/pmc/parrotthread.pmc =================================================================== --- src/pmc/parrotthread.pmc (revision 28110) +++ src/pmc/parrotthread.pmc (working copy) @@ -47,10 +47,10 @@ stop_GC(Interp *parent, Interp *thread) { #if 0 - Parrot_block_DOD(parent); - Parrot_block_DOD(thread); - Parrot_block_GC(parent); - Parrot_block_GC(thread); + Parrot_block_GC_mark(parent); + Parrot_block_GC_mark(thread); + Parrot_block_GC_sweep(parent); + Parrot_block_GC_sweep(thread); #endif } Index: src/pmc/sarray.pmc =================================================================== --- src/pmc/sarray.pmc (revision 28110) +++ src/pmc/sarray.pmc (working copy) @@ -804,7 +804,7 @@ e = (HashEntry *) PMC_data(SELF) + (2 + key); e->type = enum_hash_pmc; - DOD_WRITE_BARRIER(INTERP, SELF, UVal_pmc(e->val), src); + GC_WRITE_BARRIER(INTERP, SELF, UVal_pmc(e->val), src); UVal_pmc(e->val) = src; e = (HashEntry *) PMC_data(SELF) + 1; Index: src/pmc/resizablestringarray.pmc =================================================================== --- src/pmc/resizablestringarray.pmc (revision 28110) +++ src/pmc/resizablestringarray.pmc (working copy) @@ -85,7 +85,7 @@ SELF.set_integer_native(key+1); data = (STRING **)PMC_data(SELF); - DOD_WRITE_BARRIER(INTERP, SELF, data[key], value); + GC_WRITE_BARRIER(INTERP, SELF, data[key], value); data[key] = value; } Index: src/pmc/tqueue.pmc =================================================================== --- src/pmc/tqueue.pmc (revision 28110) +++ src/pmc/tqueue.pmc (working copy) @@ -186,7 +186,7 @@ (VTABLE_IS_CONST_FLAG | VTABLE_IS_SHARED_FLAG))) VTABLE_share(INTERP, item); - DOD_WRITE_BARRIER(INTERP, SELF, NULL, item); + GC_WRITE_BARRIER(INTERP, SELF, NULL, item); entry->data = item; entry->type = QUEUE_ENTRY_TYPE_NONE; Index: src/pmc/continuation.pmc =================================================================== --- src/pmc/continuation.pmc (revision 28110) +++ src/pmc/continuation.pmc (working copy) @@ -388,10 +388,10 @@ opcode_t *dest_indexes = to_ctx->current_results; interp->current_args = NULL; - Parrot_block_DOD(INTERP); + Parrot_block_GC_mark(INTERP); parrot_pass_args(INTERP, from_ctx, to_ctx, src_indexes, dest_indexes, PARROT_PASS_PARAMS); - Parrot_unblock_DOD(INTERP); + Parrot_unblock_GC_mark(INTERP); } /* switch segment */ Index: src/pmc/ref.pmc =================================================================== --- src/pmc/ref.pmc (revision 28110) +++ src/pmc/ref.pmc (working copy) @@ -80,7 +80,7 @@ VTABLE void set_pmc(PMC *other) { PObj_active_destroy_CLEAR(SELF); - DOD_WRITE_BARRIER(INTERP, SELF, PMC_pmc_val(SELF), other); + GC_WRITE_BARRIER(INTERP, SELF, PMC_pmc_val(SELF), other); SELF.init_pmc(other); } Index: src/pmc/fixedpmcarray.pmc =================================================================== --- src/pmc/fixedpmcarray.pmc (revision 28110) +++ src/pmc/fixedpmcarray.pmc (working copy) @@ -557,7 +557,7 @@ _("FixedPMCArray: index out of bounds!")); data = (PMC**)PMC_data(SELF); - DOD_WRITE_BARRIER(INTERP, SELF, data[key], src); + GC_WRITE_BARRIER(INTERP, SELF, data[key], src); data[key] = src; } Index: src/pmc/default.pmc =================================================================== --- src/pmc/default.pmc (revision 28110) +++ src/pmc/default.pmc (working copy) @@ -209,7 +209,7 @@ add_pmc_ext(interp, self); PMC_metadata(self) = prop = pmc_new_noinit(interp, enum_class_Hash); - DOD_WRITE_BARRIER(interp, self, NULL, prop); + GC_WRITE_BARRIER(interp, self, NULL, prop); VTABLE_init(interp, prop); propagate_std_props(interp, self, prop); return prop; Index: src/pmc/fixedstringarray.pmc =================================================================== --- src/pmc/fixedstringarray.pmc (revision 28110) +++ src/pmc/fixedstringarray.pmc (working copy) @@ -420,7 +420,7 @@ "FixedStringArray: index out of bounds!"); data = (STRING **)PMC_data(SELF); - DOD_WRITE_BARRIER(INTERP, SELF, data[key], value); + GC_WRITE_BARRIER(INTERP, SELF, data[key], value); data[key] = value; } Index: src/pmc/eval.pmc =================================================================== --- src/pmc/eval.pmc (revision 28110) +++ src/pmc/eval.pmc (working copy) @@ -269,9 +269,9 @@ has been observed to cause problems. There may be a Better Fix. See RT #40410 for example of the problem (note on line that segfaults, it is *cursor that is pointing to dealloced memory). */ - Parrot_block_DOD(INTERP); + Parrot_block_GC_mark(INTERP); PackFile_pack(INTERP, pf, (opcode_t *)res->strstart); - Parrot_unblock_DOD(INTERP); + Parrot_unblock_GC_mark(INTERP); /* now remove all segments from directory again and destroy * the packfile */ Index: src/inter_create.c =================================================================== --- src/inter_create.c (revision 28110) +++ src/inter_create.c (working copy) @@ -161,8 +161,8 @@ /* Set up the memory allocation system */ mem_setup_allocator(interp); - Parrot_block_DOD(interp); - Parrot_block_GC(interp); + Parrot_block_GC_mark(interp); + Parrot_block_GC_sweep(interp); /* * Set up the string subsystem @@ -249,8 +249,8 @@ * Actually, we could enable DOD/GC earlier, but here all setup is * done */ - Parrot_unblock_DOD(interp); - Parrot_unblock_GC(interp); + Parrot_unblock_GC_mark(interp); + Parrot_unblock_GC_sweep(interp); /* all sys running, init the event and signal stuff * the first or "master" interpreter is handling events and signals @@ -345,7 +345,7 @@ if (interp->thread_data) interp->thread_data->state |= THREAD_STATE_SUSPENDED_GC; - Parrot_do_dod_run(interp, DOD_finish_FLAG); + Parrot_do_dod_run(interp, GC_finish_FLAG); #if STM_PROFILE if (interp->thread_data && interp->thread_data->stm_log && @@ -407,8 +407,8 @@ Parrot_merge_memory_pools(interp->parent_interpreter, interp); } - if (interp->arena_base->de_init_gc_system) - interp->arena_base->de_init_gc_system(interp); + if (interp->arena_base->finalize_gc_system) + interp->arena_base->finalize_gc_system(interp); /* copies of constant tables */ Parrot_destroy_constants(interp); Index: src/thread.c =================================================================== --- src/thread.c (revision 28110) +++ src/thread.c (working copy) @@ -445,8 +445,8 @@ PMC *ret_val = NULL; Parrot_Interp interp = (Parrot_Interp)PMC_data(self); - Parrot_block_DOD(interp); - Parrot_block_GC(interp); + Parrot_block_GC_mark(interp); + Parrot_block_GC_sweep(interp); /* need to set it here because argument passing can trigger GC */ interp->lo_var_ptr = &lo_var_ptr; @@ -469,8 +469,8 @@ else { /* run normally */ push_new_c_exception_handler(interp, &exp); - Parrot_unblock_DOD(interp); - Parrot_unblock_GC(interp); + Parrot_unblock_GC_mark(interp); + Parrot_unblock_GC_sweep(interp); ret_val = Parrot_runops_fromc_args(interp, sub, "PF", sub_arg); } @@ -524,11 +524,11 @@ void pt_clone_code(Parrot_Interp d, Parrot_Interp s) { - Parrot_block_DOD(d); + Parrot_block_GC_mark(d); Interp_flags_SET(d, PARROT_EXTERN_CODE_FLAG); d->code = NULL; Parrot_switch_to_cs(d, s->code, 1); - Parrot_unblock_DOD(d); + Parrot_unblock_GC_mark(d); } /* @@ -593,9 +593,9 @@ void pt_clone_globals(Parrot_Interp d, Parrot_Interp s) { - Parrot_block_DOD(d); + Parrot_block_GC_mark(d); pt_ns_clone(d, d->root_namespace, s, s->root_namespace); - Parrot_unblock_DOD(d); + Parrot_unblock_GC_mark(d); } /* @@ -667,10 +667,10 @@ PMC *parent; Interp * const interpreter = (Parrot_Interp)PMC_data(dest_interp); - Parrot_block_GC(interpreter); - Parrot_block_DOD(interpreter); - Parrot_block_GC(interp); - Parrot_block_DOD(interp); + Parrot_block_GC_sweep(interpreter); + Parrot_block_GC_mark(interpreter); + Parrot_block_GC_sweep(interp); + Parrot_block_GC_mark(interp); /* make a copy of the ParrotThread PMC so we can use it * to hold parameters to the new thread without it being @@ -716,10 +716,10 @@ */ interpreter->thread_data->state = THREAD_STATE_JOINABLE; - Parrot_unblock_GC(interpreter); - Parrot_unblock_DOD(interpreter); - Parrot_unblock_GC(interp); - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interpreter); + Parrot_unblock_GC_sweep(interpreter); + Parrot_unblock_GC_mark(interp); + Parrot_unblock_GC_sweep(interp); THREAD_CREATE_JOINABLE(interpreter->thread_data->thread, thread_func, dest_interp); @@ -1193,7 +1193,7 @@ /* mark and sweep our world -- later callbacks will keep * it sync'd */ - Parrot_dod_ms_run(interp, DOD_trace_stack_FLAG); + Parrot_dod_ms_run(interp, GC_trace_stack_FLAG); PARROT_ASSERT(!(interp->thread_data->state & THREAD_STATE_SUSPENDED_GC)); } @@ -1264,7 +1264,7 @@ * stack so block DOD during clone * XXX should probably acquire the parent's interpreter mutex */ - Parrot_block_DOD(parent); + Parrot_block_GC_mark(parent); parent_ret = make_local_copy(parent, interp, retval); /* this PMC is living only in the stack of this currently @@ -1272,7 +1272,7 @@ * XXX is this still needed? */ dod_register_pmc(parent, parent_ret); - Parrot_unblock_DOD(parent); + Parrot_unblock_GC_mark(parent); retval = parent_ret; } else { Index: src/dynext.c =================================================================== --- src/dynext.c (revision 28110) +++ src/dynext.c (working copy) @@ -353,7 +353,7 @@ * work around gcc 3.3.3 and other problem with dynpmcs * something during library loading doesn't stand a DOD run */ - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); /* get load_func */ if (lib_name) { @@ -396,7 +396,7 @@ store_lib_pmc(interp, lib_pmc, wo_ext, type, lib_name); /* UNLOCK */ - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); return lib_pmc; } Index: src/packfile.c =================================================================== --- src/packfile.c (revision 28110) +++ src/packfile.c (working copy) @@ -866,10 +866,10 @@ self->directory.base.file_offset = (INTVAL)cursor - (INTVAL)self->src; /* now unpack dir, which unpacks its contents ... */ - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); cursor = PackFile_Segment_unpack(interp, &self->directory.base, cursor); - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); #ifdef PARROT_HAS_HEADER_SYSMMAN if (self->is_mmap_ped Index: src/pmc_freeze.c =================================================================== --- src/pmc_freeze.c (revision 28110) +++ src/pmc_freeze.c (working copy) @@ -1225,7 +1225,7 @@ /* * that's a duplicate if (info->container) - DOD_WRITE_BARRIER(interp, info->container, NULL, pmc); + GC_WRITE_BARRIER(interp, info->container, NULL, pmc); */ *info->thaw_ptr = pmc; return; @@ -1244,7 +1244,7 @@ info->thaw_result = pmc; else { if (info->container) { - DOD_WRITE_BARRIER(interp, info->container, NULL, pmc); + GC_WRITE_BARRIER(interp, info->container, NULL, pmc); } *info->thaw_ptr = pmc; } @@ -1679,8 +1679,8 @@ */ if (1 || (string_length(interp, image) > THAW_BLOCK_DOD_SIZE)) { Parrot_do_dod_run(interp, 1); - Parrot_block_DOD(interp); - Parrot_block_GC(interp); + Parrot_block_GC_mark(interp); + Parrot_block_GC_sweep(interp); dod_block = 1; } @@ -1703,8 +1703,8 @@ PARROT_ASSERT(image->strstart >= (char *)PObj_bufstart(image)); if (dod_block) { - Parrot_unblock_DOD(interp); - Parrot_unblock_GC(interp); + Parrot_unblock_GC_mark(interp); + Parrot_unblock_GC_sweep(interp); } PackFile_destroy(interp, info.image_io->pf); mem_sys_free(info.image_io); @@ -1738,7 +1738,7 @@ { visit_info info; - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); cleanup_next_for_GC(interp); info.what = VISIT_FREEZE_AT_DESTRUCT; info.mark_ptr = pmc; @@ -1750,7 +1750,7 @@ visit_loop_next_for_GC(interp, pmc, &info); - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); PackFile_destroy(interp, info.image_io->pf); mem_sys_free(info.image_io); return info.image; Index: src/io/io.c =================================================================== --- src/io/io.c (revision 28110) +++ src/io/io.c (working copy) @@ -1053,7 +1053,7 @@ #if ! DISABLE_GC_DEBUG /* trigger GC for debug - but not during tests */ if (0 && GC_DEBUG(interp)) - Parrot_do_dod_run(interp, DOD_trace_stack_FLAG); + Parrot_do_dod_run(interp, GC_trace_stack_FLAG); #endif return PIO_write_down(interp, l, io, s); } Index: src/sub.c =================================================================== --- src/sub.c (revision 28110) +++ src/sub.c (working copy) @@ -301,13 +301,13 @@ STRING *j = CONST_STRING(interp, ";"); STRING *res; - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); ns_array = Parrot_ns_get_name(interp, s->namespace_stash); if (s->name) VTABLE_push_string(interp, ns_array, s->name); res = string_join(interp, j, ns_array); - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); return res; } } @@ -428,7 +428,7 @@ ? "current instr.:" : "called from Sub"; - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); if (Parrot_Context_get_info(interp, ctx, &info)) { static const char unknown_file[] = "(unknown file)"; DECL_CONST_CAST; @@ -438,7 +438,7 @@ info.fullname, info.pc, info.file, info.line); } - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); return res; } Index: docs/book/ch02_getting_started.pod =================================================================== --- docs/book/ch02_getting_started.pod (revision 28110) +++ docs/book/ch02_getting_started.pod (working copy) @@ -281,7 +281,7 @@ --- list.c 27 Dec 2002 09:33:11 -0000 1.23 +++ list.c 28 Dec 2002 03:37:35 -0000 @@ -187,6 +187,10 @@ - Parrot_block_GC(interpreter); + Parrot_block_GC_sweep(interpreter); chunk = (List_chunk *)new_bufferlike_header(interpreter, sizeof(*chunk)); chunk->items = items; + chunk->n_chunks = 0; @@ -289,8 +289,8 @@ + chunk->next = NULL; + chunk->prev = NULL; Parrot_allocate_zeroed(interpreter, (Buffer *)chunk, size); - Parrot_unblock_DOD(interpreter); - Parrot_unblock_GC(interpreter); + Parrot_unblock_GC_mark(interpreter); + Parrot_unblock_GC_sweep(interpreter); =head3 Bug tracking Index: docs/pdds/pdd09_gc.pod =================================================================== --- docs/pdds/pdd09_gc.pod (revision 28110) +++ docs/pdds/pdd09_gc.pod (working copy) @@ -194,8 +194,6 @@ =item PMC register stack -=item General/User stack - =back =head2 Incremental Marking @@ -230,8 +228,6 @@ =item String register set stack -=item General/User stack - =item Control stack =back @@ -367,8 +363,6 @@ start/continue a partial mark phase, rather than marking the entire tree of live objects. -{{DEPRECATION NOTE: do_gc_mark used to be do_dod_run.}}. - Flags is one of: =over 4 @@ -385,9 +379,6 @@ if no objects are currently marked live, the implementation should run the mark phase, so that copying of dead objects is avoided. -{{DEPRECATION NOTE: GC_trace_normal used to be DOD_trace_normal. -GC_trace_stack_FLAG used to be DOD_trace_stack_FLAG.}} - =item GC_lazy_FLAG Do a timely destruction run. The goal is either to detect all objects that @@ -395,32 +386,22 @@ collection can be interrupted or postponed. This is called from the Parrot run-loop. No system areas have to be traced. -{{DEPRECATION NOTE: GC_lazy_FLAG used to be DOD_lazy_FLAG.}} - =item GC_finish_FLAG Called during interpreter destruction. The GC subsystem must clear the live state of all objects and perform a sweep in the PMC header pool, so that destructors and finalizers get called. -{{DEPRECATION NOTE: GC_finish_FLAG used to be DOD_finish_FLAG.}} - =item GC_no_trace_volatile_roots Trace root set except volatile roots. That is skip e.g. registers. -{{DEPRECATION NOTE: GC_no_trace_volatile_roots used to be -DOD_no_trace_volatile_roots.}} - =back =item C<void (*finalize_gc_system) (Interp *)> Called during interpreter destruction. Free used resources and memory pools. -{{DEPRECATION NOTE: finalize_gc_system used to be -de_init_gc_system.}} - =item C<void (*init_pool) (Interp *, struct Small_Object_Pool *)> A function to initialize the given pool. This function should set the @@ -470,16 +451,12 @@ This macro is invoked when in aggregate C<agg> the element C<old> is getting overritten by C<new>. Both C<old> and C<new> may be NULL. -{{DEPRECATION NOTE: used to be DOD_WRITE_BARRIER.}} - =item C<GC_WRITE_BARRIER_KEY(Interp *, PMC *agg, PMC *old, PObj *old_key, PMC *new, PObj *new_key)> Like above. Invoked when a hash key is inserted, possibly replacing an old key. -{{DEPRECATION NOTE: used to be DOD_WRITE_BARRIER_KEY.}} - =back =head2 Blocking GC @@ -494,28 +471,28 @@ Block the GC mark phase for the passed interpreter. (But not the sweep phase) -{{DEPRECATION NOTE: used to be Parrot_block_DOD.}} - =item Parrot_block_GC_sweep(Interp *interpreter) Block the GC sweep phase for the passed interpreter. (But not the mark phase) -{{DEPRECATION NOTE: used to be Parrot_block_GC.}} - =item Parrot_unblock_GC_mark(Interp *interpreter) Unblock the GC mark phase for the passed interpreter. (But not the sweep phase) -{{DEPRECATION NOTE: used to be Parrot_unblock_DOD.}} - =item Parrot_unblock_GC_sweep(Interp *interpreter) Unblock the GC sweep phase for the passed interpreter. (But not the mark phase) -{{DEPRECATION NOTE: used to be Parrot_unblock_GC.}} +=item Parrot_is_blocked_GC_mark(Interp *interpreter) +Test whether the mark phase has been blocked. + +=item Parrot_is_blocked_GC_sweep(Interp *interpreter) + +Test whether the sweep phase has been blocked. + =back Note that the blocking is recursive--if you call Parrot_block_GC_sweep() three Index: tools/dev/mk_language_shell.pl =================================================================== --- tools/dev/mk_language_shell.pl (revision 28110) +++ tools/dev/mk_language_shell.pl (working copy) @@ -425,7 +425,7 @@ =cut -.namespace +.namespace [] .sub 'say' .param pmc args :slurpy Index: include/parrot/resources.h =================================================================== --- include/parrot/resources.h (revision 28110) +++ include/parrot/resources.h (working copy) @@ -107,8 +107,8 @@ /* * function slots that each subsystem must provide */ - void (*do_dod_run)(PARROT_INTERP, int flags); - void (*de_init_gc_system) (PARROT_INTERP); + void (*do_gc_mark)(PARROT_INTERP, int flags); + void (*finalize_gc_system) (PARROT_INTERP); void (*init_pool)(PARROT_INTERP, struct Small_Object_Pool *); /* * statistics for DOD and GC Index: include/parrot/oo.h =================================================================== --- include/parrot/oo.h (revision 28110) +++ include/parrot/oo.h (working copy) @@ -35,7 +35,7 @@ #define get_attrib_num(x, y) ((PMC **)(x))[(y)] #define set_attrib_num(o, x, y, z) \ do { \ - DOD_WRITE_BARRIER(interp, o, ((PMC **)x)[y], z); \ + GC_WRITE_BARRIER(interp, o, ((PMC **)x)[y], z); \ ((PMC **)x)[y] = z; \ } while (0) #define set_attrib_flags(x) do { \ Index: include/parrot/dod.h =================================================================== --- include/parrot/dod.h (revision 28110) +++ include/parrot/dod.h (working copy) @@ -14,39 +14,39 @@ #include "parrot/parrot.h" /* Macros for recursively blocking and unblocking DOD */ -#define Parrot_block_DOD(interp) \ +#define Parrot_block_GC_mark(interp) \ { \ (interp)->arena_base->DOD_block_level++; \ Parrot_shared_DOD_block(interp); \ } -#define Parrot_unblock_DOD(interp) \ +#define Parrot_unblock_GC_mark(interp) \ if ((interp)->arena_base->DOD_block_level) { \ (interp)->arena_base->DOD_block_level--; \ Parrot_shared_DOD_unblock(interp); \ } /* Macros for recursively blocking and unblocking GC */ -#define Parrot_block_GC(interp) \ +#define Parrot_block_GC_sweep(interp) \ (interp)->arena_base->GC_block_level++ -#define Parrot_unblock_GC(interp) \ +#define Parrot_unblock_GC_sweep(interp) \ if ((interp)->arena_base->GC_block_level) \ (interp)->arena_base->GC_block_level-- /* Macros for testing if the DOD and GC are blocked */ -#define Parrot_is_blocked_DOD(interp) \ +#define Parrot_is_blocked_GC_mark(interp) \ ((interp)->arena_base->DOD_block_level) -#define Parrot_is_blocked_GC(interp) \ +#define Parrot_is_blocked_GC_sweep(interp) \ ((interp)->arena_base->GC_block_level) -#define DOD_trace_stack_FLAG (UINTVAL)(1 << 0) /* trace system areads and stack */ -#define DOD_trace_normal (UINTVAL)(1 << 0) /* the same */ -#define DOD_lazy_FLAG (UINTVAL)(1 << 1) /* timely destruction run */ -#define DOD_finish_FLAG (UINTVAL)(1 << 2) /* on Parrot exit: mark (almost) all PMCs dead and */ +#define GC_trace_stack_FLAG (UINTVAL)(1 << 0) /* trace system areads and stack */ +#define GC_trace_normal (UINTVAL)(1 << 0) /* the same */ +#define GC_lazy_FLAG (UINTVAL)(1 << 1) /* timely destruction run */ +#define GC_finish_FLAG (UINTVAL)(1 << 2) /* on Parrot exit: mark (almost) all PMCs dead and */ /* garbage collect. */ -#define DOD_no_trace_volatile_roots (UINTVAL)(1 << 3) +#define GC_no_trace_volatile_roots (UINTVAL)(1 << 3) /* trace all but volatile root set, i.e. registers */ /* HEADERIZER BEGIN: src/gc/dod.c */ @@ -215,7 +215,7 @@ * write barrier */ #if PARROT_GC_IMS -# define DOD_WRITE_BARRIER(interp, agg, old, _new) \ +# define GC_WRITE_BARRIER(interp, agg, old, _new) \ do { \ if (!PMC_IS_NULL(_new) && \ PObj_live_TEST(agg) && \ @@ -225,17 +225,17 @@ } \ } while (0) -# define DOD_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) \ - DOD_WRITE_BARRIER(interp, agg, old, _new) +# define GC_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) \ + GC_WRITE_BARRIER(interp, agg, old, _new) #endif #if PARROT_GC_MS -# define DOD_WRITE_BARRIER(interp, agg, old, _new) -# define DOD_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) +# define GC_WRITE_BARRIER(interp, agg, old, _new) +# define GC_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) #endif #if PARROT_GC_GMS -# define DOD_WRITE_BARRIER(interp, agg, old, _new) do { \ +# define GC_WRITE_BARRIER(interp, agg, old, _new) do { \ UINTVAL gen_agg, gen_new; \ if (!(_new) || PMC_IS_NULL(_new)) \ break; \ @@ -245,7 +245,7 @@ parrot_gc_gms_wb(interp, agg, old, _new); \ } while (0) -# define DOD_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) do { \ +# define GC_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) do { \ UINTVAL gen_agg, gen_new, gen_key; \ if (!(_new) || PMC_IS_NULL(_new)) \ break; \ Index: compilers/imcc/main.c =================================================================== --- compilers/imcc/main.c (revision 28110) +++ compilers/imcc/main.c (working copy) @@ -728,8 +728,8 @@ do_yylex_init(interp, &yyscanner); - Parrot_block_DOD(interp); - Parrot_block_GC(interp); + Parrot_block_GC_mark(interp); + Parrot_block_GC_sweep(interp); IMCC_INFO(interp)->yyscanner = yyscanner; IMCC_INFO(interp)->allocator = IMCC_VANILLA_ALLOCATOR; @@ -767,8 +767,8 @@ PARROT_WARNINGS_off(interp, PARROT_WARNINGS_ALL_FLAG); if (!IMCC_INFO(interp)->gc_off) { - Parrot_unblock_DOD(interp); - Parrot_unblock_GC(interp); + Parrot_unblock_GC_mark(interp); + Parrot_unblock_GC_sweep(interp); } if (obj_file) Index: compilers/imcc/parser_util.c =================================================================== --- compilers/imcc/parser_util.c (revision 28110) +++ compilers/imcc/parser_util.c (working copy) @@ -859,7 +859,7 @@ do_yylex_init(interp, &yyscanner); /* we create not yet anchored PMCs - e.g. Subs: turn off DOD */ - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); if (IMCC_INFO(interp)->last_unit) { /* a reentrant compile */ @@ -951,7 +951,7 @@ else imc_cleanup(interp, yyscanner); - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); yylex_destroy(yyscanner); @@ -1151,7 +1151,7 @@ * the string_compare() called from pmc_type() triggers DOD * which can destroy packfiles under construction */ - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); ignored = Parrot_push_context(interp, regs_used); UNUSED(ignored); @@ -1175,7 +1175,7 @@ yylex_destroy(yyscanner); } - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); Parrot_pop_context(interp); imc_cleanup(interp, NULL); Index: t/src/extend.t =================================================================== --- t/src/extend.t (revision 28110) +++ t/src/extend.t (working copy) @@ -710,8 +710,8 @@ { handler_node_t *node = interp->exit_handler_list; - Parrot_block_DOD(interp); - Parrot_block_GC(interp); + Parrot_block_GC_mark(interp); + Parrot_block_GC_sweep(interp); while (node) { handler_node_t * const next = node->next; Index: languages/lua/src/pmc/lua.pmc =================================================================== --- languages/lua/src/pmc/lua.pmc (revision 28110) +++ languages/lua/src/pmc/lua.pmc (working copy) @@ -38,14 +38,14 @@ Parrot_Context_info info; STRING *res = NULL; - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); if (Parrot_Context_get_info(interp, ctx, &info)) { res = Parrot_sprintf_c(interp, "\t%Ss:%d in function '%Ss'\n", info.file, info.line, info.subname); } - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); return res; } @@ -118,15 +118,15 @@ PMC *cont; if (sub_ctx->current_sub && PMC_metadata(sub_ctx->current_sub)) { Parrot_Context_info info; - Parrot_block_DOD(INTERP); + Parrot_block_GC_mark(INTERP); if (Parrot_Context_get_info(INTERP, sub_ctx, &info)) { STRING *retval = info.subname; - Parrot_unblock_DOD(INTERP); + Parrot_unblock_GC_mark(INTERP); RETURN(STRING *retval); } - Parrot_unblock_DOD(INTERP); + Parrot_unblock_GC_mark(INTERP); break; } @@ -406,16 +406,16 @@ && PMC_metadata(sub) && VTABLE_isa(INTERP, sub, const_string(INTERP, "LuaClosure"))) { Parrot_Context_info info; - Parrot_block_DOD(INTERP); + Parrot_block_GC_mark(INTERP); if (Parrot_Context_get_info(INTERP, sub_ctx, &info)) { STRING *res = Parrot_sprintf_c(INTERP, "%Ss:%d:", info.file, info.line); - Parrot_unblock_DOD(INTERP); + Parrot_unblock_GC_mark(INTERP); RETURN(STRING *res); } - Parrot_unblock_DOD(INTERP); + Parrot_unblock_GC_mark(INTERP); break; } Index: languages/lua/src/pmc/luatable.pmc =================================================================== --- languages/lua/src/pmc/luatable.pmc (revision 28110) +++ languages/lua/src/pmc/luatable.pmc (working copy) @@ -294,7 +294,7 @@ LUA_ASSERT(nelems<=oldsize, "wrong count"); - Parrot_block_DOD(interp); + Parrot_block_GC_mark(interp); /* using more than 3/4? */ if (nelems >= oldsize-oldsize/4) @@ -313,7 +313,7 @@ *lua_set(interp, t, old->key) = old->val; } - Parrot_unblock_DOD(interp); + Parrot_unblock_GC_mark(interp); /* free old array */ mem_sys_free(nold); Index: languages/dotnet/pmc/dotnetassembly.pmc =================================================================== --- languages/dotnet/pmc/dotnetassembly.pmc (revision 28110) +++ languages/dotnet/pmc/dotnetassembly.pmc (working copy) @@ -1936,17 +1936,17 @@ /* We create some PMCs that aren't reachable for a while, and GC runs will eat them. Thus we'll block DOD while we do it (and unblock it again later). */ - Parrot_block_DOD(INTERP); + Parrot_block_GC_mark(INTERP); /* Finally, we're ready to do something useful. Turn metadata into a myriad of PMCs. Woohoo! */ if (!metadata_to_pmcs(INTERP, SELF, in, ass)) { fclose(in); - Parrot_unblock_DOD(INTERP); + Parrot_unblock_GC_mark(INTERP); return; } - Parrot_unblock_DOD(INTERP); + Parrot_unblock_GC_mark(INTERP); /* We're done. Close file and set loaded flag. */ fclose(in);