[PyPy-issue] [issue687] Patch to make the generated C filenames reflect the RPython source filenames
pypy-dev-issue at codespeak.net
Tue Apr 19 00:59:10 CEST 2011
New submission from Dave Malcolm <dmalcolm at redhat.com>:
Rationale: I'm trying to make the generated C "sources" for PyPy be more amenable to debugging at the C level,
when debugging low level crashes, or e.g. when valgrinding pypy.
Currently, the bulk of the generated C sources are of the form:
implement.c, implement1.c, implement2.c, etc
I'm attaching a patch which tries to make the generated C sources reflect that of the RPython sources, and
adds testing for this.
With this is place:
has these generated C files:
rather than merely lots of implement([0-9]+).c files.
Note that all generated files are still within the same directory, which I believe is a requirement (to be
amenable to easy grepping).
With this patch, test_genc.py and test_standalone.py fully pass; am about to try a full translation.
I showed a variant of this to arigo at PyCon US last month, in which I attempted to subdivide the FuncNode
instances based on heir names. Doing so required introducing a rather ugly and arbitrary naming policy into
the translator, which IIRC arigo greatly disliked. This new approach is purely based on the RPython
filenames, and is hopefully therefore more acceptable.
nosy: dmalcolm, pypy-issue
title: Patch to make the generated C filenames reflect the RPython source filenames
PyPy development tracker <pypy-dev-issue at codespeak.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3893 bytes
Desc: not available
More information about the Pypy-issue