summaryrefslogtreecommitdiff
path: root/lgc.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-10 15:23:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-10 15:23:45 -0300
commit1c1a98e872ad09b12fe2085031f0045f993ca5f0 (patch)
treea711825a8b3f991797ef19dfaad083acbf59189a /lgc.h
parentc006f085d98923e505c7fe8909944d3c182f8301 (diff)
downloadlua-github-1c1a98e872ad09b12fe2085031f0045f993ca5f0.tar.gz
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.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lgc.h b/lgc.h
index 938a1d49..ae45c80d 100644
--- a/lgc.h
+++ b/lgc.h
@@ -1,5 +1,5 @@
/*
-** $Id: lgc.h,v 2.39 2010/05/07 18:43:51 roberto Exp roberto $
+** $Id: lgc.h,v 2.40 2010/05/10 16:46:49 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -91,6 +91,9 @@
(!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT)))
#define isold(x) testbit((x)->gch.marked, OLDBIT)
+
+/* MOVE OLD rule: whenever an object is moved to the beginning of
+ a GC list, its old bit must be cleared */
#define resetoldbit(o) resetbit((o)->gch.marked, OLDBIT)
#define otherwhite(g) (g->currentwhite ^ WHITEBITS)