[Dlang-internal] DMD with GC

Joakim dlang at joakim.fea.st
Tue Dec 19 09:52:46 UTC 2017


On Tuesday, 7 November 2017 at 09:04:36 UTC, RazvanN wrote:
> Hi all,
>
> Currently the compiler is not garbage collected due to the fact 
> that the GC slows it down. This means that at some point you 
> could enable the GC, while at the moment if you do that you get 
> ugly segfaults (see [1]). I am interested in this because the 
> compiler library should have the possibility of being garbage 
> collected and I am curios if somebody knows what was the change 
> which made the compiler incompatible with the GC.

Seeing this late, but the dmd compiler itself was never a GC'ed 
program.  The frontend was written in C++ then mostly 
automatically translated to D, and the old manual allocation 
scheme was kept. To make it actually work with GC for the first 
time would probably require some work, same for your library.

The good news is your library is @nogc for free! ;)


More information about the Dlang-internal mailing list