Friday, June 25, 2010
PyPy GSoC status update
Well, the backend is RPythonic again. And I managed to remove some of the boilerplate/duplicated code from the rx86 module, although there is still room for improvement. Also, some common cases of loading a large number of variables from memory locations that are "close" to one another became more efficient.
The main thing this coming week is to address an issue that I only became fully aware of in the middle of this week: Many places in the code use jumps with a 32-bit relative displacement that are sometimes patched later to point to a different destination. The problem is sometimes you need to patch it to point to a location farther away.
This issue had been masked by the fact that on some operating systems (Linux included), you can give the operating system a hint as to where you'd like the memory to be allocated, and as a result, all of the memory used by the JIT was within 32 bits of each other. But we can't count on that working all the time on all platforms, so we need to handle the edge case.
We have a plan for how to fix this while not making the common case any less efficient, and while it is not hugely difficult, it also isn't trivial.
After this issue is taken care of, the next thing will be to port the asmgcc root-finding strategy to 64-bit. (Without this, 64-bit JIT would have to use the very slow boehm garbage collector, which sort of defeats the purpose of a JIT)