lua-users home
lua-l archive

RE: PATCH: true C coroutines -- yield across C stack from anywhere

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, 2004年10月22日 at 15:47 +0200, Jean-Christophe Capdevila wrote:
> If i'am not wrong, each call will generate "phantom" calls to CurriedLoops..
No; the CurriedLoops function returns a function which does the
while...do...end looping around the provided function; so you get one
extra function on the stack and it tail-calls anyway so it's not even an
expensive stack frame :-)
D.
-- 
Daniel Silverstone http://www.digital-scurf.org/
PGP mail accepted and encouraged. Key Id: 2BC8 4016 2068 7895

AltStyle によって変換されたページ (->オリジナル) /