Macros | Functions
lgc.h File Reference
#include "lobject.h"
#include "lstate.h"
Include dependency graph for lgc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AGEBITS   7 /* all age bits (111) */
 
#define bit2mask(b1, b2)   (bitmask(b1) | bitmask(b2))
 
#define bitmask(b)   (1<<(b))
 
#define BLACKBIT   5 /* object is black */
 
#define changeage(o, f, t)   check_exp(getage(o) == (f), (o)->marked ^= ((f)^(t)))
 
#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 isblack(x)   testbit((x)->marked, BLACKBIT)
 
#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 iswhite(x)   testbits((x)->marked, WHITEBITS)
 
#define keepinvariant(g)   ((g)->gcstate <= GCSatomic)
 
#define l_setbit(x, b)   setbits(x, bitmask(b))
 
#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 luaC_white(g)   cast_byte((g)->currentwhite & WHITEBITS)
 
#define LUAI_GCMUL   100
 
#define LUAI_GCPAUSE   200
 
#define LUAI_GCSTEPSIZE   13 /* 8 KB */
 
#define LUAI_GENMAJORMUL   100
 
#define LUAI_GENMINORMUL   20
 
#define nw2black(x)   check_exp(!iswhite(x), l_setbit((x)->marked, BLACKBIT))
 
#define otherwhite(g)   ((g)->currentwhite ^ WHITEBITS)
 
#define resetbit(x, b)   resetbits(x, bitmask(b))
 
#define resetbits(x, m)   ((x) &= cast_byte(~(m)))
 
#define setage(o, a)   ((o)->marked = cast_byte(((o)->marked & (~AGEBITS)) | a))
 
#define setbits(x, m)   ((x) |= (m))
 
#define setgcparam(p, v)   ((p) = (v) / 4)
 
#define testbit(x, b)   testbits(x, bitmask(b))
 
#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) */
 
#define WHITEBITS   bit2mask(WHITE0BIT, WHITE1BIT)
 

Functions

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_changemode (lua_State *L, int newmode)
 
LUAI_FUNC void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt)
 
LUAI_FUNC void luaC_fix (lua_State *L, GCObject *o)
 
LUAI_FUNC void luaC_freeallobjects (lua_State *L)
 
LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency)
 
LUAI_FUNC GCObjectluaC_newobj (lua_State *L, int tt, size_t sz)
 
LUAI_FUNC void luaC_runtilstate (lua_State *L, int statesmask)
 
LUAI_FUNC void luaC_step (lua_State *L)
 

Macro Definition Documentation

◆ AGEBITS

#define AGEBITS   7 /* all age bits (111) */

Definition at line 114 of file lgc.h.

◆ bit2mask

#define bit2mask (   b1,
  b2 
)    (bitmask(b1) | bitmask(b2))

Definition at line 64 of file lgc.h.

◆ bitmask

#define bitmask (   b)    (1<<(b))

Definition at line 63 of file lgc.h.

◆ BLACKBIT

#define BLACKBIT   5 /* object is black */

Definition at line 77 of file lgc.h.

◆ changeage

#define changeage (   o,
  f,
 
)    check_exp(getage(o) == (f), (o)->marked ^= ((f)^(t)))

Definition at line 120 of file lgc.h.

◆ changewhite

#define changewhite (   x)    ((x)->marked ^= WHITEBITS)

Definition at line 98 of file lgc.h.

◆ FINALIZEDBIT

#define FINALIZEDBIT   6 /* object has been marked for finalization */

Definition at line 78 of file lgc.h.

◆ G_NEW

#define G_NEW   0 /* created in current cycle */

Definition at line 106 of file lgc.h.

◆ G_OLD

#define G_OLD   4 /* really old object (not to be visited) */

Definition at line 110 of file lgc.h.

◆ G_OLD0

#define G_OLD0   2 /* marked old by frw. barrier in this cycle */

Definition at line 108 of file lgc.h.

◆ G_OLD1

#define G_OLD1   3 /* first full cycle as old */

Definition at line 109 of file lgc.h.

◆ G_SURVIVAL

#define G_SURVIVAL   1 /* created in previous cycle */

Definition at line 107 of file lgc.h.

◆ G_TOUCHED1

#define G_TOUCHED1   5 /* old object touched this cycle */

Definition at line 111 of file lgc.h.

◆ G_TOUCHED2

#define G_TOUCHED2   6 /* old object touched in previous cycle */

Definition at line 112 of file lgc.h.

◆ GCSatomic

#define GCSatomic   2

Definition at line 33 of file lgc.h.

◆ GCScallfin

#define GCScallfin   7

Definition at line 38 of file lgc.h.

◆ GCSenteratomic

