Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <string.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
Go to the source code of this file.
Definition at line 71 of file lua-5.3.6/src/lgc.c.
Referenced by luaC_barrierback_(), propagatemark(), and traversetable().
#define checkconsistency | ( | obj | ) | lua_longassert(!iscollectable(obj) || righttt(obj)) |
Definition at line 79 of file lua-5.3.6/src/lgc.c.
#define checkdeadkey | ( | n | ) | lua_assert(!ttisdeadkey(gkey(n)) || ttisnil(gval(n))) |
Definition at line 76 of file lua-5.3.6/src/lgc.c.
Referenced by traverseephemeron(), traversestrongtable(), and traverseweakvalue().
#define GCFINALIZECOST GCSWEEPCOST |
Definition at line 45 of file lua-5.3.6/src/lgc.c.
Referenced by singlestep().
#define GCSinsideatomic (GCSpause + 1) |
Definition at line 33 of file lua-5.3.6/src/lgc.c.
Referenced by atomic(), traverseLclosure(), and traversethread().
#define GCSWEEPCOST ((sizeof(TString) + 4) / 4) |
Definition at line 39 of file lua-5.3.6/src/lgc.c.
Referenced by sweepstep().
#define GCSWEEPMAX (cast_int((GCSTEPSIZE / GCSWEEPCOST) / 4)) |
Definition at line 42 of file lua-5.3.6/src/lgc.c.
Referenced by sweepstep().
Definition at line 107 of file lua-5.3.6/src/lgc.c.
Referenced by clearkeys(), clearvalues(), traverseephemeron(), traversestrongtable(), and traverseweakvalue().
#define lgc_c |
Definition at line 7 of file lua-5.3.6/src/lgc.c.
#define linkgclist | ( | o, | |
p ) ((o)->gclist = (p), (p) = obj2gco(o)) |
Definition at line 113 of file lua-5.3.6/src/lgc.c.
Referenced by luaC_barrierback_(), propagatemark(), reallymarkobject(), traverseephemeron(), traversetable(), and traverseweakvalue().
#define LUA_CORE |
Definition at line 8 of file lua-5.3.6/src/lgc.c.
#define makewhite | ( | g, | |
x ) (x->marked = cast_byte((x->marked & maskcolors) | luaC_white(g))) |
Definition at line 67 of file lua-5.3.6/src/lgc.c.
Referenced by luaC_barrier_(), luaC_checkfinalizer(), singlestep(), and udata2finalize().
#define markobject | ( | g, | |
t ) { if (iswhite(t)) reallymarkobject(g, obj2gco(t)); } |
Definition at line 86 of file lua-5.3.6/src/lgc.c.
Referenced by atomic(), iscleared(), luaC_upvalbarrier_(), markbeingfnz(), and restartcollection().
#define markobjectN | ( | g, | |
t ) { if (t) markobject(g,t); } |
Definition at line 92 of file lua-5.3.6/src/lgc.c.
Referenced by markmt(), reallymarkobject(), traverseLclosure(), traverseproto(), and traversetable().
#define markvalue | ( | g, | |
o ) |
Definition at line 83 of file lua-5.3.6/src/lgc.c.
Referenced by atomic(), remarkupvals(), restartcollection(), traverseCclosure(), traverseLclosure(), traverseproto(), traversestrongtable(), traversethread(), and traverseweakvalue().
Definition at line 66 of file lua-5.3.6/src/lgc.c.
Referenced by sweeplist().
#define PAUSEADJ 100 |
Definition at line 59 of file lua-5.3.6/src/lgc.c.
Referenced by setpause().
#define STEPMULADJ 200 |
Definition at line 52 of file lua-5.3.6/src/lgc.c.
Referenced by getdebt(), and luaC_step().
Definition at line 724 of file lua-5.3.6/src/lgc.c.
Referenced by luaC_freeallobjects().
#define valiswhite | ( | x | ) | (iscollectable(x) && iswhite(gcvalue(x))) |
Definition at line 74 of file lua-5.3.6/src/lgc.c.
Referenced by reallymarkobject(), removeentry(), and traverseephemeron().
Definition at line 70 of file lua-5.3.6/src/lgc.c.
Referenced by luaC_fix(), and reallymarkobject().
Definition at line 982 of file lua-5.3.6/src/lgc.c.
References global_State::allweak, cast_byte, clearkeys(), clearvalues(), convergeephemerons(), global_State::currentwhite, global_State::ephemeron, G, global_State::gcfinnum, global_State::GCmemtrav, GCSinsideatomic, global_State::gcstate, global_State::gray, global_State::grayagain, iswhite, global_State::l_registry, lua_assert, luaS_clearcache(), global_State::mainthread, markbeingfnz(), markmt(), markobject, markvalue, NULL, otherwhite, propagateall(), remarkupvals(), separatetobefnz(), and global_State::weak.
Referenced by singlestep().
|
static |
Definition at line 859 of file lua-5.3.6/src/lgc.c.
References G, GCTM(), and global_State::tobefnz.
Referenced by luaC_freeallobjects().
|
static |
Definition at line 778 of file lua-5.3.6/src/lgc.c.
References global_State::GCdebt, global_State::GCestimate, global_State::gckind, KGC_EMERGENCY, luaS_resize(), stringtable::nuse, stringtable::size, and global_State::strt.
Referenced by singlestep().
|
static |
Definition at line 639 of file lua-5.3.6/src/lgc.c.
References gco2t, gkey, gnode, gnodelast, gval, iscleared(), removeentry(), setnilvalue, and ttisnil.
Referenced by atomic().
|
static |
Definition at line 658 of file lua-5.3.6/src/lgc.c.
References Table::array, gco2t, gnode, gnodelast, gval, iscleared(), removeentry(), setnilvalue, Table::sizearray, and ttisnil.
Referenced by atomic().
|
static |
Definition at line 608 of file lua-5.3.6/src/lgc.c.
References global_State::ephemeron, gco2t, next, NULL, propagateall(), and traverseephemeron().
Referenced by atomic().
|
static |
Definition at line 801 of file lua-5.3.6/src/lgc.c.
References luaD_callnoyield(), lua_State::top, and UNUSED.
Referenced by GCTM().
|
static |
Definition at line 959 of file lua-5.3.6/src/lgc.c.
References global_State::allgc, G, GCSswpallgc, global_State::gcstate, lua_assert, NULL, global_State::sweepgc, and sweeplist().
Referenced by luaC_fullgc(), and singlestep().
Definition at line 869 of file lua-5.3.6/src/lgc.c.
References NULL.
Referenced by separatetobefnz().
Definition at line 686 of file lua-5.3.6/src/lgc.c.
References luaC_upvdeccount(), luaM_freemem, sizeLclosure, and LClosure::upvals.
Referenced by freeobj().
Definition at line 697 of file lua-5.3.6/src/lgc.c.
References freeLclosure(), gco2ccl, gco2lcl, gco2p, gco2t, gco2th, gco2ts, gco2u, lua_assert, LUA_TCCL, LUA_TLCL, LUA_TLNGSTR, LUA_TPROTO, LUA_TSHRSTR, LUA_TTABLE, LUA_TTHREAD, LUA_TUSERDATA, luaE_freethread(), luaF_freeproto(), luaH_free(), luaM_freemem, luaS_remove(), sizeCclosure, sizelstring, and sizeudata.
Referenced by sweeplist().
|
static |
Definition at line 807 of file lua-5.3.6/src/lgc.c.
References lua_State::allowhook, CallInfo::callstatus, lua_State::ci, CIST_FIN, dothecall(), G, global_State::gcrunning, LUA_ERRGCMM, LUA_ERRRUN, LUA_OK, luaD_pcall(), luaD_throw(), luaO_pushfstring(), luaT_gettmbyobj(), NULL, savestack, setgcovalue, setobj2s, svalue, TM_GC, lua_State::top, ttisfunction, ttisstring, and udata2finalize().
Referenced by callallpendingfinalizers(), and runafewfinalizers().
|
static |
Definition at line 1115 of file lua-5.3.6/src/lgc.c.
References global_State::GCdebt, global_State::gcstepmul, MAX_LMEM, and STEPMULADJ.
Referenced by luaC_step().
|
static |
Definition at line 139 of file lua-5.3.6/src/lgc.c.
References gcvalue, iscollectable, iswhite, markobject, tsvalue, and ttisstring.
Referenced by clearkeys(), clearvalues(), traverseephemeron(), and traverseweakvalue().
Definition at line 155 of file lua-5.3.6/src/lgc.c.
References G, isblack, isdead, issweepphase, iswhite, keepinvariant, lua_assert, makewhite, and reallymarkobject().
Definition at line 171 of file lua-5.3.6/src/lgc.c.
References black2gray, G, global_State::grayagain, isblack, isdead, linkgclist, and lua_assert.
Definition at line 902 of file lua-5.3.6/src/lgc.c.
References global_State::allgc, FINALIZEDBIT, global_State::finobj, G, gfasttm, issweepphase, l_setbit, makewhite, NULL, global_State::sweepgc, sweeptolive(), TM_GC, and tofinalize.
Definition at line 194 of file lua-5.3.6/src/lgc.c.
References global_State::allgc, global_State::fixedgc, G, lua_assert, and white2gray.
Referenced by luaS_init(), luaT_init(), and luaX_init().
void luaC_freeallobjects | ( | lua_State * | L | ) |
Definition at line 967 of file lua-5.3.6/src/lgc.c.
References global_State::allgc, callallpendingfinalizers(), global_State::currentwhite, global_State::finobj, global_State::fixedgc, G, global_State::gckind, KGC_NORMAL, lua_assert, NULL, stringtable::nuse, separatetobefnz(), global_State::strt, sweepwholelist, global_State::tobefnz, and WHITEBITS.
void luaC_fullgc | ( | lua_State * | L, |
int | isemergency ) |
Definition at line 1159 of file lua-5.3.6/src/lgc.c.
References bitmask, entersweep(), G, global_State::GCestimate, global_State::gckind, GCScallfin, GCSpause, gettotalbytes, keepinvariant, KGC_EMERGENCY, KGC_NORMAL, lua_assert, luaC_runtilstate(), and setpause().
Definition at line 208 of file lua-5.3.6/src/lgc.c.
References global_State::allgc, cast, G, luaC_white, luaM_newobject, and novariant.
void luaC_runtilstate | ( | lua_State * | L, |
int | statesmask ) |
Definition at line 1104 of file lua-5.3.6/src/lgc.c.
References G, global_State::gcstate, singlestep(), and testbit.
Referenced by luaC_fullgc().
void luaC_step | ( | lua_State * | L | ) |
Definition at line 1129 of file lua-5.3.6/src/lgc.c.
References G, global_State::gcrunning, GCSpause, global_State::gcstate, global_State::gcstepmul, GCSTEPSIZE, getdebt(), luaE_setdebt(), runafewfinalizers(), setpause(), singlestep(), and STEPMULADJ.
Definition at line 185 of file lua-5.3.6/src/lgc.c.
References G, gcvalue, keepinvariant, lua_assert, markobject, upisopen, and UpVal::v.
Definition at line 678 of file lua-5.3.6/src/lgc.c.
References lua_assert, luaM_free, UpVal::refcount, and upisopen.
Referenced by freeLclosure(), and lua_upvaluejoin().
|
static |
Definition at line 299 of file lua-5.3.6/src/lgc.c.
References markobject, NULL, and global_State::tobefnz.
Referenced by atomic(), and restartcollection().
|
static |
Definition at line 289 of file lua-5.3.6/src/lgc.c.
References LUA_NUMTAGS, markobjectN, and global_State::mt.
Referenced by atomic(), and restartcollection().
|
static |
Definition at line 603 of file lua-5.3.6/src/lgc.c.
References global_State::gray, and propagatemark().
Referenced by atomic(), convergeephemerons(), and singlestep().
|
static |
Definition at line 559 of file lua-5.3.6/src/lgc.c.
References black2gray, Proto::gclist, Table::gclist, lua_State::gclist, global_State::GCmemtrav, gco2ccl, gco2lcl, gco2p, gco2t, gco2th, global_State::gray, gray2black, global_State::grayagain, isgray, linkgclist, lua_assert, LUA_TCCL, LUA_TLCL, LUA_TPROTO, LUA_TTABLE, LUA_TTHREAD, traverseCclosure(), traverseLclosure(), traverseproto(), traversetable(), and traversethread().
Referenced by propagateall(), and singlestep().
|
static |
Definition at line 235 of file lua-5.3.6/src/lgc.c.
References global_State::GCmemtrav, gco2ccl, gco2lcl, gco2p, gco2t, gco2th, gco2ts, gco2u, gcvalue, getuservalue, global_State::gray, gray2black, linkgclist, lua_assert, LUA_TCCL, LUA_TLCL, LUA_TLNGSTR, LUA_TPROTO, LUA_TSHRSTR, LUA_TTABLE, LUA_TTHREAD, LUA_TUSERDATA, global_State::mainthread, markobjectN, sizelstring, sizeudata, uvalue, valiswhite, and white2gray.
Referenced by luaC_barrier_(), and traverseephemeron().
|
static |
Definition at line 312 of file lua-5.3.6/src/lgc.c.
References isblack, isgray, lua_assert, markvalue, UpVal::next, NULL, UpVal::open, lua_State::openupval, UpVal::touched, global_State::twups, lua_State::twups, UpVal::u, and UpVal::v.
Referenced by atomic().
|
static |
Definition at line 125 of file lua-5.3.6/src/lgc.c.
References gkey, gval, lua_assert, setdeadvalue, ttisnil, valiswhite, and wgkey.
Referenced by clearkeys(), clearvalues(), traverseephemeron(), traversestrongtable(), and traverseweakvalue().
|
static |
Definition at line 337 of file lua-5.3.6/src/lgc.c.
References global_State::allweak, global_State::ephemeron, global_State::gray, global_State::grayagain, global_State::l_registry, global_State::mainthread, markbeingfnz(), markmt(), markobject, markvalue, NULL, and global_State::weak.
Referenced by singlestep().
|
static |
Definition at line 844 of file lua-5.3.6/src/lgc.c.
References G, global_State::gcfinnum, GCTM(), lua_assert, and global_State::tobefnz.
Referenced by luaC_step(), and singlestep().
|
static |
Definition at line 880 of file lua-5.3.6/src/lgc.c.
References findlast(), global_State::finobj, iswhite, lua_assert, NULL, global_State::tobefnz, and tofinalize.
Referenced by atomic(), and luaC_freeallobjects().
|
static |
Definition at line 940 of file lua-5.3.6/src/lgc.c.
References global_State::GCestimate, global_State::gcpause, gettotalbytes, lua_assert, luaE_setdebt(), MAX_LMEM, and PAUSEADJ.
Referenced by luaC_fullgc(), and luaC_step().
Definition at line 1045 of file lua-5.3.6/src/lgc.c.
References atomic(), checkSizes(), entersweep(), global_State::finobj, G, global_State::GCestimate, GCFINALIZECOST, global_State::gckind, global_State::GCmemtrav, GCSatomic, GCScallfin, GCSpause, GCSpropagate, GCSswpallgc, GCSswpend, GCSswpfinobj, GCSswptobefnz, global_State::gcstate, gettotalbytes, global_State::gray, KGC_EMERGENCY, lua_assert, global_State::mainthread, makewhite, NULL, propagateall(), propagatemark(), restartcollection(), runafewfinalizers(), stringtable::size, global_State::strt, sweepstep(), and global_State::tobefnz.
Referenced by luaC_runtilstate(), and luaC_step().
Definition at line 735 of file lua-5.3.6/src/lgc.c.
References cast_byte, freeobj(), G, isdeadm, luaC_white, maskcolors, NULL, and otherwhite.
Referenced by entersweep(), sweepstep(), and sweeptolive().
|
static |
Definition at line 1029 of file lua-5.3.6/src/lgc.c.
References global_State::GCdebt, global_State::GCestimate, global_State::gcstate, GCSWEEPCOST, GCSWEEPMAX, global_State::sweepgc, and sweeplist().
Referenced by singlestep().
Definition at line 758 of file lua-5.3.6/src/lgc.c.
References sweeplist().
Referenced by luaC_checkfinalizer().
|
static |
Definition at line 501 of file lua-5.3.6/src/lgc.c.
References markvalue, sizeCclosure, and CClosure::upvalue.
Referenced by propagatemark().
|
static |
Definition at line 394 of file lua-5.3.6/src/lgc.c.
References global_State::allweak, Table::array, checkdeadkey, global_State::ephemeron, GCSpropagate, global_State::gcstate, gcvalue, gkey, gnode, gnodelast, global_State::grayagain, gval, iscleared(), linkgclist, reallymarkobject(), removeentry(), Table::sizearray, ttisnil, and valiswhite.
Referenced by convergeephemerons(), and traversetable().
|
static |
Definition at line 514 of file lua-5.3.6/src/lgc.c.
References GCSinsideatomic, global_State::gcstate, markobjectN, markvalue, NULL, UpVal::open, LClosure::p, sizeLclosure, UpVal::touched, UpVal::u, upisopen, LClosure::upvals, and UpVal::v.
Referenced by propagatemark().
|
static |
Definition at line 479 of file lua-5.3.6/src/lgc.c.
References Proto::cache, iswhite, Proto::k, Proto::locvars, markobjectN, markvalue, NULL, Proto::p, Proto::sizecode, Proto::sizek, Proto::sizelineinfo, Proto::sizelocvars, Proto::sizep, Proto::sizeupvalues, Proto::source, Proto::upvalues, and LocVar::varname.
Referenced by propagatemark().
|
static |
Definition at line 433 of file lua-5.3.6/src/lgc.c.
References Table::array, checkdeadkey, gkey, gnode, gnodelast, gval, lua_assert, markvalue, removeentry(), Table::sizearray, and ttisnil.
Referenced by traversetable().
|
static |
Definition at line 451 of file lua-5.3.6/src/lgc.c.
References allocsizenode, global_State::allweak, black2gray, cast, gfasttm, linkgclist, markobjectN, Table::metatable, Table::sizearray, svalue, TM_MODE, traverseephemeron(), traversestrongtable(), traverseweakvalue(), and ttisstring.
Referenced by propagatemark().
|
static |
Definition at line 530 of file lua-5.3.6/src/lgc.c.
References global_State::gckind, GCSinsideatomic, global_State::gcstate, isintwups, KGC_EMERGENCY, lua_assert, luaD_shrinkstack(), markvalue, lua_State::nci, NULL, lua_State::openupval, setnilvalue, lua_State::stack, lua_State::stacksize, lua_State::top, global_State::twups, and lua_State::twups.
Referenced by propagatemark().
|
static |
Definition at line 361 of file lua-5.3.6/src/lgc.c.
References checkdeadkey, GCSpropagate, global_State::gcstate, gkey, gnode, gnodelast, global_State::grayagain, gval, iscleared(), linkgclist, lua_assert, markvalue, removeentry(), Table::sizearray, ttisnil, and global_State::weak.
Referenced by traversetable().
|
static |
Definition at line 788 of file lua-5.3.6/src/lgc.c.
References global_State::allgc, FINALIZEDBIT, issweepphase, lua_assert, makewhite, resetbit, global_State::tobefnz, and tofinalize.
Referenced by GCTM().