On Tue, Jul 19, 2011 at 08:04:36PM -0500, Jason E. Aten wrote:
On Tue, Jul 19, 2011 at 4:29 PM, Hendrik Boom hendrik@topoi.pooq.comwrote: The C-- project has some ideas how to manage the interface between a GC and its language. They may be right on how to do it, but I don't think their interfacing has yet been tested on anything parallel.
-- hendrik
This is an interesting comment. I concur with Marc that C-- looks to be dormant, especially now that Haskell has its LLVM backend.
I didn't know that Haskell had gone to LLVM.
But I'm not particularly impressed with how LLVM handles garbage collection. If you don't mind my asking, what specifically about C--'s approach to GC/language interface did you find particularly compelling?
MAybe the fact that they managed to integrate a mostly untyped langauge with a garbage collector that needs to knoww types. That they actually addressed the issue in their language design instead of ot looking like a total afterthought. And that they expect the C-- code generator to keep track of all the transient values in registers or wherever so that the garbage collector can actually get the information it needs to do its job. That, and that they've provided an interface to the write barrier that modern concurrent garbage collectors need to get any kind of speed. This stuff was designed in.
So the garbage collector can get, say, pointers to type-descritprs for the stuff on the stack. But as to what the type descriptors actually are, well, that's a matter between the high-level language and the garbage collector. C-- doesn't involve itself with it. I'm not sure whether this is a pity or not. A lot of the really tricky aspects of garbage collection don't care much about the details of the language. It would be useful to have that part available, only to be paranmetrized with the methods for interpreting type descriptors. It would be useful for that part, as a result, to be able to deal with the specific data layouts of different languages when they're used together in one program.
-- hendrik