3 ms·
You say the library should take a couple parameters, such as the primitive to use for memory barriers - but the memory barriers are something the GC would need
by chrisseaton 12y ago
You say the library should take a couple parameters, such as the primitive to use for memory barriers - but the memory barriers are something the GC would need to tell the compiler about, not the other way around. So your library needs to know about how your compiler works, and it's no longer really a library, it's now a language feature that needs to tie into the most intimate parts of your compiler's intermediate representation. That's why you don't get libprecisegc.o.
- amelius 12y agoYes, I agree that there should be cooperation between the library and the compiler. But that is also the case for RAII, for example, where the compiler provides the primitives (through language design, e.g., constructors, destructors, copy constructors, etc.) which allow it to work. I'm just wondering why no such thing exists for garbage collection (yes, I'm aware that the interface would be much more complicated).