[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT roadmap 2008 question
- From: CHU Run-min <churunmin@...>
- Date: Fri, 30 Oct 2009 14:51:44 +0800
in lgc.c
static void traversestack (global_State *g, lua_State *l) {
StkId o, lim;
CallInfo *ci;
markvalue(g, gt(l));
lim = l->top;
for (ci = l->base_ci; ci <= l->ci; ci++) {
lua_assert(ci->top <= l->stack_last);
if (lim < ci->top) lim = ci->top;
}
for (o = l->stack; o < l->top; o++)
markvalue(g, o);
for (; o <= lim; o++)
setnilvalue(o);
checkstacksizes(l, lim);
}
The call stack will be traversed in gc mark phase, so the BASE[-1]
will be treated specially. Though it is a number value, the gc known
its internals. So the function object will be marked.
May I got the right understanding?