[Python-Dev] Eliminating the block stack (was Re: Store x Load x --> DupStore)

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Feb 21 03:14:13 CET 2005

Phillip J. Eby wrote:
> At 03:56 PM 2/20/05 -0500, Phillip J. Eby wrote:
>> At 07:00 PM 2/20/05 +0000, Michael Hudson wrote:
>>> Eliminating the blockstack would be nice (esp. if it's enough to get
>>> frames small enough that they get allocated by PyMalloc)

Someone might like to take a look at the way Pyrex
generates C code for try-except and try-finally blocks.
It manages to get (what I hope is) the same effect
using local variables and gotos.

It doesn't have to deal with a stack pointer, but
I think that should just be a compiler-determinable
adjustment to be done when jumping to an outer

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list