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.
This commit is contained in:
Roberto Ierusalimschy
2020-08-07 14:53:38 -03:00
parent f13dc59416
commit 65141832d2
2 changed files with 21 additions and 14 deletions

View File

@@ -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.)
*/