[pypy-dev] PyPy JIT & C extensions, greenlet

Andrew Francis andrewfr_ice at yahoo.com
Tue Oct 5 15:51:05 CEST 2010


Hi Armin and folks:

--- On Thu, 9/30/10, Armin Rigo <arigo at tunes.org> wrote:

> From: Armin Rigo <arigo at tunes.org>
> Subject: Re: [pypy-dev] PyPy JIT & C extensions, greenlet
> To: "Andrew Francis" <andrewfr_ice at yahoo.com>
> Cc: pypy-dev at codespeak.net
> Date: Thursday, September 30, 2010, 5:25 AM


> Maybe I should expand on an idea posted on #pypy by
> fijal.  He mentioned that he would like to try to support Stackless in
> PyPy without using the stackless transform, just by using the
> same low-level stack hacks that are done by greenlet.c and
> optionally by Stackless Python.  This means that there would be two
> different approaches we can consider to support Stackless in PyPy:

That sounds like a neat idea! 


>     tasklet-switching Python code    tasklet-switching Python code
>     becomes a single loop in         becomes N loops with residual calls
>                                      to machine code       

Maybe this is the core of my problems (and ability to help) - I have a superficial understanding of how Stackless works under the hood. Where do the N loops come from? I have read Christian's "Stackless Python" paper (http://www.python.org/workshops/2000-01/proceedings/papers/tismers/stackless.htm) and slowly but surely I do more stuff with the C Stackless code base. That said, I haven't found any particularly good papers on how the Python interpreter itself is architected. Maybe I should look at how the greenlet package works. Again, I would be happy to help but I am not quite sure where to start so at least I can ask intelligent questions in the pypy IRC.

Cheers,
Andrew



      



More information about the Pypy-dev mailing list