Re: [C--] C-- development

Simon Peyton-Jones <[email protected]> Fri, 15 Mar 2013 08:30:09 +0000
Newsgroups gmane.comp.lang.c--
Message-ID <59543203684B2244980D7E4057D5FBC147786E27@DB3EX14MBXC308.europe.corp.microsoft.com>
|  > We don't use qc--; rather there's a Cmm -> native code compiler in GHC.  And,
|  in fact a Cmm -> LLVM generator that then uses LLVM as a back end.
|  Will GHC benefit from separating Cmm -> LLVM/native code generator out
|  as a standalone backend?
|  
|  The Cmm backend can be built and tested independently from GHC
|  front-end, and it can also be used by other functional languages.

It'd be possible.  Indeed GHC as-is can and does compile .cmm files. It needs to do so to compile parts of the runtime system.  But (a) as earlier discussed, this s GHC's variant of C--, and really is more biased to compiling for the spineless tagless G-machine.   (b) we have not invested a lot of love in the .cmm -> native code path, so the error messages are probably bad, the type checker (GHC's Cmm is typed) is likely not great.  Etc.  

It would be an interesting, but non-trivial, task to make it more generally useful.   I'd be happy if someone wanted to take it on.  

Simon
_______________________________________________
Cminusminus mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/cminusminus