#define GCSenteratomic   1

Definition at line 32 of file lgc.h.

◆ GCSpause

#define GCSpause   8

Definition at line 39 of file lgc.h.

◆ GCSpropagate

#define GCSpropagate   0

Definition at line 31 of file lgc.h.

◆ GCSswpallgc

#define GCSswpallgc   3

Definition at line 34 of file lgc.h.

◆ GCSswpend

#define GCSswpend   6

Definition at line 37 of file lgc.h.

◆ GCSswpfinobj

#define GCSswpfinobj   4

Definition at line 35 of file lgc.h.

◆ GCSswptobefnz

#define GCSswptobefnz   5

Definition at line 36 of file lgc.h.

◆ getage

#define getage (   o)    ((o)->marked & AGEBITS)

Definition at line 116 of file lgc.h.

◆ getgcparam

#define getgcparam (   p)    ((p) * 4)

Definition at line 135 of file lgc.h.

◆ isblack

#define isblack (   x)    testbit((x)->marked, BLACKBIT)

Definition at line 88 of file lgc.h.

◆ isdead

#define isdead (   g,
 
)    isdeadm(otherwhite(g), (v)->marked)

Definition at line 96 of file lgc.h.

◆ isdeadm

#define isdeadm (   ow,
 
)    ((m) & (ow))

Definition at line 95 of file lgc.h.

◆ isdecGCmodegen

#define isdecGCmodegen (   g)    (g->gckind == KGC_GEN || g->lastatomic != 0)

Definition at line 149 of file lgc.h.

◆ isgray

#define isgray (   x)
Value:
/* neither white nor black */ \
(!testbits((x)->marked, WHITEBITS | bitmask(BLACKBIT)))

Definition at line 89 of file lgc.h.

◆ isold

#define isold (   o)    (getage(o) > G_SURVIVAL)

Definition at line 118 of file lgc.h.

◆ issweepphase

#define issweepphase (   g)    (GCSswpallgc <= (g)->gcstate && (g)->gcstate <= GCSswpend)

Definition at line 42 of file lgc.h.

◆ iswhite

#define iswhite (   x)    testbits((x)->marked, WHITEBITS)

Definition at line 87 of file lgc.h.

◆ keepinvariant

#define keepinvariant (   g)    ((g)->gcstate <= GCSatomic)

Definition at line 54 of file lgc.h.

◆ l_setbit

#define l_setbit (   x,
 
)    setbits(x, bitmask(b))

Definition at line 65 of file lgc.h.

◆ luaC_barrier

#define luaC_barrier (   L,
  p,
 
)
Value:
( \
(iscollectable(v) && isblack(p) && iswhite(gcvalue(v))) ? \

Definition at line 165 of file lgc.h.

◆ luaC_barrierback

#define luaC_barrierback (   L,
  p,
 
)
Value:
( \
(iscollectable(v) && isblack(p) && iswhite(gcvalue(v))) ? \

Definition at line 169 of file lgc.h.

◆ luaC_checkGC

#define luaC_checkGC (   L)    luaC_condGC(L,(void)0,(void)0)

Definition at line 162 of file lgc.h.

◆ luaC_condGC

#define luaC_condGC (   L,
  pre,
  pos 
)
Value:
{ if (G(L)->GCdebt > 0) { pre; luaC_step(L); pos;}; \
condchangemem(L,pre,pos); }

Definition at line 157 of file lgc.h.

◆ luaC_objbarrier

#define luaC_objbarrier (   L,
  p,
 
)
Value:
( \
(isblack(p) && iswhite(o)) ? \

Definition at line 173 of file lgc.h.

◆ luaC_white

#define luaC_white (   g)    cast_byte((g)->currentwhite & WHITEBITS)

Definition at line 102 of file lgc.h.

◆ LUAI_GCMUL

#define LUAI_GCMUL   100

Definition at line 138 of file lgc.h.

◆ LUAI_GCPAUSE

#define LUAI_GCPAUSE   200

Definition at line 129 of file lgc.h.

◆ LUAI_GCSTEPSIZE

#define LUAI_GCSTEPSIZE   13 /* 8 KB */

Definition at line 141 of file lgc.h.

◆ LUAI_GENMAJORMUL

#define LUAI_GENMAJORMUL   100

Definition at line 125 of file lgc.h.

◆ LUAI_GENMINORMUL

#define LUAI_GENMINORMUL   20

Definition at line 126 of file lgc.h.

◆ nw2black

#define nw2black (   x)    check_exp(!iswhite(x), l_setbit((x)->marked, BLACKBIT))

Definition at line 99 of file lgc.h.

◆ otherwhite

#define otherwhite (   g)    ((g)->currentwhite ^ WHITEBITS)

Definition at line 94 of file lgc.h.

◆ resetbit

#define resetbit (   x,
 
)    resetbits(x, bitmask(b))

