[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Some comments on CPS control flow functions in Lua 5.2
- From: Drake Wilson <drake@...>
- Date: Fri, 21 May 2010 10:45:03 -0500
Quoth Roberto Ierusalimschy <roberto@inf.puc-rio.br>, on 2010-05-21 09:32:24 -0300:
> I think I was not clear about the "quite complex restrictions". Surely
> destroying the C frames at each callk would be simpler for the one
> programming that particular function. (As you said, there would be
> only one continuation.) The problem is for people *using* such function.
>
> Lua can destroy a C frame only when there is a "protection point"
> (setjmp) down the stack *and* all intermediate C frames have
> continuations.
Ah, I see. Yes, I misunderstood what you said earlier, sorry. Now
that I look at the internals more, it seems like an unfortunate
restriction of the implementation. My reasoning was that since Lua
controls the entrance to the C frames to start with, it should be able
to fix everything up on return without reference to any lower frames,
but it seems that it's not built that way. Hmm.
I will have to poke around at this some more. Thanks for the
clarification.
> -- Roberto
---> Drake Wilson