Go to the source code of this file.
Defines | |
#define | luaD_checkstack(L, n) |
#define | incr_top(L) {luaD_checkstack(L,1); L->top++;} |
#define | savestack(L, p) ((char *)(p) - (char *)L->stack) |
#define | restorestack(L, n) ((TValue *)((char *)L->stack + (n))) |
#define | saveci(L, p) ((char *)(p) - (char *)L->base_ci) |
#define | restoreci(L, n) ((CallInfo *)((char *)L->base_ci + (n))) |
#define | PCRLUA 0 |
#define | PCRC 1 |
#define | PCRYIELD 2 |
Typedefs | |
typedef void(* | Pfunc )(lua_State *L, void *ud) |
Functions | |
LUAI_FUNC int | luaD_protectedparser (lua_State *L, ZIO *z, const char *name) |
LUAI_FUNC void | luaD_callhook (lua_State *L, int event, int line) |
LUAI_FUNC int | luaD_precall (lua_State *L, StkId func, int nresults) |
LUAI_FUNC void | luaD_call (lua_State *L, StkId func, int nResults) |
LUAI_FUNC int | luaD_pcall (lua_State *L, Pfunc func, void *u, ptrdiff_t oldtop, ptrdiff_t ef) |
LUAI_FUNC int | luaD_poscall (lua_State *L, StkId firstResult) |
LUAI_FUNC void | luaD_reallocCI (lua_State *L, int newsize) |
LUAI_FUNC void | luaD_reallocstack (lua_State *L, int newsize) |
LUAI_FUNC void | luaD_growstack (lua_State *L, int n) |
LUAI_FUNC void | luaD_throw (lua_State *L, int errcode) |
LUAI_FUNC int | luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) |
LUAI_FUNC void | luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) |
#define incr_top | ( | L | ) | {luaD_checkstack(L,1); L->top++;} |
Definition at line 22 of file ldo.h.
Referenced by collectvalidlines(), combine(), f_parser(), LoadFunction(), lua_getinfo(), luaG_errormsg(), luaG_ordererror(), luaO_pushvfstring(), open_func(), pushstr(), resume_error(), and tryfuncTM().
#define luaD_checkstack | ( | L, | |||
n | ) |
if ((char *)L->stack_last - (char *)L->top <= (n)*(int)sizeof(TValue)) \ luaD_growstack(L, n); \ else condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1));
Definition at line 16 of file ldo.h.
Referenced by callTM(), callTMres(), lua_checkstack(), luaD_callhook(), luaD_precall(), and luaV_execute().
#define PCRC 1 |
Definition at line 33 of file ldo.h.
Referenced by luaD_precall(), and luaV_execute().
#define PCRLUA 0 |
Definition at line 32 of file ldo.h.
Referenced by luaD_call(), luaD_precall(), luaV_execute(), and resume().
#define PCRYIELD 2 |
Definition at line 34 of file ldo.h.
Referenced by luaD_precall().
#define restoreci | ( | L, | |||
n | ) | ((CallInfo *)((char *)L->base_ci + (n))) |
Definition at line 28 of file ldo.h.
Referenced by luaD_pcall().
#define restorestack | ( | L, | |||
n | ) | ((TValue *)((char *)L->stack + (n))) |
Definition at line 25 of file ldo.h.
Referenced by callrethooks(), callTMres(), luaD_callhook(), luaD_pcall(), luaD_precall(), luaG_errormsg(), and tryfuncTM().
#define saveci | ( | L, | |||
p | ) | ((char *)(p) - (char *)L->base_ci) |
Definition at line 27 of file ldo.h.
Referenced by luaD_pcall().
#define savestack | ( | L, | |||
p | ) | ((char *)(p) - (char *)L->stack) |
Definition at line 24 of file ldo.h.
Referenced by callrethooks(), callTMres(), lua_cpcall(), lua_pcall(), luaD_callhook(), luaD_precall(), luaD_protectedparser(), and tryfuncTM().
Definition at line 375 of file ldo.c.
References LUA_ERRERR, luaC_checkGC, luaD_precall(), luaD_throw(), luaG_runerror_1, LUAI_MAXCCALLS, luaV_execute(), lua_State::nCcalls, and PCRLUA.
Referenced by callTM(), callTMres(), f_call(), f_Ccall(), GCTM(), lua_call(), luaG_errormsg(), and luaV_execute().
LUAI_FUNC void luaD_callhook | ( | lua_State * | L, | |
int | event, | |||
int | line | |||
) |
Definition at line 187 of file ldo.c.
References lua_State::allowhook, lua_State::base_ci, cast_int, lua_State::ci, lua_Debug::currentline, lua_Debug::event, lua_State::hook, lua_Debug::i_ci, lua_assert, LUA_HOOKTAILRET, lua_lock, LUA_MINSTACK, lua_unlock, luaD_checkstack, restorestack, savestack, lua_State::stack_last, CallInfo::top, and lua_State::top.
Referenced by callrethooks(), luaD_precall(), and traceexec().
LUAI_FUNC void luaD_growstack | ( | lua_State * | L, | |
int | n | |||
) |
Definition at line 167 of file ldo.c.
References luaD_reallocstack(), and lua_State::stacksize.
Definition at line 461 of file ldo.c.
References lua_State::allowhook, CallInfo::base, lua_State::base, lua_State::ci, lua_State::errfunc, luaD_rawrunprotected(), luaD_seterrorobj(), luaF_close(), lua_State::nCcalls, restore_stack_limit(), restoreci, restorestack, saveci, CallInfo::savedpc, lua_State::savedpc, and lua_longjmp::status.
Referenced by lua_cpcall(), lua_pcall(), and luaD_protectedparser().
Definition at line 348 of file ldo.c.
References lua_State::base, callrethooks(), lua_State::ci, CallInfo::func, lua_State::hookmask, LUA_MASKRET, LUA_MULTRET, CallInfo::nresults, lua_State::savedpc, setnilvalue, setobjs2s, and lua_State::top.
Referenced by luaD_precall(), luaV_execute(), and resume().
Definition at line 270 of file ldo.c.
References adjust_varargs(), CallInfo::base, lua_State::base, cast_int, lua_State::ci, clvalue, Proto::code, curr_func, CallInfo::func, lua_State::hookmask, inc_ci, Proto::is_vararg, lua_assert, LUA_HOOKCALL, lua_lock, LUA_MASKCALL, LUA_MINSTACK, lua_unlock, luaD_callhook(), luaD_checkstack, luaD_poscall(), Proto::maxstacksize, CallInfo::nresults, Proto::numparams, LClosure::p, PCRC, PCRLUA, PCRYIELD, restorestack, lua_State::savedpc, CallInfo::savedpc, savestack, setnilvalue, lua_State::stack_last, CallInfo::tailcalls, CallInfo::top, lua_State::top, tryfuncTM(), and ttisfunction.
Referenced by luaD_call(), luaV_execute(), and resume().
Definition at line 514 of file ldo.c.
References SParser::buff, lua_State::errfunc, f_parser(), luaD_pcall(), luaZ_freebuffer, luaZ_initbuffer, SParser::name, savestack, lua_State::top, and SParser::z.
Referenced by lua_load().
Definition at line 116 of file ldo.c.
References lua_State::errorJmp, LUAI_TRY, lua_longjmp::previous, and lua_longjmp::status.
Referenced by lua_close(), lua_newstate(), lua_resume(), and luaD_pcall().
LUAI_FUNC void luaD_reallocCI | ( | lua_State * | L, | |
int | newsize | |||
) |
Definition at line 158 of file ldo.c.
References lua_State::base_ci, lua_State::ci, lua_State::end_ci, luaM_reallocvector, and lua_State::size_ci.
Referenced by checkstacksizes(), growCI(), and restore_stack_limit().
LUAI_FUNC void luaD_reallocstack | ( | lua_State * | L, | |
int | newsize | |||
) |
Definition at line 147 of file ldo.c.
References correctstack(), EXTRA_STACK, lua_assert, luaM_reallocvector, lua_State::stack, lua_State::stack_last, and lua_State::stacksize.
Referenced by checkstacksizes(), and luaD_growstack().
Definition at line 54 of file ldo.c.
References LUA_ERRERR, LUA_ERRMEM, LUA_ERRRUN, LUA_ERRSYNTAX, luaS_newliteral, MEMERRMSG, setobjs2s, setsvalue2s, and lua_State::top.
Referenced by lua_resume(), luaD_pcall(), and resetstack().
LUAI_FUNC void luaD_throw | ( | lua_State * | L, | |
int | errcode | |||
) |
Definition at line 97 of file ldo.c.
References cast_byte, lua_State::errorJmp, G, lua_unlock, LUAI_THROW, resetstack(), lua_State::status, and lua_longjmp::status.
Referenced by error(), growCI(), luaD_call(), luaG_errormsg(), luaG_ordererror(), luaM_realloc_(), and luaX_lexerror().
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:59 2011 by Doxygen 1.6.1