From 65141832d29824ebfbf26e8af9e6e4b8549518d4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 7 Aug 2020 14:53:38 -0300 Subject: Open upvalues should be gray when entering gen. mode Open upvalues are never black; so, when entering generational mode, they must be colored gray, not black. --- lstate.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 697d73b2..1b6bcdf8 100644 --- a/lstate.h +++ b/lstate.h @@ -63,7 +63,7 @@ ** can become gray have such a field. The field is not the same ** in all objects, but it always has this name.) Any gray object ** must belong to one of these lists, and all objects in these lists -** must be gray (with one exception explained below): +** must be gray (with two exceptions explained below): ** ** 'gray': regular gray objects, still waiting to be visited. ** 'grayagain': objects that must be revisited at the atomic phase. @@ -75,11 +75,13 @@ ** 'ephemeron': ephemeron tables with white->white entries; ** 'allweak': tables with weak keys and/or weak values to be cleared. ** -** The exception to that "gray rule" is the TOUCHED2 objects in -** generational mode. Those objects stay in a gray list (because they -** must be visited again at the end of the cycle), but they are marked -** black (because assignments to them must activate barriers, to move -** them back to TOUCHED1). +** The exceptions to that "gray rule" are: +** - TOUCHED2 objects in generational mode stay in a gray list (because +** they must be visited again at the end of the cycle), but they are +** marked black because assignments to them must activate barriers (to +** move them back to TOUCHED1). +** - Open upvales are kept gray to avoid barriers, but they stay out +** of gray lists. (They don't even have a 'gclist' field.) */ -- cgit v1.2.3-55-g6feb