From d2c2e32e8a0f649099de0e9d04b5a72037b7b138 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 27 Jul 2020 11:39:42 -0300 Subject: 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. --- lfunc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lfunc.c') diff --git a/lfunc.c b/lfunc.c index 10100e5a..f8c3c446 100644 --- a/lfunc.c +++ b/lfunc.c @@ -234,9 +234,10 @@ int luaF_close (lua_State *L, StkId level, int status) { luaF_unlinkupval(uv); setobj(L, slot, uv->v); /* move value to upvalue slot */ uv->v = slot; /* now current value lives here */ - if (!iswhite(uv)) + if (!iswhite(uv)) { /* neither white nor dead? */ gray2black(uv); /* closed upvalues cannot be gray */ - luaC_barrier(L, uv, slot); + luaC_barrier(L, uv, slot); + } } return status; } -- cgit v1.2.3-55-g6feb