Ticket #1067: 41448.41449.diff
File 41448.41449.diff, 9.5 KB (added by jkeenan, 12 years ago) |
---|
-
src/oo.c
743 743 for (entry = 0; entry < TBL_SIZE; ++entry) { 744 744 Meth_cache_entry *e = mc->idx[type][entry]; 745 745 while (e) { 746 Parrot_gc_mark_P Obj_alive(interp, (PObj *)e->pmc);746 Parrot_gc_mark_PMC_alive(interp, e->pmc); 747 747 e = e->next; 748 748 } 749 749 } -
src/pmc/capture.pmc
507 507 return; 508 508 509 509 for (i = PARROT_CAPTURE(SELF)->data_size - 1; i >= 0; --i) 510 if (data[i]) 511 Parrot_gc_mark_PObj_alive(interp, (PObj *)data[i]); 510 Parrot_gc_mark_PMC_alive(interp, data[i]); 512 511 } 513 512 514 513 /* -
src/pmc/context.pmc
60 60 if (!ctx) 61 61 return; 62 62 63 obj = (PObj *)ctx->caller_ctx; 64 if (obj) 65 Parrot_gc_mark_PObj_alive(interp, obj); 63 Parrot_gc_mark_PMC_alive(INTERP, ctx->caller_ctx); 64 Parrot_gc_mark_PMC_alive(INTERP, ctx->lex_pad); 65 Parrot_gc_mark_PMC_alive(INTERP, ctx->outer_ctx); 66 Parrot_gc_mark_PMC_alive(INTERP, ctx->current_sub); 67 Parrot_gc_mark_PMC_alive(INTERP, ctx->handlers); 68 Parrot_gc_mark_PMC_alive(INTERP, ctx->current_cont); 69 Parrot_gc_mark_PMC_alive(INTERP, ctx->current_object); 70 Parrot_gc_mark_PMC_alive(INTERP, ctx->current_namespace); 71 Parrot_gc_mark_PMC_alive(INTERP, ctx->results_signature); 66 72 67 obj = (PObj *)ctx->lex_pad;68 if (obj)69 Parrot_gc_mark_PObj_alive(interp, obj);70 71 obj = (PObj *)ctx->outer_ctx;72 if (obj)73 Parrot_gc_mark_PObj_alive(interp, obj);74 75 obj = (PObj *)ctx->current_sub;76 if (obj)77 Parrot_gc_mark_PObj_alive(interp, obj);78 79 obj = (PObj *)ctx->handlers;80 if (obj)81 Parrot_gc_mark_PObj_alive(interp, obj);82 83 obj = (PObj *)ctx->current_cont;84 if (obj && !PObj_live_TEST(obj))85 Parrot_gc_mark_PObj_alive(interp, obj);86 87 obj = (PObj *)ctx->current_object;88 if (obj)89 Parrot_gc_mark_PObj_alive(interp, obj);90 91 obj = (PObj *)ctx->current_namespace;92 if (obj)93 Parrot_gc_mark_PObj_alive(interp, obj);94 95 obj = (PObj *)ctx->results_signature;96 if (obj)97 Parrot_gc_mark_PObj_alive(interp, obj);98 99 73 if (!ctx->n_regs_used) 100 74 return; 101 75 -
src/vtables.c
212 212 if (!vtable) 213 213 continue; 214 214 215 if (vtable->mro) 216 Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->mro); 217 if (vtable->_namespace) 218 Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->_namespace); 219 if (vtable->whoami) 220 Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->whoami); 221 if (vtable->provides_str) 222 Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->provides_str); 223 if (vtable->pmc_class) 224 Parrot_gc_mark_PObj_alive(interp, (PObj *)vtable->pmc_class); 215 Parrot_gc_mark_PMC_alive(interp, vtable->mro); 216 Parrot_gc_mark_PMC_alive(interp, vtable->_namespace); 217 Parrot_gc_mark_STRING_alive(interp, vtable->whoami); 218 Parrot_gc_mark_STRING_alive(interp, vtable->provides_str); 219 Parrot_gc_mark_PMC_alive(interp, vtable->pmc_class); 225 220 } 226 221 } 227 222 -
src/gc/gc_ms.c
222 222 /* keep the scheduler and its kids alive for Task-like PMCs to destroy 223 223 * themselves; run a sweep to collect them */ 224 224 if (interp->scheduler) { 225 Parrot_gc_mark_P Obj_alive(interp, (PObj *)interp->scheduler);225 Parrot_gc_mark_PMC_alive(interp, interp->scheduler); 226 226 VTABLE_mark(interp, interp->scheduler); 227 227 Parrot_gc_sweep_pool(interp, interp->mem_pools->pmc_pool); 228 228 } -
src/gc/mark_sweep.c
188 188 } 189 189 190 190 /* mark the list of iglobals */ 191 Parrot_gc_mark_P Obj_alive(interp, (PObj *)interp->iglobals);191 Parrot_gc_mark_PMC_alive(interp, interp->iglobals); 192 192 193 193 /* mark the current continuation */ 194 194 obj = (PObj *)interp->current_cont; … … 196 196 Parrot_gc_mark_PObj_alive(interp, obj); 197 197 198 198 /* mark the current context. */ 199 Parrot_gc_mark_P Obj_alive(interp, (PObj*)CURRENT_CONTEXT(interp));199 Parrot_gc_mark_PMC_alive(interp, CURRENT_CONTEXT(interp)); 200 200 201 201 /* mark the dynamic environment. */ 202 Parrot_gc_mark_P Obj_alive(interp, (PObj*)interp->dynamic_env);202 Parrot_gc_mark_PMC_alive(interp, interp->dynamic_env); 203 203 204 204 /* mark the vtables: the data, Class PMCs, etc. */ 205 205 mark_vtables(interp); 206 206 207 207 /* mark the root_namespace */ 208 Parrot_gc_mark_P Obj_alive(interp, (PObj *)interp->root_namespace);208 Parrot_gc_mark_PMC_alive(interp, interp->root_namespace); 209 209 210 210 /* mark the concurrency scheduler */ 211 if (interp->scheduler) 212 Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->scheduler); 211 Parrot_gc_mark_PMC_alive(interp, interp->scheduler); 213 212 214 213 /* s. packfile.c */ 215 214 mark_const_subs(interp); … … 218 217 mark_object_cache(interp); 219 218 220 219 /* Now mark the class hash */ 221 Parrot_gc_mark_P Obj_alive(interp, (PObj *)interp->class_hash);220 Parrot_gc_mark_PMC_alive(interp, interp->class_hash); 222 221 223 222 /* Now mark the HLL stuff */ 224 Parrot_gc_mark_P Obj_alive(interp, (PObj *)interp->HLL_info);225 Parrot_gc_mark_P Obj_alive(interp, (PObj *)interp->HLL_namespace);223 Parrot_gc_mark_PMC_alive(interp, interp->HLL_info); 224 Parrot_gc_mark_PMC_alive(interp, interp->HLL_namespace); 226 225 227 226 /* Mark the registry */ 228 227 PARROT_ASSERT(interp->gc_registry); 229 Parrot_gc_mark_P Obj_alive(interp, (PObj *)interp->gc_registry);228 Parrot_gc_mark_PMC_alive(interp, interp->gc_registry); 230 229 231 230 /* Mark the MMD cache. */ 232 231 if (interp->op_mmd_cache) … … 546 545 PObj_high_priority_gc_CLEAR(current); 547 546 548 547 /* mark properties */ 549 if (PMC_metadata(current)) 550 Parrot_gc_mark_PObj_alive(interp, (PObj *)PMC_metadata(current)); 548 Parrot_gc_mark_PMC_alive(interp, PMC_metadata(current)); 551 549 552 550 if (PObj_custom_mark_TEST(current)) { 553 551 PARROT_ASSERT(!PObj_on_free_list_TEST(current)); 554 552 VTABLE_mark(interp, current); 555 553 } -
src/dynpmc/dynlexpad.pmc
200 200 201 201 VTABLE void mark() { 202 202 PMC *std_pad = PARROT_DYNLEXPAD(SELF)->init; 203 if (std_pad) 204 Parrot_gc_mark_PObj_alive(interp, (PObj *)std_pad); 203 Parrot_gc_mark_PMC_alive(INTERP, std_pad); 205 204 if (PARROT_DYNLEXPAD(SELF)->hash) 206 205 parrot_mark_hash(interp, PARROT_DYNLEXPAD(SELF)->hash); 207 206 } -
src/packfile.c
805 805 case PFC_PMC: 806 806 case PFC_KEY: 807 807 pmc = constants[i]->u.key; 808 if (pmc) 809 Parrot_gc_mark_PObj_alive(interp, (PObj *)pmc); 808 Parrot_gc_mark_PMC_alive(interp, pmc); 810 809 break; 811 810 case PFC_STRING: 812 811 string = constants[i]->u.string; 813 if (string) 814 Parrot_gc_mark_PObj_alive(interp, (PObj *)string); 812 Parrot_gc_mark_STRING_alive(interp, string); 815 813 break; 816 814 default: 817 815 /* Do nothing. */ -
src/io/core.c
125 125 * to be kept alive AFAIK -leo 126 126 */ 127 127 for (i = 0; i < 3; i++) { 128 if (table[i]) { 129 Parrot_gc_mark_PObj_alive(interp, (PObj *)table[i]); 130 } 128 Parrot_gc_mark_PMC_alive(interp, table[i]); 131 129 } 132 130 } 133 131 -
src/key.c
612 612 if (flags == KEY_string_FLAG) { 613 613 STRING *str_key; 614 614 GETATTR_Key_str_key(interp, key, str_key); 615 616 /* XXX str_key can be NULL from GETATTR_Key_str_key, */ 617 /* so shouldn't be marked. */ 618 Parrot_gc_mark_PObj_alive(interp, (PObj *)str_key); 615 Parrot_gc_mark_STRING_alive(interp, str_key); 619 616 } 620 617 621 618 /* Mark next key */ 622 619 if ((flags == KEY_string_FLAG) || (flags == KEY_pmc_FLAG)) { 623 620 GETATTR_Key_next_key(interp, key, next_key); 624 if (next_key) 625 Parrot_gc_mark_PObj_alive(interp, (PObj *)next_key); 621 Parrot_gc_mark_PMC_alive(interp, next_key); 626 622 } 627 623 628 624 }