From: Elliott S. <ell...@gm...> - 2013-02-26 17:51:51
|
On Mon, Feb 25, 2013 at 11:15 PM, Mike Manilone <cr...@gm...> wrote: > Dear hackers, > > LLVM is now a great platform for interpreted languages as well as static > languages. LLVM provides us with a high-speed JIT and interpreter (lli), > a compiler and a linker. That is, if we make an LLVM backend, we get all > of these at once. > I would note that writing an efficient GC in LLVM is not such an easy thing to do, especially if you want it to be precise-on-the-stack. I gave a talk about this after spending a summer trying (and mostly failing) to do the same for Rust[1]. LLVM's existing "GC support" works only when all pointers are permanently rooted on the stack, and prevents LLVM from ever moving pointers into registers. There are hacks to work around this, but they're all pretty awful. That said, if you're happy with conservative-on-the-stack GC, then maybe this won't matter to you. At any rate, it looks like the only realistic option for Rust at this point. I'd be happy to discuss this more if anyone is interested. [1]: https://github.com/elliottslaughter/rust-gc-talk [2]: http://llvm.org/docs/GarbageCollection.html -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay |