lua-users home
lua-l archive

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


Cool!!!!

I will look into this..

Thanks..

JC

-----Message d'origine-----
De : lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] De la part de Daniel
Silverstone
Envoyé : vendredi 22 octobre 2004 15:52
À : lua@bazar2.conectiva.com.br
Objet : RE: PATCH: true C coroutines -- yield across C stack from anywhere

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