On Mon, Oct 27, 2008 at 08:46:06AM +0000, Simon Peyton-Jones wrote:
> | Most of our users have reported that it is very easy to adapt a legacy
> | compiler to generate C-- code, but nobody has been willing to attempt
> | to adapt a legacy run-time system to work with the C-- run-time interface.
> 
> I don't know whether this'll be any use to anyone except us, but we're
> using C-- like crazy inside GHC (the Glasgow Haskell Compiler).  But
> not as an arms-length language.  Instead, inside GHC's compilation
> pipeline we use C-- as an internal data type; and after this summer's
> work by John Dias, we now have quite a respectable story on
> transforming, and framework for optimizing, this C-- code.  Since some
> of the runtime system is written in C--, we also have a route for
> parsing C-- and compiling it down the same pipeline.

In a perhaps not suprising parallel development, jhc uses c--
internally as well. The primitives in my GRIN back end map one-to-one
with c-- (but GRIN itself has higher level constructs), then over
several passes it transforms away all high level constructs until I have
something that is basically c-- internally. I then spit out C code, but
producing c-- code would be just as easy (well, easier actually).


        John

-- 
John Meacham - ⑆repetae.net⑆john⑈
_______________________________________________
Cminusminus mailing list
[email protected]
https://cminusminus.org/mailman/listinfo/cminusminus

Reply via email to