[pypy-dev] How to translate 300000 lines of C

Rocco Moretti roccomoretti at netscape.net
Wed Jan 22 04:46:12 CET 2003

One issue re: the automatic C to Python translater just occured to me.

It's been mentioned that only portions of the C code would be automatically translated, certain sections being translated by hand. How would the interface between the two work if the hand translated sections differ from the C version?

Simplest example is basic types. A Python version would presumably be represented as a class with member functions. But the C code uses calls to accessor functions. How could we redirect the automatically generated code to call member functions as opposed to free floating functions?

A more difficult problem lies when we we start to reorganize the object/structure internals. Good case of this is the frame object. The C version has an array with multiple pointers to internal objects. Once you reorganize the internals, how do you tell the C->Python translator that f_stacktop isn't a PyObject pointer anymore, but an index off of another list?

Not to dissuade the effort, but I'm concerned we could get a situation where we are hesitant to rearrange the internals for the better because it would break our tools.

Cautiously Optimistic,

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