125 #define CSTACKERR (8 * CSTACKCF) 126 #define CSTACKMARK (CSTACKERR - (CSTACKCF + 2)) 127 #define CSTACKERRMARK (CSTACKCF + 2) 131 #define CSTACKTHREAD (2 * CSTACKERR) 135 #define yieldable(L) (((L)->nCcalls & 0xffff0000) == 0) 138 #define getCcalls(L) ((L)->nCcalls & 0xffff) 142 #define incnny(L) ((L)->nCcalls += 0x10000) 145 #define decnny(L) ((L)->nCcalls -= 0x10000) 148 #define incXCcalls(L) ((L)->nCcalls += 0x10000 - CSTACKCF) 151 #define decXCcalls(L) ((L)->nCcalls -= 0x10000 - CSTACKCF) 165 #if !defined(l_signalT) 167 #define l_signalT sig_atomic_t 172 #define EXTRA_STACK 5 175 #define BASIC_STACK_SIZE (2*LUA_MINSTACK) 225 #define CIST_OAH (1<<0) 226 #define CIST_C (1<<1) 227 #define CIST_HOOKED (1<<2) 228 #define CIST_YPCALL (1<<3) 229 #define CIST_TAIL (1<<4) 230 #define CIST_HOOKYIELD (1<<5) 231 #define CIST_FIN (1<<6) 232 #define CIST_TRAN (1<<7) 233 #if defined(LUA_COMPAT_LT_LE) 234 #define CIST_LEQ (1<<8) 238 #define isLua(ci) (!((ci)->callstatus & CIST_C)) 241 #define isLuacode(ci) (!((ci)->callstatus & (CIST_C | CIST_HOOKED))) 244 #define setoah(st,v) ((st) = ((st) & ~CIST_OAH) | (v)) 245 #define getoah(st) ((st) & CIST_OAH) 332 #define G(L) (L->l_G) 361 #define cast_u(o) cast(union GCUnion *, (o)) 365 check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts)) 366 #define gco2u(o) check_exp((o)->tt == LUA_VUSERDATA, &((cast_u(o))->u)) 367 #define gco2lcl(o) check_exp((o)->tt == LUA_VLCL, &((cast_u(o))->cl.l)) 368 #define gco2ccl(o) check_exp((o)->tt == LUA_VCCL, &((cast_u(o))->cl.c)) 370 check_exp(novariant((o)->tt) == LUA_TFUNCTION, &((cast_u(o))->cl)) 371 #define gco2t(o) check_exp((o)->tt == LUA_VTABLE, &((cast_u(o))->h)) 372 #define gco2p(o) check_exp((o)->tt == LUA_VPROTO, &((cast_u(o))->p)) 373 #define gco2th(o) check_exp((o)->tt == LUA_VTHREAD, &((cast_u(o))->th)) 374 #define gco2upv(o) check_exp((o)->tt == LUA_VUPVAL, &((cast_u(o))->upv)) 381 #define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc)) 385 #define gettotalbytes(g) cast(lu_mem, (g)->totalbytes + (g)->GCdebt) 397 #define luaE_exitCcall(L) ((L)->nCcalls++)
unsigned short callstatus
LUAI_FUNC void luaE_warning(lua_State *L, const char *msg, int tocont)
LUA_KCONTEXT lua_KContext
struct stringtable stringtable
const Instruction * savedpc
LUAI_FUNC void luaE_setdebt(global_State *g, l_mem debt)
void(* lua_WarnFunction)(void *ud, const char *msg, int tocont)
LUAI_FUNC void luaE_freethread(lua_State *L, lua_State *L1)
int(* lua_CFunction)(lua_State *L)
struct lua_State * mainthread
LUAI_FUNC CallInfo * luaE_extendCI(lua_State *L)
void *(* lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize)
int(* lua_KFunction)(lua_State *L, int status, lua_KContext ctx)
volatile l_signalT hookmask
LUAI_FUNC void luaE_freeCI(lua_State *L)
LUAI_FUNC void luaE_warnerror(lua_State *L, const char *where)
LUAI_FUNC void luaE_enterCcall(lua_State *L)
struct global_State global_State
LUAI_FUNC void luaE_shrinkCI(lua_State *L)
struct CallInfo * previous
void(* lua_Hook)(lua_State *L, lua_Debug *ar)
struct lua_longjmp * errorJmp