[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and

From: Rhys Weatherley
Subject: Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC)
Date: Fri, 15 Mar 2002 08:49:51 +1000

James Michael DuPont wrote:

> > > Is it possible to extract enough infomation from
> > the
> > > CIL files to produce c-code? a de-parse?
> > Since C is just a high level assembly language,
> > If a JIT   is possible this "must" be possible.
> Good, Then we can glue the CIL decoder as a gcc
> frontend?

Anything is possible.  It's all just 1's and 0's after all.
Do I personally have time to do it?  No.  It would need
a volunteer to step up for it.

I'm also worried that this may turn gcc into a super
assembler, providing a way to circumvent the GPL.

> > But the  question is will this be useful ?.
> To be able to create a native exe via tha gcc given a
> CIL file? yes!

I think you would be better off starting with C#,
instead of CIL.  i.e. make pnet's C# compiler output
C instead of CIL/JVM bytecode.  This gives you
more access to the semantics of C#, and can hence
generate C code that is more likely to compile well.

i.e. "while" for "for" loops can be directly mapped
into the same construct in C, which helps gcc when
the code is compiled and optimised.  CIL uses raw
branch instructions, which are harder to de-compile
back to constructs that gcc can optimise well.

I've already thought about putting a C back-end
into cscc, but there are lots of other fish to fry first.
There are also difficult issues: how to support
reflection, for example.

> >  We are losing our most
> > important
> > point -- binary compatiblity.
> After that we can try and get the CIL back out,
> after the optimisation takes place.

Are you trying to run CIL through gcc so you can
optimise it, and then get better CIL out the other end?
If so, you need a CIL back-end in gcc to do that.
Perhaps you may want to read the pnet FAQ to see
just how difficult this really is:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]