[Python-Dev] 'stackless' python?

Christian Tismer tismer at appliedbiometrics.com
Wed May 19 23:38:07 CEST 1999


Tim Peters wrote:
> 
> [Christian Tismer]
> > I've put quite many hours into a non-recursive ceval.c
> > already.
> 
> Does that mean 6 or 600 <wink>?

6, or 10, or 20, if I count the time from the first
start with Sam's code, maybe.

> 
> > Should I continue? At least this would be a little improvement, also
> > if the continuation thing will not be born. ?
> 
> Guido wanted to move in the "flat interpreter" direction for Python2 anyway,
> so my belief is it's worth pursuing.
> 
> but-then-i-flipped-a-coin-with-two-heads-ly y'rs  - tim

Right. Who'se faces? :-)

On the stackless thing, what should I do.
I started to insert minimum patches, but it turns out
that I have to change frames a little (extending).

I can make quite small changes to the interpreter to replace
the recursive calls, but this involves extra flags in some cases,
where the interpreter is called the first time and so on.

What has more probability to be included into a future Python:
Tweaking the current thing only minimally, to make it as similar
as possible as the former?
Or do as much redesign as I think is needed to do it in
a clean way. This would mean to split eval_code2 into two functions,
where one is the interpreter kernel, and one is the frame manager.

There are also other places which do quite deep function calls
and finally call eval_code2. I think these should return a frame
object now. I could convince them to call or return frame,
depending on a flag, but it would be clean to rename the functions,
let them always deal with frames, and put the original function
on top of it.

Short, I can do larger changes which clean this all a bit up,
or I can make small changes which are more tricky to grasp,
but give just small diffs.

How to touch untouchable code the best? :-)

-- 
Christian Tismer             :^)   <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101   :    *Starship* http://starship.python.net
10553 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     we're tired of banana software - shipped green, ripens at home




More information about the Python-Dev mailing list