diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-08-13 15:23:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-08-13 15:23:21 -0300 |
commit | f849885a4b49f2d766e6befc67475c05240023eb (patch) | |
tree | ab680958b8cac3cef61c63d5c54c448db7f100ae /lfunc.c | |
parent | f7ce7e5faae69fcab0126d8bfd34b685f1dcb019 (diff) | |
download | lua-f849885a4b49f2d766e6befc67475c05240023eb.tar.gz lua-f849885a4b49f2d766e6befc67475c05240023eb.tar.bz2 lua-f849885a4b49f2d766e6befc67475c05240023eb.zip |
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.)
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -235,7 +235,7 @@ int luaF_close (lua_State *L, StkId level, int status) { | |||
235 | setobj(L, slot, uv->v); /* move value to upvalue slot */ | 235 | setobj(L, slot, uv->v); /* move value to upvalue slot */ |
236 | uv->v = slot; /* now current value lives here */ | 236 | uv->v = slot; /* now current value lives here */ |
237 | if (!iswhite(uv)) { /* neither white nor dead? */ | 237 | if (!iswhite(uv)) { /* neither white nor dead? */ |
238 | gray2black(uv); /* closed upvalues cannot be gray */ | 238 | nw2black(uv); /* closed upvalues cannot be gray */ |
239 | luaC_barrier(L, uv, slot); | 239 | luaC_barrier(L, uv, slot); |
240 | } | 240 | } |
241 | } | 241 | } |