[pypy-dev] How to translate 300000 lines of C
Rocco Moretti
roccomoretti at netscape.net
Tue Jan 21 05:33:25 CET 2003
On another thread Christian Tismer <tismer at tismer.com> wrote:
>I tried to map [frameobject.c] on a 3.5 hour yourney from
>Kiel to Berlin, and I had one fourth done by an hour.
>Nevertheless, I got into trouble, just by comparing its
>implementation differences between 2.2.2 and 2.3a.
>Then I dropped that and decided that this is the wrong way.
I'm interested to know what problems you were encountering.
One issue I recall from frameobject.c is that it has a lot of optimizations regarding object caching and reuse. As a first approximation, we should probably ignore such optimizations. If we do add it in later, it should probably be as an optimization by psyco for *all* objects.
That said, theoretically, I like the idea of of a C->Py converter. (It did get tedious when I was doing it.)
However, I'm concerned if the time invested to make one would be worth it.
Christian Tismer <tismer at tismer.com> wrote:
>There are a number of free-ware C compilers around, and also
>some C interpreters.
But coded in which language? How difficult would it be to get them to "play nice" with Python (which is, I am assuming, where you want to code the conversion logic)? - This question probably boils down to asking what compiler/interpreter you have in mind to co-opt.
One caveat with me evaluating the benefits of this idea is that I don't have a feel how difficult tracking changes in CPython would be. We do have the changelog and Unit tests for CPython, so we wouldn't necessarily need to do a line-by-line comparison. We could approach the changes in more of a top-down level. Isn't Python supposed to be easier to maintain than C?
How does Jython do it?
Just my two atoms of copper-coated zinc.
-Rocco
__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
More information about the Pypy-dev
mailing list