Go to the source code of this file.
Macros | |
#define | GCSpropagate 0 |
#define | GCSenteratomic 1 |
#define | GCSatomic 2 |
#define | GCSswpallgc 3 |
#define | GCSswpfinobj 4 |
#define | GCSswptobefnz 5 |
#define | GCSswpend 6 |
#define | GCScallfin 7 |
#define | GCSpause 8 |
#define | issweepphase(g) (GCSswpallgc <= (g)->gcstate && (g)->gcstate <= GCSswpend) |
#define | keepinvariant(g) ((g)->gcstate <= GCSatomic) |
#define | resetbits(x, m) ((x) &= cast_byte(~(m))) |
#define | setbits(x, m) ((x) |= (m)) |
#define | testbits(x, m) ((x) & (m)) |
#define | bitmask(b) (1<<(b)) |
#define | bit2mask(b1, b2) (bitmask(b1) | bitmask(b2)) |
#define | l_setbit(x, b) setbits(x, bitmask(b)) |
#define | resetbit(x, b) resetbits(x, bitmask(b)) |
#define | testbit(x, b) testbits(x, bitmask(b)) |
#define | WHITE0BIT 3 /* object is white (type 0) */ |
#define | WHITE1BIT 4 /* object is white (type 1) */ |
#define | BLACKBIT 5 /* object is black */ |
#define | FINALIZEDBIT 6 /* object has been marked for finalization */ |
#define | TESTBIT 7 |
#define | WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT) |
#define | iswhite(x) testbits((x)->marked, WHITEBITS) |
#define | isblack(x) testbit((x)->marked, BLACKBIT) |
#define | isgray(x) |
#define | tofinalize(x) testbit((x)->marked, FINALIZEDBIT) |
#define | otherwhite(g) ((g)->currentwhite ^ WHITEBITS) |
#define | isdeadm(ow, m) ((m) & (ow)) |
#define | isdead(g, v) isdeadm(otherwhite(g), (v)->marked) |
#define | changewhite(x) ((x)->marked ^= WHITEBITS) |
#define | nw2black(x) check_exp(!iswhite(x), l_setbit((x)->marked, BLACKBIT)) |
#define | luaC_white(g) cast_byte((g)->currentwhite & WHITEBITS) |
#define | G_NEW 0 /* created in current cycle */ |
#define | G_SURVIVAL 1 /* created in previous cycle */ |
#define | G_OLD0 2 /* marked old by frw. barrier in this cycle */ |
#define | G_OLD1 3 /* first full cycle as old */ |
#define | G_OLD 4 /* really old object (not to be visited) */ |
#define | G_TOUCHED1 5 /* old object touched this cycle */ |
#define | G_TOUCHED2 6 /* old object touched in previous cycle */ |
#define | AGEBITS 7 /* all age bits (111) */ |
#define | getage(o) ((o)->marked & AGEBITS) |
#define | setage(o, a) ((o)->marked = cast_byte(((o)->marked & (~AGEBITS)) | a)) |
#define | isold(o) (getage(o) > G_SURVIVAL) |
#define | changeage(o, f, t) check_exp(getage(o) == (f), (o)->marked ^= ((f)^(t))) |
#define | LUAI_GENMAJORMUL 100 |
#define | LUAI_GENMINORMUL 20 |
#define | LUAI_GCPAUSE 200 |
#define | getgcparam(p) ((p) * 4) |
#define | setgcparam(p, v) ((p) = (v) / 4) |
#define | LUAI_GCMUL 100 |
#define | LUAI_GCSTEPSIZE 13 /* 8 KB */ |
#define | isdecGCmodegen(g) (g->gckind == KGC_GEN || g->lastatomic != 0) |
#define | luaC_condGC(L, pre, pos) |
#define | luaC_checkGC(L) luaC_condGC(L,(void)0,(void)0) |
#define | luaC_barrier(L, p, v) |
#define | luaC_barrierback(L, p, v) |
#define | luaC_objbarrier(L, p, o) |
Functions | |
LUAI_FUNC void | luaC_fix (lua_State *L, GCObject *o) |
LUAI_FUNC void | luaC_freeallobjects (lua_State *L) |
LUAI_FUNC void | luaC_step (lua_State *L) |
LUAI_FUNC void | luaC_runtilstate (lua_State *L, int statesmask) |
LUAI_FUNC void | luaC_fullgc (lua_State *L, int isemergency) |
LUAI_FUNC GCObject * | luaC_newobj (lua_State *L, int tt, size_t sz) |
LUAI_FUNC void | luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) |
LUAI_FUNC void | luaC_barrierback_ (lua_State *L, GCObject *o) |
LUAI_FUNC void | luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) |
LUAI_FUNC void | luaC_changemode (lua_State *L, int newmode) |
Definition at line 63 of file lgc.h.
Referenced by entergen(), fullinc(), lua_newstate(), and stepgenfull().
Definition at line 120 of file lgc.h.
Referenced by correctgraylist(), genlink(), and markold().
#define changewhite | ( | x | ) | ((x)->marked ^= WHITEBITS) |
Definition at line 98 of file lgc.h.
Referenced by internshrstr().
#define FINALIZEDBIT 6 /* object has been marked for finalization */ |
Definition at line 78 of file lgc.h.
Referenced by luaC_checkfinalizer(), and udata2finalize().
#define G_NEW 0 /* created in current cycle */ |
Definition at line 106 of file lgc.h.
Referenced by sweepgen().
#define G_OLD 4 /* really old object (not to be visited) */ |
Definition at line 110 of file lgc.h.
Referenced by correctgraylist(), genlink(), luaC_fix(), markold(), sweep2old(), and sweepgen().
#define G_OLD0 2 /* marked old by frw. barrier in this cycle */ |
Definition at line 108 of file lgc.h.
Referenced by luaC_barrier_().
#define G_OLD1 3 /* first full cycle as old */ |
Definition at line 109 of file lgc.h.
Referenced by markold(), sweepgen(), and udata2finalize().
#define G_SURVIVAL 1 /* created in previous cycle */ |
Definition at line 107 of file lgc.h.
Referenced by sweepgen().
#define G_TOUCHED1 5 /* old object touched this cycle */ |
Definition at line 111 of file lgc.h.
Referenced by correctgraylist(), genlink(), luaC_barrierback_(), and sweepgen().
#define G_TOUCHED2 6 /* old object touched in previous cycle */ |
Definition at line 112 of file lgc.h.
Referenced by correctgraylist(), genlink(), luaC_barrierback_(), and sweepgen().
#define GCSatomic 2 |
Definition at line 33 of file lgc.h.
Referenced by atomic(), traversethread(), and traverseweakvalue().
#define GCScallfin 7 |
Definition at line 38 of file lgc.h.
Referenced by fullinc(), and singlestep().
#define GCSenteratomic 1 |
Definition at line 32 of file lgc.h.
Referenced by singlestep().
#define GCSpause 8 |
Definition at line 39 of file lgc.h.
Referenced by entergen(), enterinc(), fullinc(), incstep(), lua_gc(), lua_newstate(), singlestep(), and stepgenfull().
#define GCSpropagate 0 |
Definition at line 31 of file lgc.h.
Referenced by entergen(), finishgencycle(), singlestep(), stepgenfull(), traverseephemeron(), traversethread(), and youngcollection().
#define GCSswpallgc 3 |
Definition at line 34 of file lgc.h.
Referenced by atomic2gen(), entersweep(), singlestep(), and youngcollection().
#define GCSswpend 6 |
Definition at line 37 of file lgc.h.
Referenced by singlestep().
#define GCSswpfinobj 4 |
Definition at line 35 of file lgc.h.
Referenced by singlestep().
#define GCSswptobefnz 5 |
Definition at line 36 of file lgc.h.
Referenced by singlestep().
#define getage | ( | o | ) | ((o)->marked & AGEBITS) |
Definition at line 116 of file lgc.h.
Referenced by correctgraylist(), genlink(), luaC_barrierback_(), markold(), remarkupvals(), sweepgen(), and udata2finalize().
Definition at line 88 of file lgc.h.
Referenced by genlink(), luaC_barrier_(), luaC_barrierback_(), and markold().
#define isdead | ( | g, | |
v | |||
) | isdeadm(otherwhite(g), (v)->marked) |
Definition at line 96 of file lgc.h.
Referenced by internshrstr(), luaC_barrier_(), luaC_barrierback_(), luaF_findupval(), sweep2old(), and sweepgen().
#define isdeadm | ( | ow, | |
m | |||
) | ((m) & (ow)) |
Definition at line 95 of file lgc.h.
Referenced by sweeplist().
Definition at line 149 of file lgc.h.
Referenced by genstep(), lua_gc(), and luaC_step().
#define isgray | ( | x | ) |
Definition at line 89 of file lgc.h.
Referenced by correctgraylist(), linkgclist_(), and remarkupvals().
#define isold | ( | o | ) | (getage(o) > G_SURVIVAL) |
Definition at line 118 of file lgc.h.
Referenced by correctgraylist(), luaC_barrier_(), luaC_barrierback_(), remarkupvals(), sweepgen(), and traversethread().
#define issweepphase | ( | g | ) | (GCSswpallgc <= (g)->gcstate && (g)->gcstate <= GCSswpend) |
Definition at line 42 of file lgc.h.
Referenced by luaC_barrier_(), luaC_checkfinalizer(), and udata2finalize().
Definition at line 87 of file lgc.h.
Referenced by atomic(), correctgraylist(), iscleared(), lua_pushcclosure(), luaC_barrier_(), luaF_close(), luaS_clearcache(), markold(), remarkupvals(), separatetobefnz(), sweep2old(), and sweepgen().
Definition at line 54 of file lgc.h.
Referenced by fullinc(), and luaC_barrier_().
Definition at line 65 of file lgc.h.
Referenced by luaC_checkfinalizer().
#define luaC_barrier | ( | L, | |
p, | |||
v | |||
) |
Definition at line 165 of file lgc.h.
Referenced by addk(), lua_copy(), lua_load(), lua_setupvalue(), luaF_close(), and luaV_execute().
#define luaC_barrierback | ( | L, | |
p, | |||
v | |||
) |
Definition at line 169 of file lgc.h.
Referenced by aux_rawset(), lua_rawseti(), lua_setiuservalue(), luaH_newkey(), luaV_execute(), and luaV_finishset().
#define luaC_checkGC | ( | L | ) | luaC_condGC(L,(void)0,(void)0) |
Definition at line 162 of file lgc.h.
Referenced by close_func(), lua_concat(), lua_createtable(), lua_gc(), lua_newthread(), lua_newuserdatauv(), lua_pushcclosure(), lua_pushfstring(), lua_pushlstring(), lua_pushstring(), lua_pushvfstring(), lua_tolstring(), luaG_runerror(), and luaX_newstring().
#define luaC_condGC | ( | L, | |
pre, | |||
pos | |||
) |
#define luaC_objbarrier | ( | L, | |
p, | |||
o | |||
) |
Definition at line 173 of file lgc.h.
Referenced by addprototype(), loadProtos(), loadStringN(), lua_setmetatable(), lua_upvaluejoin(), luaF_initupvals(), luaU_undump(), luaY_parser(), mainfunc(), newupvalue(), open_func(), pushclosure(), and registerlocalvar().
Definition at line 102 of file lgc.h.
Referenced by lua_newstate(), lua_newthread(), luaC_newobj(), sweepgen(), sweeplist(), and whitelist().
#define LUAI_GCMUL 100 |
Definition at line 138 of file lgc.h.
Referenced by lua_newstate().
#define LUAI_GCPAUSE 200 |
Definition at line 129 of file lgc.h.
Referenced by lua_newstate().
#define LUAI_GCSTEPSIZE 13 /* 8 KB */ |
Definition at line 141 of file lgc.h.
Referenced by lua_newstate().
#define LUAI_GENMAJORMUL 100 |
Definition at line 125 of file lgc.h.
Referenced by lua_newstate().
#define LUAI_GENMINORMUL 20 |
Definition at line 126 of file lgc.h.
Referenced by lua_newstate().
Definition at line 99 of file lgc.h.
Referenced by convergeephemerons(), correctgraylist(), luaF_close(), propagatemark(), and sweep2old().
Definition at line 94 of file lgc.h.
Referenced by atomic(), and sweeplist().
Definition at line 66 of file lgc.h.
Referenced by udata2finalize().
Definition at line 117 of file lgc.h.
Referenced by luaC_barrier_(), luaC_barrierback_(), luaC_fix(), sweep2old(), and sweepgen().
Definition at line 136 of file lgc.h.
Referenced by lua_gc(), and lua_newstate().
Definition at line 67 of file lgc.h.
Referenced by luaC_runtilstate().
#define tofinalize | ( | x | ) | testbit((x)->marked, FINALIZEDBIT) |
Definition at line 92 of file lgc.h.
Referenced by luaC_checkfinalizer(), separatetobefnz(), and udata2finalize().
#define WHITE0BIT 3 /* object is white (type 0) */ |
Definition at line 75 of file lgc.h.
Referenced by lua_newstate().
Definition at line 208 of file lgc.cpp.
References g, G, G_OLD0, global_State::gckind, isblack, isdead, isold, issweepphase, iswhite, keepinvariant, KGC_INC, lua_assert, makewhite, reallymarkobject(), and setage.
Definition at line 230 of file lgc.cpp.
References g, G, G_TOUCHED1, G_TOUCHED2, global_State::gckind, getage, global_State::grayagain, isblack, isdead, isold, KGC_GEN, linkobjgclist, lua_assert, set2gray, and setage.
Definition at line 1323 of file lgc.cpp.
References entergen(), enterinc(), G, global_State::gckind, KGC_GEN, and global_State::lastatomic.
Referenced by lua_gc(), and luaC_freeallobjects().
Definition at line 1011 of file lgc.cpp.
References global_State::allgc, correctpointers(), FINALIZEDBIT, global_State::finobj, g, G, gfasttm, issweepphase, l_setbit, makewhite, p, setpause(), global_State::sweepgc, sweeptolive(), TM_GC, and tofinalize.
Referenced by lua_setmetatable().
Definition at line 243 of file lgc.cpp.
References global_State::allgc, global_State::fixedgc, g, G, G_OLD, lua_assert, set2gray, and setage.
Referenced by luaS_init(), luaT_init(), and luaX_init().
Definition at line 1503 of file lgc.cpp.
References global_State::allgc, callallpendingfinalizers(), deletelist(), global_State::finobj, global_State::fixedgc, G, KGC_INC, lua_assert, luaC_changemode(), global_State::mainthread, stringtable::nuse, obj2gco, separatetobefnz(), and global_State::strt.
Referenced by close_state().
Definition at line 1703 of file lgc.cpp.
References fullgen(), fullinc(), G, global_State::gcemergency, global_State::gckind, KGC_INC, and lua_assert.
Referenced by growstrtab(), lua_gc(), and tryagain().
Definition at line 258 of file lgc.cpp.
References global_State::allgc, cast, g, G, luaC_white, luaM_newobject, and novariant.
Referenced by createstrobj(), luaF_initupvals(), luaF_newCclosure(), luaF_newLclosure(), luaF_newproto(), luaH_new(), luaS_newudata(), and newupval().
Definition at line 1631 of file lgc.cpp.
References G, global_State::gcstate, singlestep(), and testbit.
Referenced by entergen(), fullinc(), and stepgenfull().
Definition at line 1666 of file lgc.cpp.
References G, global_State::gcemergency, global_State::gcrunning, genstep(), incstep(), isdecGCmodegen, and lua_assert.
Referenced by lua_gc().