Definition at line 66 of file lgc.h.

◆ resetbits

#define resetbits (   x,
 
)    ((x) &= cast_byte(~(m)))

Definition at line 60 of file lgc.h.

◆ setage

#define setage (   o,
 
)    ((o)->marked = cast_byte(((o)->marked & (~AGEBITS)) | a))

Definition at line 117 of file lgc.h.

◆ setbits

#define setbits (   x,
 
)    ((x) |= (m))

Definition at line 61 of file lgc.h.

◆ setgcparam

#define setgcparam (   p,
 
)    ((p) = (v) / 4)

Definition at line 136 of file lgc.h.

◆ testbit

#define testbit (   x,
 
)    testbits(x, bitmask(b))

Definition at line 67 of file lgc.h.

◆ TESTBIT

#define TESTBIT   7

Definition at line 80 of file lgc.h.

◆ testbits

#define testbits (   x,
 
)    ((x) & (m))

Definition at line 62 of file lgc.h.

◆ tofinalize

#define tofinalize (   x)    testbit((x)->marked, FINALIZEDBIT)

Definition at line 92 of file lgc.h.

◆ WHITE0BIT

#define WHITE0BIT   3 /* object is white (type 0) */

Definition at line 75 of file lgc.h.

◆ WHITE1BIT

#define WHITE1BIT   4 /* object is white (type 1) */

Definition at line 76 of file lgc.h.

◆ WHITEBITS

#define WHITEBITS   bit2mask(WHITE0BIT, WHITE1BIT)

Definition at line 84 of file lgc.h.

Function Documentation

◆ luaC_barrier_()

LUAI_FUNC void luaC_barrier_ ( lua_State L,
GCObject o,
GCObject v 
)

Definition at line 208 of file lgc.c.

◆ luaC_barrierback_()

LUAI_FUNC void luaC_barrierback_ ( lua_State L,
GCObject o 
)

Definition at line 230 of file lgc.c.

◆ luaC_changemode()

LUAI_FUNC void luaC_changemode ( lua_State L,
int  newmode 
)

Definition at line 1323 of file lgc.c.

◆ luaC_checkfinalizer()

LUAI_FUNC void luaC_checkfinalizer ( lua_State L,
GCObject o,
Table mt 
)

Definition at line 1011 of file lgc.c.

◆ luaC_fix()

LUAI_FUNC void luaC_fix ( lua_State L,
GCObject o 
)

Definition at line 243 of file lgc.c.

◆ luaC_freeallobjects()

LUAI_FUNC void luaC_freeallobjects ( lua_State L)

Definition at line 1503 of file lgc.c.

◆ luaC_fullgc()

LUAI_FUNC void luaC_fullgc ( lua_State L,
int  isemergency 
)

Definition at line 1715 of file lgc.c.

◆ luaC_newobj()

LUAI_FUNC GCObject* luaC_newobj ( lua_State L,
int  tt,
size_t  sz 
)

Definition at line 258 of file lgc.c.

◆ luaC_runtilstate()

LUAI_FUNC void luaC_runtilstate ( lua_State L,
int  statesmask 
)

Definition at line 1643 of file lgc.c.

◆ luaC_step()

LUAI_FUNC void luaC_step ( lua_State L)

Definition at line 1678 of file lgc.c.

iswhite
#define iswhite(x)
Definition: lgc.h:87
bitmask
#define bitmask(b)
Definition: lgc.h:63
obj2gco
#define obj2gco(v)
Definition: lstate.h:385
gcvalue
#define gcvalue(o)
Definition: lobject.h:292
mqtt_test_proto.x
x
Definition: mqtt_test_proto.py:34
luaC_barrier_
LUAI_FUNC void luaC_barrier_(lua_State *L, GCObject *o, GCObject *v)
Definition: lgc.c:208
WHITEBITS
#define WHITEBITS
Definition: lgc.h:84
cast_void
#define cast_void(i)
Definition: llimits.h:125
G
#define G(L)
Definition: lstate.h:330
isblack
#define isblack(x)
Definition: lgc.h:88
testbits
#define testbits(x, m)
Definition: lgc.h:62
iscollectable
#define iscollectable(o)
Definition: lobject.h:287
luaC_barrierback_
LUAI_FUNC void luaC_barrierback_(lua_State *L, GCObject *o)
Definition: lgc.c:230
luaC_step
LUAI_FUNC void luaC_step(lua_State *L)
Definition: lgc.c:1678
BLACKBIT
#define BLACKBIT
Definition: lgc.h:77


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:49