Go to the source code of this file.
Classes | |
struct | stringtable |
struct | CallInfo |
struct | global_State |
struct | lua_State |
union | GCObject |
Macros | |
#define | EXTRA_STACK 5 |
#define | BASIC_STACK_SIZE (2*LUA_MINSTACK) |
#define | KGC_NORMAL 0 |
#define | KGC_EMERGENCY 1 /* gc was forced by an allocation failure */ |
#define | KGC_GEN 2 /* generational collection */ |
#define | CIST_LUA (1<<0) /* call is running a Lua function */ |
#define | CIST_HOOKED (1<<1) /* call is running a debug hook */ |
#define | CIST_REENTRY |
#define | CIST_YIELDED (1<<3) /* call reentered after suspension */ |
#define | CIST_YPCALL (1<<4) /* call is a yieldable protected call */ |
#define | CIST_STAT (1<<5) /* call has an error status (pcall) */ |
#define | CIST_TAIL (1<<6) /* call was tail called */ |
#define | CIST_HOOKYIELD (1<<7) /* last hook called yielded */ |
#define | isLua(ci) ((ci)->callstatus & CIST_LUA) |
#define | G(L) (L->l_G) |
#define | gch(o) (&(o)->gch) |
#define | rawgco2ts(o) check_exp(novariant((o)->gch.tt) == LUA_TSTRING, &((o)->ts)) |
#define | gco2ts(o) (&rawgco2ts(o)->tsv) |
#define | rawgco2u(o) check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u)) |
#define | gco2u(o) (&rawgco2u(o)->uv) |
#define | gco2lcl(o) check_exp((o)->gch.tt == LUA_TLCL, &((o)->cl.l)) |
#define | gco2ccl(o) check_exp((o)->gch.tt == LUA_TCCL, &((o)->cl.c)) |
#define | gco2cl(o) check_exp(novariant((o)->gch.tt) == LUA_TFUNCTION, &((o)->cl)) |
#define | gco2t(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) |
#define | gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) |
#define | gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) |
#define | gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th)) |
#define | obj2gco(v) (cast(GCObject *, (v))) |
#define | gettotalbytes(g) ((g)->totalbytes + (g)->GCdebt) |
Typedefs | |
typedef struct stringtable | stringtable |
typedef struct CallInfo | CallInfo |
typedef struct global_State | global_State |
Functions | |
LUAI_FUNC void | luaE_setdebt (global_State *g, l_mem debt) |
LUAI_FUNC void | luaE_freethread (lua_State *L, lua_State *L1) |
LUAI_FUNC CallInfo * | luaE_extendCI (lua_State *L) |
LUAI_FUNC void | luaE_freeCI (lua_State *L) |
#define BASIC_STACK_SIZE (2*LUA_MINSTACK) |
Definition at line 49 of file lstate.h.
Referenced by stack_init().
Definition at line 95 of file lstate.h.
Referenced by lua_yieldk(), and luaD_hook().
#define CIST_HOOKYIELD (1<<7) /* last hook called yielded */ |
Definition at line 102 of file lstate.h.
Referenced by traceexec().
#define CIST_LUA (1<<0) /* call is running a Lua function */ |
Definition at line 94 of file lstate.h.
Referenced by luaD_precall().
#define CIST_REENTRY |
Definition at line 96 of file lstate.h.
Referenced by luaV_execute().
#define CIST_STAT (1<<5) /* call has an error status (pcall) */ |
Definition at line 100 of file lstate.h.
Referenced by finishCcall(), and recover().
#define CIST_TAIL (1<<6) /* call was tail called */ |
Definition at line 101 of file lstate.h.
Referenced by auxgetinfo(), callhook(), and luaV_execute().
#define CIST_YIELDED (1<<3) /* call reentered after suspension */ |
Definition at line 98 of file lstate.h.
Referenced by finishCcall(), lua_getctx(), and resume().
#define CIST_YPCALL (1<<4) /* call is a yieldable protected call */ |
Definition at line 99 of file lstate.h.
Referenced by findpcall(), finishCcall(), and lua_pcallk().
#define EXTRA_STACK 5 |
Definition at line 46 of file lstate.h.
Referenced by lua_checkstack(), luaD_growstack(), luaD_reallocstack(), luaD_shrinkstack(), and stack_init().
#define G | ( | L | ) | (L->l_G) |
Definition at line 178 of file lstate.h.
Referenced by atomic(), callallpendingfinalizers(), checkSizes(), close_state(), entersweep(), f_luaopen(), freeobj(), GCTM(), generationalcollection(), getfuncname(), incstep(), index2addr(), internshrstr(), lua_atpanic(), lua_close(), lua_gc(), lua_getallocf(), lua_getglobal(), lua_getmetatable(), lua_load(), lua_newthread(), lua_pushthread(), lua_setallocf(), lua_setglobal(), lua_setmetatable(), lua_version(), lua_xmove(), lua_yieldk(), luaC_barrier_(), luaC_barrierback_(), luaC_barrierproto_(), luaC_changemode(), luaC_checkfinalizer(), luaC_forcestep(), luaC_freeallobjects(), luaC_fullgc(), luaC_newobj(), luaC_runtilstate(), luaC_step(), luaD_throw(), luaF_close(), luaF_findupval(), luaM_realloc_(), luaS_newlstr(), luaS_resize(), luaT_gettmbyobj(), luaT_init(), luaV_concat(), newshrstr(), preinit_state(), separatetobefnz(), seterrorobj(), singlestep(), sweeplist(), and sweepthread().
#define gch | ( | o | ) | (&(o)->gch) |
Definition at line 196 of file lstate.h.
Referenced by freeobj(), internshrstr(), luaC_barrier_(), luaC_barrierback_(), luaC_checkfinalizer(), luaC_newobj(), luaF_close(), luaS_resize(), markbeingfnz(), propagatemark(), reallymarkobject(), separatetobefnz(), sweeplist(), and udata2finalize().
Definition at line 205 of file lstate.h.
Referenced by freeobj(), propagatemark(), and reallymarkobject().
#define gco2cl | ( | o | ) | check_exp(novariant((o)->gch.tt) == LUA_TFUNCTION, &((o)->cl)) |
Definition at line 204 of file lstate.h.
Referenced by freeobj(), propagatemark(), and reallymarkobject().
#define gco2p | ( | o | ) | check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) |
Definition at line 209 of file lstate.h.
Referenced by freeobj(), propagatemark(), and reallymarkobject().
#define gco2t | ( | o | ) | check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) |
Definition at line 208 of file lstate.h.
Referenced by clearkeys(), clearvalues(), convergeephemerons(), freeobj(), luaC_barrierback_(), propagatemark(), and reallymarkobject().
#define gco2th | ( | o | ) | check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th)) |
Definition at line 211 of file lstate.h.
Referenced by freeobj(), propagatemark(), reallymarkobject(), and sweeplist().
#define gco2ts | ( | o | ) | (&rawgco2ts(o)->tsv) |
Definition at line 201 of file lstate.h.
Referenced by freeobj(), luaS_resize(), and reallymarkobject().
#define gco2u | ( | o | ) | (&rawgco2u(o)->uv) |
Definition at line 203 of file lstate.h.
Referenced by freeobj(), and reallymarkobject().
#define gco2uv | ( | o | ) | check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) |
Definition at line 210 of file lstate.h.
Referenced by correctstack(), freeobj(), luaF_close(), luaF_findupval(), and reallymarkobject().
Definition at line 218 of file lstate.h.
Referenced by close_state(), generationalcollection(), lua_gc(), luaC_changemode(), luaC_fullgc(), and setpause().
#define isLua | ( | ci | ) | ((ci)->callstatus & CIST_LUA) |
Definition at line 105 of file lstate.h.
Referenced by addinfo(), auxgetinfo(), callhook(), callTM(), correctstack(), currentpc(), findlocal(), lua_callk(), lua_pcallk(), lua_sethook(), lua_yieldk(), luaG_typeerror(), luaV_execute(), resume(), and unroll().
#define KGC_EMERGENCY 1 /* gc was forced by an allocation failure */ |
Definition at line 54 of file lstate.h.
Referenced by checkSizes(), luaC_fullgc(), and sweepthread().
#define KGC_GEN 2 /* generational collection */ |
Definition at line 55 of file lstate.h.
Referenced by lua_gc(), luaC_changemode(), and luaC_fullgc().
#define KGC_NORMAL 0 |
Definition at line 53 of file lstate.h.
Referenced by lua_gc(), lua_newstate(), luaC_changemode(), luaC_freeallobjects(), and luaC_fullgc().
Definition at line 214 of file lstate.h.
Referenced by atomic(), aux_upvalue(), luaC_barrierproto_(), luaC_checkupvalcolor(), luaC_newobj(), luaF_close(), luaF_findupval(), luaH_newkey(), luaV_execute(), luaV_settable(), remarkupvals(), singlestep(), traverseproto(), and traversetable().
#define rawgco2ts | ( | o | ) | check_exp(novariant((o)->gch.tt) == LUA_TSTRING, &((o)->ts)) |
Definition at line 199 of file lstate.h.
Referenced by internshrstr().
#define rawgco2u | ( | o | ) | check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u)) |
typedef struct global_State global_State |
typedef struct stringtable stringtable |
Definition at line 111 of file lstate.cpp.
References lua_State::ci, lua_assert, luaM_new, CallInfo::next, and CallInfo::previous.
Definition at line 121 of file lstate.cpp.
References lua_State::ci, luaM_free, next, and CallInfo::next.
Referenced by freestack(), and sweepthread().
Definition at line 255 of file lstate.cpp.
References freestack(), fromstate, lua_assert, luaF_close(), luai_userstatefree, luaM_free, lua_State::openupval, and lua_State::stack.
Referenced by freeobj().
LUAI_FUNC void luaE_setdebt | ( | global_State * | g, |
l_mem | debt | ||
) |
Definition at line 105 of file lstate.cpp.
References global_State::GCdebt, and global_State::totalbytes.
Referenced by incstep(), lua_gc(), luaC_step(), and setpause().