diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-10 15:23:45 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-10 15:23:45 -0300 |
commit | 1c1a98e872ad09b12fe2085031f0045f993ca5f0 (patch) | |
tree | a711825a8b3f991797ef19dfaad083acbf59189a /lgc.h | |
parent | c006f085d98923e505c7fe8909944d3c182f8301 (diff) | |
download | lua-1c1a98e872ad09b12fe2085031f0045f993ca5f0.tar.gz lua-1c1a98e872ad09b12fe2085031f0045f993ca5f0.tar.bz2 lua-1c1a98e872ad09b12fe2085031f0045f993ca5f0.zip |
corrected some places where an old object could end up in front
of a new one + minimal documentation about this problem
Diffstat (limited to 'lgc.h')
-rw-r--r-- | lgc.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.h,v 2.39 2010/05/07 18:43:51 roberto Exp roberto $ | 2 | ** $Id: lgc.h,v 2.40 2010/05/10 16:46:49 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -91,6 +91,9 @@ | |||
91 | (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT))) | 91 | (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT))) |
92 | 92 | ||
93 | #define isold(x) testbit((x)->gch.marked, OLDBIT) | 93 | #define isold(x) testbit((x)->gch.marked, OLDBIT) |
94 | |||
95 | /* MOVE OLD rule: whenever an object is moved to the beginning of | ||
96 | a GC list, its old bit must be cleared */ | ||
94 | #define resetoldbit(o) resetbit((o)->gch.marked, OLDBIT) | 97 | #define resetoldbit(o) resetbit((o)->gch.marked, OLDBIT) |
95 | 98 | ||
96 | #define otherwhite(g) (g->currentwhite ^ WHITEBITS) | 99 | #define otherwhite(g) (g->currentwhite ^ WHITEBITS) |