PyPy JIT & C extensions, greenlet

There was a recent thread with the same subject and I would like to look into this a bit more. I knew pypy-stackless wouldn't work after I built a working 64-bit pypy w/ JIT, well, now I'm intrigued. I will look at the code more closely soon. Armin, Carl Friedrich, would you answer a couple of questions in the mean-time? What is the largest roadblock to making pypy-stackless work on pypy w/ JIT? Would it be possible/easier to port the greenlet module? Having built-in support for co-routines would be very nice but my own goal is to get greenlet working in any manner. If I could build a 64-bit pypy w/ JIT and then easy_install greenlet, that would work for me. Thanks, Ian P.S. congratulations on all your recent progress! I always look forward for the next pypy blog update :)

Hey. greenlet C module is quite incompatible with pypy and won't work. However making pypy work with jit and stackless is something that requires a bit of work only (teaching jit how to unroll the stack mostly) and I plan to look into it in the very near future. Cheers, fijal On Mon, Sep 27, 2010 at 1:49 PM, Ian P. Cooke <ipc@srand.net> wrote:

On 9/27/10 2:29 PM, Andy wrote:
Why wouldn't pypy work with greenlet but would work with Stackless? greenlet calls itself a spin-off of Stackless. Isn't greenlet a subset of Stackless without the scheduling? Could you explain a bit more?
This is a deep misconception. Neither stackless nor greenlets work with PyPy. Instead, a special coroutine version was written for PyP's RPython, and then Stackless was written as an application module. There is a greenlet implementation as well. They both rely on the stack unwinding, which is not yet implemented for the Jit. The original greenlets and stackless have some similarities, since they use the same tricks to modify the stack in assembly. This is not related to PyPy, this reasoning is just the improper level. ciao - chris -- Christian Tismer :^)<mailto:tismer@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/

Hey. greenlet C module is quite incompatible with pypy and won't work. However making pypy work with jit and stackless is something that requires a bit of work only (teaching jit how to unroll the stack mostly) and I plan to look into it in the very near future. Cheers, fijal On Mon, Sep 27, 2010 at 1:49 PM, Ian P. Cooke <ipc@srand.net> wrote:

Why wouldn't pypy work with greenlet but would work with Stackless? greenlet calls itself a spin-off of Stackless. Isn't greenlet a subset of Stackless without the scheduling? Could you explain a bit more? Thanks. --- On Mon, 9/27/10, Maciej Fijalkowski <fijall@gmail.com> wrote:

On 9/27/10 2:29 PM, Andy wrote:
Why wouldn't pypy work with greenlet but would work with Stackless? greenlet calls itself a spin-off of Stackless. Isn't greenlet a subset of Stackless without the scheduling? Could you explain a bit more?
This is a deep misconception. Neither stackless nor greenlets work with PyPy. Instead, a special coroutine version was written for PyP's RPython, and then Stackless was written as an application module. There is a greenlet implementation as well. They both rely on the stack unwinding, which is not yet implemented for the Jit. The original greenlets and stackless have some similarities, since they use the same tricks to modify the stack in assembly. This is not related to PyPy, this reasoning is just the improper level. ciao - chris -- Christian Tismer :^)<mailto:tismer@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
participants (4)
-
Andy
-
Christian Tismer
-
Ian P. Cooke
-
Maciej Fijalkowski