diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-08-07 14:53:38 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-08-07 14:53:38 -0300 |
commit | 65141832d29824ebfbf26e8af9e6e4b8549518d4 (patch) | |
tree | 3956c55c5e90d1946a2356fce5b884f4f238dd84 /lstate.h | |
parent | f13dc59416afa8fc93bb3d784d1a73e49e1b5b09 (diff) | |
download | lua-65141832d29824ebfbf26e8af9e6e4b8549518d4.tar.gz lua-65141832d29824ebfbf26e8af9e6e4b8549518d4.tar.bz2 lua-65141832d29824ebfbf26e8af9e6e4b8549518d4.zip |
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.
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -63,7 +63,7 @@ | |||
63 | ** can become gray have such a field. The field is not the same | 63 | ** can become gray have such a field. The field is not the same |
64 | ** in all objects, but it always has this name.) Any gray object | 64 | ** in all objects, but it always has this name.) Any gray object |
65 | ** must belong to one of these lists, and all objects in these lists | 65 | ** must belong to one of these lists, and all objects in these lists |
66 | ** must be gray (with one exception explained below): | 66 | ** must be gray (with two exceptions explained below): |
67 | ** | 67 | ** |
68 | ** 'gray': regular gray objects, still waiting to be visited. | 68 | ** 'gray': regular gray objects, still waiting to be visited. |
69 | ** 'grayagain': objects that must be revisited at the atomic phase. | 69 | ** 'grayagain': objects that must be revisited at the atomic phase. |
@@ -75,11 +75,13 @@ | |||
75 | ** 'ephemeron': ephemeron tables with white->white entries; | 75 | ** 'ephemeron': ephemeron tables with white->white entries; |
76 | ** 'allweak': tables with weak keys and/or weak values to be cleared. | 76 | ** 'allweak': tables with weak keys and/or weak values to be cleared. |
77 | ** | 77 | ** |
78 | ** The exception to that "gray rule" is the TOUCHED2 objects in | 78 | ** The exceptions to that "gray rule" are: |
79 | ** generational mode. Those objects stay in a gray list (because they | 79 | ** - TOUCHED2 objects in generational mode stay in a gray list (because |
80 | ** must be visited again at the end of the cycle), but they are marked | 80 | ** they must be visited again at the end of the cycle), but they are |
81 | ** black (because assignments to them must activate barriers, to move | 81 | ** marked black because assignments to them must activate barriers (to |
82 | ** them back to TOUCHED1). | 82 | ** move them back to TOUCHED1). |
83 | ** - Open upvales are kept gray to avoid barriers, but they stay out | ||
84 | ** of gray lists. (They don't even have a 'gclist' field.) | ||
83 | */ | 85 | */ |
84 | 86 | ||
85 | 87 | ||