[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Does LUA switch the C stack?
- From: Axel Mamode <axel@...>
- Date: Wed, 05 Sep 2007 10:02:07 +0200
Lothar Scholz wrote:
No. The luavm in general does not use the C stack for much. The
exception is coroutines (where there is a recursive call to the vm for
resume, and a return for yield) and C calls (well, obviously, you have
to call the C function with some C stack space).
Does LUA switch the C stack in any way when using coroutines? I'm 99%
sure the answer is no because it can't be done with ANSI C.
As you mentioned, it is all ANSI C, no raw manipulation of the C stack
For more information, see The implementation of Lua 5.0, by R.
Ierusalimschy, L. H. de Figueiredo, W. Celes:
Page 11 talks about exactly that.