by piinbinary · 5y ago · 0 comments
The key difficulty in adding garbage collection to code emitted with tools like this is being able to accurately tell what the root set is.
(I know LLVM has support for this in theory, but I have found nothing that tells how to actually use it)
I thought this wasn't universally available (that it was only in a special version of the JDK - https://openjdk.java.net/projects/graal/). But it appears to be everywhere, albeit experimentally.
[0] https://en.wikipedia.org/wiki/Common_Intermediate_Language
Elaborating: Until recently, your best option for running CIL in an AOT type environment would be Mono AOT, which has it's own limitations.
Nowadays, however, we do have CoreRT in a state that lets you do AOT, still with limitations around things like reflection. But, it's fairly doable nowadays, I would think.