mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
Small changes in macros that change GC colors
- Macro 'gray2black' was renamed 'nw2black' (Non-White to black), as it was already being used on objects that could be already black. - Macros 'white2gray' and 'black2gray' were unified in 'set2gray'; no reason to have two macros when one will do and, again, 'black2gray' was already being used on objects that could be already gray. Moreover, macros 'maskcolors' and 'maskgcbits' were negated to have ones in the described bits, instead of zeros. (This naming seems more intuitive.)
This commit is contained in:
parent
f7ce7e5faa
commit
f849885a4b
3 changed files with 40 additions and 39 deletions
2
lfunc.c
2
lfunc.c
|
|
@ -235,7 +235,7 @@ int luaF_close (lua_State *L, StkId level, int status) {
|
|||
setobj(L, slot, uv->v); /* move value to upvalue slot */
|
||||
uv->v = slot; /* now current value lives here */
|
||||
if (!iswhite(uv)) { /* neither white nor dead? */
|
||||
gray2black(uv); /* closed upvalues cannot be gray */
|
||||
nw2black(uv); /* closed upvalues cannot be gray */
|
||||
luaC_barrier(L, uv, slot);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue