Index: src/oo.c =================================================================== --- src/oo.c (revision 41448) +++ src/oo.c (revision 41449) @@ -743,7 +743,7 @@ for (entry = 0; entry < TBL_SIZE; ++entry) { Meth_cache_entry *e = mc->idx[type][entry]; while (e) { - Parrot_gc_mark_PObj_alive(interp, (PObj *)e->pmc); + Parrot_gc_mark_PMC_alive(interp, e->pmc); e = e->next; } } Index: src/pmc/capture.pmc =================================================================== --- src/pmc/capture.pmc (revision 41448) +++ src/pmc/capture.pmc (revision 41449) @@ -507,8 +507,7 @@ return; for (i = PARROT_CAPTURE(SELF)->data_size - 1; i >= 0; --i) - if (data[i]) - Parrot_gc_mark_PObj_alive(interp, (PObj *)data[i]); + Parrot_gc_mark_PMC_alive(interp, data[i]); } /* Index: src/pmc/context.pmc =================================================================== --- src/pmc/context.pmc (revision 41448) +++ src/pmc/context.pmc (revision 41449) @@ -60,42 +60,16 @@ if (!ctx) return; - obj = (PObj *)ctx->caller_ctx; - if (obj) - Parrot_gc_mark_PObj_alive(interp, obj); + Parrot_gc_mark_PMC_alive(INTERP, ctx->caller_ctx); + Parrot_gc_mark_PMC_alive(INTERP, ctx->lex_pad); + Parrot_gc_mark_PMC_alive(INTERP, ctx->outer_ctx); + Parrot_gc_mark_PMC_alive(INTERP, ctx->current_sub); + Parrot_gc_mark_PMC_alive(INTERP, ctx->handlers); + Parrot_gc_mark_PMC_alive(INTERP, ctx->current_cont); + Parrot_gc_mark_PMC_alive(INTERP, ctx->current_object); + Parrot_gc_mark_PMC_alive(INTERP, ctx->current_namespace); + Parrot_gc_mark_PMC_alive(INTERP, ctx->results_signature); - obj = (PObj *)ctx->lex_pad; - if (obj) - Parrot_gc_mark_PObj_alive(interp, obj); - - obj = (PObj *)ctx->outer_ctx; - if (obj) - Parrot_gc_mark_PObj_alive(interp, obj); - - obj = (PObj *)ctx->current_sub; - if (obj) - Parrot_gc_mark_PObj_alive(interp, obj); - - obj = (PObj *)ctx->handlers; - if (obj) - Parrot_gc_mark_PObj_alive(interp, obj); - - obj = (PObj *)ctx->current_cont; - if (obj && !PObj_live_TEST(obj)) - Parrot_gc_mark_PObj_alive(interp, obj); - - obj = (PObj *)ctx->current_object; - if (obj) - Parrot_gc_mark_PObj_alive(interp, obj); - - obj = (PObj *)ctx->current_namespace; - if (obj) - Parrot_gc_mark_PObj_alive(interp, obj); - - obj = (PObj *)ctx->results_signature; - if (obj) - Parrot_gc_mark_PObj_alive(interp, obj); - if (!ctx->n_regs_used) return; Index: src/vtables.c =================================================================== --- src/vtables.c (revision 41448) +++ src/vtables.c (revision 41449) @@ -212,16 +212,11 @@ if (!vtable) continue; - if (vtable->mro) - Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->mro); - if (vtable->_namespace) - Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->_namespace); - if (vtable->whoami) - Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->whoami); - if (vtable->provides_str) - Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->provides_str); - if (vtable->pmc_class) - Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->pmc_class); + Parrot_gc_mark_PMC_alive(interp, vtable->mro); + Parrot_gc_mark_PMC_alive(interp, vtable->_namespace); + Parrot_gc_mark_STRING_alive(interp, vtable->whoami); + Parrot_gc_mark_STRING_alive(interp, vtable->provides_str); + Parrot_gc_mark_PMC_alive(interp, vtable->pmc_class); } } Index: src/gc/gc_ms.c =================================================================== --- src/gc/gc_ms.c (revision 41448) +++ src/gc/gc_ms.c (revision 41449) @@ -222,7 +222,7 @@ /* keep the scheduler and its kids alive for Task-like PMCs to destroy * themselves; run a sweep to collect them */ if (interp->scheduler) { - Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->scheduler); + Parrot_gc_mark_PMC_alive(interp, interp->scheduler); VTABLE_mark(interp, interp->scheduler); Parrot_gc_sweep_pool(interp, interp->mem_pools->pmc_pool); } Index: src/gc/mark_sweep.c =================================================================== --- src/gc/mark_sweep.c (revision 41448) +++ src/gc/mark_sweep.c (revision 41449) @@ -188,7 +188,7 @@ } /* mark the list of iglobals */ - Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->iglobals); + Parrot_gc_mark_PMC_alive(interp, interp->iglobals); /* mark the current continuation */ obj = (PObj *)interp->current_cont; @@ -196,20 +196,19 @@ Parrot_gc_mark_PObj_alive(interp, obj); /* mark the current context. */ - Parrot_gc_mark_PObj_alive(interp, (PObj*)CURRENT_CONTEXT(interp)); + Parrot_gc_mark_PMC_alive(interp, CURRENT_CONTEXT(interp)); /* mark the dynamic environment. */ - Parrot_gc_mark_PObj_alive(interp, (PObj*)interp->dynamic_env); + Parrot_gc_mark_PMC_alive(interp, interp->dynamic_env); /* mark the vtables: the data, Class PMCs, etc. */ mark_vtables(interp); /* mark the root_namespace */ - Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->root_namespace); + Parrot_gc_mark_PMC_alive(interp, interp->root_namespace); /* mark the concurrency scheduler */ - if (interp->scheduler) - Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->scheduler); + Parrot_gc_mark_PMC_alive(interp, interp->scheduler); /* s. packfile.c */ mark_const_subs(interp); @@ -218,15 +217,15 @@ mark_object_cache(interp); /* Now mark the class hash */ - Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->class_hash); + Parrot_gc_mark_PMC_alive(interp, interp->class_hash); /* Now mark the HLL stuff */ - Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->HLL_info); - Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->HLL_namespace); + Parrot_gc_mark_PMC_alive(interp, interp->HLL_info); + Parrot_gc_mark_PMC_alive(interp, interp->HLL_namespace); /* Mark the registry */ PARROT_ASSERT(interp->gc_registry); - Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->gc_registry); + Parrot_gc_mark_PMC_alive(interp, interp->gc_registry); /* Mark the MMD cache. */ if (interp->op_mmd_cache) @@ -546,10 +545,9 @@ PObj_high_priority_gc_CLEAR(current); /* mark properties */ - if (PMC_metadata(current)) - Parrot_gc_mark_PObj_alive(interp, (PObj *)PMC_metadata(current)); + Parrot_gc_mark_PMC_alive(interp, PMC_metadata(current)); - if (PObj_custom_mark_TEST(current)) { + if (PObj_custom_mark_TEST(current)) { PARROT_ASSERT(!PObj_on_free_list_TEST(current)); VTABLE_mark(interp, current); } Index: src/dynpmc/dynlexpad.pmc =================================================================== --- src/dynpmc/dynlexpad.pmc (revision 41448) +++ src/dynpmc/dynlexpad.pmc (revision 41449) @@ -200,8 +200,7 @@ VTABLE void mark() { PMC *std_pad = PARROT_DYNLEXPAD(SELF)->init; - if (std_pad) - Parrot_gc_mark_PObj_alive(interp, (PObj *)std_pad); + Parrot_gc_mark_PMC_alive(INTERP, std_pad); if (PARROT_DYNLEXPAD(SELF)->hash) parrot_mark_hash(interp, PARROT_DYNLEXPAD(SELF)->hash); } Index: src/packfile.c =================================================================== --- src/packfile.c (revision 41448) +++ src/packfile.c (revision 41449) @@ -805,13 +805,11 @@ case PFC_PMC: case PFC_KEY: pmc = constants[i]->u.key; - if (pmc) - Parrot_gc_mark_PObj_alive(interp, (PObj *)pmc); + Parrot_gc_mark_PMC_alive(interp, pmc); break; case PFC_STRING: string = constants[i]->u.string; - if (string) - Parrot_gc_mark_PObj_alive(interp, (PObj *)string); + Parrot_gc_mark_STRING_alive(interp, string); break; default: /* Do nothing. */ Index: src/io/core.c =================================================================== --- src/io/core.c (revision 41448) +++ src/io/core.c (revision 41449) @@ -125,9 +125,7 @@ * to be kept alive AFAIK -leo */ for (i = 0; i < 3; i++) { - if (table[i]) { - Parrot_gc_mark_PObj_alive(interp, (PObj *)table[i]); - } + Parrot_gc_mark_PMC_alive(interp, table[i]); } } Index: src/key.c =================================================================== --- src/key.c (revision 41448) +++ src/key.c (revision 41449) @@ -612,17 +612,13 @@ if (flags == KEY_string_FLAG) { STRING *str_key; GETATTR_Key_str_key(interp, key, str_key); - - /* XXX str_key can be NULL from GETATTR_Key_str_key, */ - /* so shouldn't be marked. */ - Parrot_gc_mark_PObj_alive(interp, (PObj *)str_key); + Parrot_gc_mark_STRING_alive(interp, str_key); } /* Mark next key */ if ((flags == KEY_string_FLAG) || (flags == KEY_pmc_FLAG)) { GETATTR_Key_next_key(interp, key, next_key); - if (next_key) - Parrot_gc_mark_PObj_alive(interp, (PObj *)next_key); + Parrot_gc_mark_PMC_alive(interp, next_key); } }