[M3devel] C generating back end

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Mon Jan 4 05:12:22 CET 2010


On Fri, Jan 01, 2010 at 06:42:34PM -0500, Tony Hosking wrote:
> On 1 Jan 2010, at 18:05, Jay K wrote:
> 
> > Fyi I finally looked at the 2.x implementation and the outputing of
> > C was implemented fairly directly at the m3front layer.
> > There wasn't the "M3CG" stuff.
> > 
> > 
> > Thus, the "easiest" way to get back such functionality would
> > probably be to "interleave" the old code and the new code within m3front.
> 
> I'd like to avoid that sort of interleaving.
> 
> > The "cleaner" way is probably to implement a new M3CG though and
> > leave m3front unchanged.
> 
> This is a much better plan.
> 
> > I still think generating portable C a great way to achieve portability.
> > Better yet maybe, generate C++ and use its exception handling feature.

There's a potential advantage in generating C++:  it might be possible 
to interoperate with C++.  Whether it's feasible to make the C++ 
readable and its contents stable is a big question, though.

-- hendrik



More information about the M3devel mailing list