On 19/07/2023 11:13 PM, IchorDev wrote:
On Wednesday, 19 July 2023 at 10:50:07 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Copying out the conservative GC, register it under a different name
and getting that to compile and link without recompiling druntime
would be a good place to begin without having to understand how GC's
work.
That sounds pretty easy, but I don't really see how would that be
particularly helpful to allowing a different style of GC to be registered?
druntime supports registering of GC's not compiled with druntime.
But because some of the machinery isn't available to you, you would have
to recreate it.
So in practice you cannot find a GC on the dub-registry to try it out.
Even if one were to exist, you would have to do a new build of
druntime/phobos special which isn't the easiest thing to do.
https://github.com/dlang/dmd/blob/master/druntime/src/core/gc/registry.d#L39
Regardless, its a barrier to anyone wanting to try writing a GC to
experiment with (or port one).