[pypy-dev] CLI code generation

Samuele Pedroni pedronis at strakt.com
Mon Mar 20 16:01:52 CET 2006

Carl Friedrich Bolz wrote:

> Hi Antonio!
> just a few things that were not mentioned yet.
> First of all: would you like to have your code live in the "official" 
> pypy-dist directory (Holger proposed using your user directory)? If 
> yes that would mean that you had to agree to license your code under 
> the MIT License (and to promise to follow the coding-guide and to 
> write tests :-). That would mean that much more people would see what 
> you are doing and could provide you with pointers about possible 
> improvements. The most appropriate place for a cli backend would 
> probably be pypy-dist/translator/cli
> Antonio Cuni wrote:
>> holger krekel wrote:
>>> Hi Antonio,
>>> On Sun, Mar 19, 2006 at 20:53 +0100, Antonio Cuni wrote:
>>>> as I said I've begun writing the .NET CLI backend; it is still very 
>>>> experimental but it can already compile correctly some code 
>>>> snippets such as the algorithm for computing fibonacci's numbers.
> very cool!
>>> cool!  I would be interested to hear a bit more about your concrete
>>> current approach. 
>> I respond here so that other can read, if they are interested.
>> The first decision I took is whether to generate IL code (to be 
>> assembled with ilasm) or C# code: I choose the first mainly because 
>> C# lacks the goto statement and it would be difficult to implement 
>> flow control.
> [snip]
> Will the .NET backend use the ootypesystem (which is what gensqueak uses)

it should use it but as it is, I think the ootypesystem is a bit too lax 
type-wise, so the rtypeing of it can get away skipping casts (this is 
mostly because so far its evolution has been driven
by gensqueak), basically the casts in ootype.py should not be noop but 
switch between type-restricted views on the same object.

> or the lltypesystem (which is what genllvm, genc and genjavascript 
> uses)? I guess for C# the former would make more sense, but I have no 
> clue how low-level IL is (I don't really have any clue about .NET at 
> all :-).
> For simple things like arithmetic this is largely irrelevant but as 
> soon as it comes to any sort of data structure this is quite important.
> Cheers,
> Carl Friedrich
> _______________________________________________
> pypy-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/pypy-dev

More information about the Pypy-dev mailing list