On Thu, Feb 23, 2006 at 10:37:00AM +0100, Leopold Toetsch wrote:
> 
> On Feb 23, 2006, at 5:06, Patrick R. Michaud wrote:
> >PGE does not expect that a sub will restore the state of the user
> >stack, but it does expect that *coroutines* get their own copy of
> >the user stack, and that calling/returning from a coroutine will
> >not affect the current user stack.  
> [...]
> Well, there are two issues involved with the user stack:
> * do we really need it / want it / keep it [1]
> * if so, how are the semantics across sub calls or for coros

I've just committed an update (r11722) that eliminates PGE's
use of save/restore opcodes in the code it generates -- indeed,
PGE no longer has any save or restore opcodes and thus doesn't 
need the user stack at all.  

Also, with these changes, the patch that started this thread 
now seems to work (all tests pass on my system, including PGE tests).  
Since I don't really understand the details of what it is doing, I'll 
leave it to someone else to decide its fate.  :-)

My intuition says that if we keep the user stack around, then 
coroutines should continue to get their own user stack, and 
any manipulation of the user stack by a coroutine should not 
affect the user stack of the caller.  But with this latest update
to PGE I'm completely happy to leave that discussion for the future... :-)

Hope this helps, and thanks,

Pm

Reply via email to