[Stackless] How does stackless work?
Just van Rossum
just at letterror.com
Sun Oct 8 20:22:50 CEST 2000
At 6:50 PM +0200 08-10-2000, Thomas Wouters wrote:
>If I understood how Stackless worked (what all those changes in ceval.c are
>for, for instance) I would help code it ;) As it is, I simply don't know
>what changes are for Stackless, and what changes are just the difference
>between the 1.5.2+ version SLP is based off, and the current CVS tree.
And that's indeed one of the main problems with Stackless as it is: "how on
earth does it do what it does?".
The changes to ceval.c serve several purposes:
- to make it stackless
- to make it faster
- to make the above two items easier to do...
A main change is the split up of eval_code2() into two pieces:
- eval_code2_setup() -- creates a new stack frame from a code object and
- eval_code2_loop() -- executes (starts or continues) a stack frame
(There's still plenty of stack assumptions that I would like to get rid of,
eg. the frame created by eval_code2_setup() uses the current frame as it's
f_back, and then makes itself the current frame.)
(Chris, how about trying to do a little series: explaining various changes
step by step?)
Stackless mailing list
Stackless at starship.python.net
More information about the Stackless