On 12/11/2011 05:38 PM Benjamin Peterson wrote:
2011/12/11 Bengt Richter<b...@oz.net>:
Just musing -- if pypy can discover pure functions (or functions with simple
static
global side effects) and the jit transforms them into machine code in a
runtime memory-resident
image somewhere, could this image be transformed with some .so boilerplate
and metadata
into a loadable module which could be discovered for use more or less like a
.pyc that
corresponds to .py is used? Could the jit perhaps write into a memory-mapped
file that
could be closed on exit to preserve the image for possible final
post-processing into
a standard format .so full of ready-made functions and supporting data?
Basically, no. JIT compiled functions have lots of their runtime
context (like memory addresses) hardcoded into thme.
How many address spaces are used, and what would it take to emit (optionally of
course)
which segments stuff belonged to, like .text and .data etc, so an ELF32
relocatable loadable
could be constructed from the image + extra emitted data?
Would it be really hard to direct this special jit output to its own run time
segments for easier
capture, even if at the cost of indirections from the really dynamic contexts?
(my vague suppositions
involved here ;-) How about just for designated modules, giving them basic
.text, .data, and?
Regards,
Bengt Richter
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev