On 27.06.2013 19:33, bearophile wrote:
Andrei Alexandrescu:
http://www.reddit.com/r/programming/comments/1fpw2r/dconf_2013_day_2_talk_5_a_precise_garbage/
Another thing to keep in account while designing a more precise garbage
collection is a possible special casing for Algebraic (and Variant, and
more generally for some standardized kind of tagged union):
http://d.puremagic.com/issues/show_bug.cgi?id=5057
In an Algebraic there is run-time information for the GC to decide if
inside it there are pointers to follow or not. It's mostly a matter of
letting the GC recognize and use such information.
In the proposed implementation, the gc_emplace function can be used to
pass this information to the GC. This would need to be called whenever
the location of pointers changes, so it's not high-performance.