3 ms·
I wish something like this existed for garbage-collected languages. The closest thing I know of is the JVM (and other similar VMs), but I'm hoping for ahead-of
by piinbinary 6y ago
I wish something like this existed for garbage-collected languages. The closest thing I know of is the JVM (and other similar VMs), but I'm hoping for ahead-of-time compilation.
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)
- jeremyjh 6y agoThere are LLVM backed languages that provide garbage collection; Julia and Crystal are the first two that come to mind. Haskell also has an LLVM back-end.
- biryani_chicken 6y agoSomething like the CIL[0]? I know there was a python and a ruby implementation on top of it. [0] https://en.wikipedia.org/wiki/Common_Intermediate_Language https://en.wikipedia.org/wiki/Common_Intermediate_Language
- csharptwdec19 6y agoThat's about viable nowadays. 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.
- erlend_sh 6y agoThe Mu Micro Virtual Machine might interest you: https://news.ycombinator.com/item?id=25278568 https://news.ycombinator.com/item?id=25278568
- yarg 6y agoThere's a version of the JDK that provides AOT.
- yarg 6y agohttps://docs.oracle.com/en/java/javase/15/docs/specs/man/jaotc.html https://docs.oracle.com/en/java/javase/15/docs/specs/man/jao... I thought this wasn't universally available (that it was only in a special version of the JDK - https://openjdk.java.net/projects/graal/ https://openjdk.java.net/projects/graal/). But it appears to be everywhere, albeit experimentally.
- lostmsu 6y agoI wish there would be pure .NET project, that at least matched QBE. Garbage collection would be interesting to tinker on top of it.