|
lua5.4
|
宏定义 | |
| #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) |
函数 | |
| 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) |
| #define AGEBITS 7 /* all age bits (111) */ |
| #define bitmask | ( | b | ) | (1<<(b)) |
| #define BLACKBIT 5 /* object is black */ |
| #define changewhite | ( | x | ) | ((x)->marked ^= WHITEBITS) |
| #define FINALIZEDBIT 6 /* object has been marked for finalization */ |
| #define G_NEW 0 /* created in current cycle */ |
| #define G_OLD 4 /* really old object (not to be visited) */ |
| #define G_OLD0 2 /* marked old by frw. barrier in this cycle */ |
| #define G_OLD1 3 /* first full cycle as old */ |
| #define G_SURVIVAL 1 /* created in previous cycle */ |
| #define G_TOUCHED1 5 /* old object touched this cycle */ |
| #define G_TOUCHED2 6 /* old object touched in previous cycle */ |
| #define GCSatomic 2 |
| #define GCScallfin 7 |
| #define GCSenteratomic 1 |
| #define GCSpause 8 |
| #define GCSpropagate 0 |
| #define GCSswpallgc 3 |
| #define GCSswpend 6 |
| #define GCSswpfinobj 4 |
| #define GCSswptobefnz 5 |
| #define getage | ( | o | ) | ((o)->marked & AGEBITS) |
| #define getgcparam | ( | p | ) | ((p) * 4) |
| #define isdead | ( | g, | |
| v | |||
| ) | isdeadm(otherwhite(g), (v)->marked) |
| #define isdeadm | ( | ow, | |
| m | |||
| ) | ((m) & (ow)) |
| #define isdecGCmodegen | ( | g | ) | (g->gckind == KGC_GEN || g->lastatomic != 0) |
| #define isgray | ( | x | ) |
| #define isold | ( | o | ) | (getage(o) > G_SURVIVAL) |
| #define issweepphase | ( | g | ) | (GCSswpallgc <= (g)->gcstate && (g)->gcstate <= GCSswpend) |
| #define keepinvariant | ( | g | ) | ((g)->gcstate <= GCSatomic) |
| #define luaC_barrier | ( | L, | |
| p, | |||
| v | |||
| ) |
| #define luaC_barrierback | ( | L, | |
| p, | |||
| v | |||
| ) |
| #define luaC_checkGC | ( | L | ) | luaC_condGC(L,(void)0,(void)0) |
| #define luaC_condGC | ( | L, | |
| pre, | |||
| pos | |||
| ) |
| #define luaC_objbarrier | ( | L, | |
| p, | |||
| o | |||
| ) |
| #define LUAI_GCMUL 100 |
| #define LUAI_GCPAUSE 200 |
| #define LUAI_GCSTEPSIZE 13 /* 8 KB */ |
| #define LUAI_GENMAJORMUL 100 |
| #define LUAI_GENMINORMUL 20 |
| #define otherwhite | ( | g | ) | ((g)->currentwhite ^ WHITEBITS) |
| #define resetbits | ( | x, | |
| m | |||
| ) | ((x) &= cast_byte(~(m))) |
| #define setbits | ( | x, | |
| m | |||
| ) | ((x) |= (m)) |
| #define setgcparam | ( | p, | |
| v | |||
| ) | ((p) = (v) / 4) |
| #define TESTBIT 7 |
| #define testbits | ( | x, | |
| m | |||
| ) | ((x) & (m)) |
| #define tofinalize | ( | x | ) | testbit((x)->marked, FINALIZEDBIT) |
| #define WHITE0BIT 3 /* object is white (type 0) */ |
| #define WHITE1BIT 4 /* object is white (type 1) */ |
1.8.18