Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Completely remove rt_finalize_gc.
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-sh committed Nov 5, 2012
1 parent 479a28e commit 8feb5f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/gc/gcx.d
Expand Up @@ -97,7 +97,7 @@ private
}
private
{
extern (C) void rt_finalize_gc(void* p);
extern (C) void rt_finalize2(void* p, bool det, bool resetMemory);

extern (C) void thread_suspendAll();
extern (C) void thread_resumeAll();
Expand Down Expand Up @@ -2587,7 +2587,7 @@ struct Gcx

sentinel_Invariant(sentinel_add(p));
if (pool.finals.nbits && pool.finals.testClear(biti))
rt_finalize_gc(sentinel_add(p));
rt_finalize2(sentinel_add(p), false, false);
clrBits(pool, biti, BlkAttr.ALL_BITS ^ BlkAttr.FINALIZE);

debug(COLLECT_PRINTF) printf("\tcollecting big %p\n", p);
Expand Down Expand Up @@ -2659,7 +2659,7 @@ struct Gcx

pool.freebits.set(biti);
if (pool.finals.nbits && pool.finals.test(biti))
rt_finalize_gc(sentinel_add(p));
rt_finalize2(sentinel_add(p), false, false);
toClear |= GCBits.BITS_1 << clearIndex;

List *list = cast(List *)p;
Expand Down
10 changes: 0 additions & 10 deletions src/rt/lifetime.d
Expand Up @@ -1258,16 +1258,6 @@ extern (C) void rt_finalize(void* p, bool det = true)
rt_finalize2(p, det, true);
}

/**
* An optimized version of rt_finalize that assumes it's being called from
* the garbage collector and avoids wasting time on things that are
* irrelevant in this case.
*/
extern (C) void rt_finalize_gc(void* p)
{
rt_finalize2(p, false, false);
}


/**
* Resize dynamic arrays with 0 initializers.
Expand Down

0 comments on commit 8feb5f5

Please sign in to comment.