lua-users home
lua-l archive

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


I'm studying the code about gc in lua 5.2. 
Here is the code in lgc.c: 
268     case LUA_TUPVAL: {    
269       UpVal *uv = gco2uv(o);
270       markvalue(g, uv->v);
271       if (uv->v != &uv->u.value)  /* open? */
272         return;  /* open upvalues remain gray */
273       size = sizeof(UpVal);
274       break;              
275     }
Why "open upvalues remain gray", not to black?
How dose GC process upvalue?
Thanks.