no need for field 'gch' anymore

This commit is contained in:
Roberto Ierusalimschy
2014-07-17 14:27:49 -03:00
parent 5a9cc57a5e
commit 9aec500a26
5 changed files with 71 additions and 81 deletions

16
lgc.h
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.h,v 2.81 2014/02/18 13:46:26 roberto Exp roberto $
** $Id: lgc.h,v 2.82 2014/03/19 18:51:16 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -84,19 +84,19 @@
#define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT)
#define iswhite(x) testbits((x)->gch.marked, WHITEBITS)
#define isblack(x) testbit((x)->gch.marked, BLACKBIT)
#define iswhite(x) testbits((x)->marked, WHITEBITS)
#define isblack(x) testbit((x)->marked, BLACKBIT)
#define isgray(x) /* neither white nor black */ \
(!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT)))
(!testbits((x)->marked, WHITEBITS | bitmask(BLACKBIT)))
#define tofinalize(x) testbit((x)->gch.marked, FINALIZEDBIT)
#define tofinalize(x) testbit((x)->marked, FINALIZEDBIT)
#define otherwhite(g) ((g)->currentwhite ^ WHITEBITS)
#define isdeadm(ow,m) (!(((m) ^ WHITEBITS) & (ow)))
#define isdead(g,v) isdeadm(otherwhite(g), (v)->gch.marked)
#define isdead(g,v) isdeadm(otherwhite(g), (v)->marked)
#define changewhite(x) ((x)->gch.marked ^= WHITEBITS)
#define gray2black(x) l_setbit((x)->gch.marked, BLACKBIT)
#define changewhite(x) ((x)->marked ^= WHITEBITS)
#define gray2black(x) l_setbit((x)->marked, BLACKBIT)
#define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS)