Hi Armin, [Armin Rigo Tue, Aug 17, 2004 at 08:21:45PM +0100]
Perhaps generating Pyrex code isn't such a great idea.
i'd dare to say it was a good idea at the time because it worked and allowed us to test/debug/hack things quickly.
The great idea was to use CPython as an intermediate target.
yes, that was at the core.
But writing C extension modules in C instead of in Pyrex is quite possibly much cleaner [...]
It should be much cleaner in the end, although it seems you are currently avoiding to generate e.g. C-int <-> PyInt style code, not caring about Exceptions. At least i liked Pyrex for helping with all this neccessary "fluff" as well as integration into CPython so that it was easy to test the newly generated code. This is of course all possible to do ourself and it's probably a good time to do it.
A quick-test (borring from genpyrex.py) is checked in a branch in http://www.codespeak.net/svn/pypy/branch/pypy-genc/ producing (not yet compilable) C code ...
Yes, i hope it doesn't take too much time to actually generate C that doesn't result in Segfaults all the time :-)
It looks much like assembler code. It's quite readable and easy to map to the original flow graph, too.
Yes, that's nice.
Not sure what to do now. Does this look like a good idea?
try to get it to actually work and integrated into the tests? cheers, holger