lua-users home
lua-l archive

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


Is there a keyword I could search in the mailing archive, to learn
more about the related discussion?

By the way, is it really so expensive that we have to avoid a
lua_checkstack() ? In this case, the call to lua_checkstack can be
made before GCTM(), outside the loop, to decrease the overhead of the
check. Is there justification to prefer an implicate assumption over
an explicit gurantee?

2013/5/16 Patrick Donnelly <batrick@batbytes.com>:
> Hi Dong,
>
> On Wed, May 15, 2013 at 7:44 PM, Dong Feng <middle.fengdong@gmail.com> wrote:
>> In GCTM(), there are two invocations to "setobj2s()", and then the
>> L->top is increased by 2. I have not found any code to guarantee the
>> remaining space of the top is enough before this increase. Is there
>> any ground rule for this kind of stack management or I just missed
>> anything?
>
> It's been said on the list before that the internals of Lua make some
> (safe) assumptions about the stack having a few free slots available
> for these types of manipulations.
>
> --
> - Patrick Donnelly
>