mun
mun copied to clipboard
Make GC API more generic
Currently Mun uses just type GarbageCollector = MarkSweep. It will be better to have trait GarbageCollector and implement it for GC impls.
It is important to have generic API if we want multiple GCs support in runtime, this also might help interfacing with LLVM GC API it is possible to pass all data (roots,stack maps etc) from LLVM to GarbageCollector trait and each impl of GC can use this data.
I assume you want to type the Runtime on a particular impl of GcRuntime + MemoryMapper? I think that's a great idea. One thing to keep in mind is how we expose that to the c api since we can't use a generic there.