diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-07-27 11:39:42 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-07-27 11:39:42 -0300 |
commit | d2c2e32e8a0f649099de0e9d04b5a72037b7b138 (patch) | |
tree | 327d3a7bd2ca97289618a0cb5daf7704ad1d5784 /lfunc.c | |
parent | 8c7c9ea06502b8caa5224bf74c90a8885dbe0d42 (diff) | |
download | lua-d2c2e32e8a0f649099de0e9d04b5a72037b7b138.tar.gz lua-d2c2e32e8a0f649099de0e9d04b5a72037b7b138.tar.bz2 lua-d2c2e32e8a0f649099de0e9d04b5a72037b7b138.zip |
All objects are kept 'new' in incremental GC
Small changes to ensure that all objects are kept 'new' in incremental
GC (except for fixed strings, which are always old) and to make that
fact clearer.
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -234,9 +234,10 @@ int luaF_close (lua_State *L, StkId level, int status) { | |||
234 | luaF_unlinkupval(uv); | 234 | luaF_unlinkupval(uv); |
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)) | 237 | if (!iswhite(uv)) { /* neither white nor dead? */ |
238 | gray2black(uv); /* closed upvalues cannot be gray */ | 238 | gray2black(uv); /* closed upvalues cannot be gray */ |
239 | luaC_barrier(L, uv, slot); | 239 | luaC_barrier(L, uv, slot); |
240 | } | ||
240 | } | 241 | } |
241 | return status; | 242 | return status; |
242 | } | 243 | } |