Go to the source code of this file.
Classes | |
struct | lua_longjmp |
struct | SParser |
Defines | |
#define | ldo_c |
#define | LUA_CORE |
#define | inc_ci(L) |
Functions | |
void | luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) |
static void | restore_stack_limit (lua_State *L) |
static void | resetstack (lua_State *L, int status) |
void | luaD_throw (lua_State *L, int errcode) |
int | luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) |
static void | correctstack (lua_State *L, TValue *oldstack) |
void | luaD_reallocstack (lua_State *L, int newsize) |
void | luaD_reallocCI (lua_State *L, int newsize) |
void | luaD_growstack (lua_State *L, int n) |
static CallInfo * | growCI (lua_State *L) |
void | luaD_callhook (lua_State *L, int event, int line) |
static StkId | adjust_varargs (lua_State *L, Proto *p, int actual) |
static StkId | tryfuncTM (lua_State *L, StkId func) |
int | luaD_precall (lua_State *L, StkId func, int nresults) |
static StkId | callrethooks (lua_State *L, StkId firstResult) |
int | luaD_poscall (lua_State *L, StkId firstResult) |
void | luaD_call (lua_State *L, StkId func, int nResults) |
static void | resume (lua_State *L, void *ud) |
static int | resume_error (lua_State *L, const char *msg) |
LUA_API int | lua_resume (lua_State *L, int nargs) |
LUA_API int | lua_yield (lua_State *L, int nresults) |
int | luaD_pcall (lua_State *L, Pfunc func, void *u, ptrdiff_t old_top, ptrdiff_t ef) |
static void | f_parser (lua_State *L, void *ud) |
int | luaD_protectedparser (lua_State *L, ZIO *z, const char *name) |
#define inc_ci | ( | L | ) |
((L->ci == L->end_ci) ? growCI(L) : \ (condhardstacktests(luaD_reallocCI(L, L->size_ci)), ++L->ci))
Definition at line 265 of file ldo.c.
Referenced by luaD_precall().
Definition at line 214 of file ldo.c.
References cast_num, Proto::is_vararg, iswhite, lua_assert, luaC_checkGC, luaH_new(), luaH_setnum(), luaH_setstr(), luaS_newliteral, Proto::numparams, obj2gco, sethvalue, setnilvalue, setnvalue, setobj2n, setobjs2s, lua_State::top, VARARG_HASARG, and VARARG_NEEDSARG.
Referenced by luaD_precall().
Definition at line 337 of file ldo.c.
References lua_State::ci, f_isLua, lua_State::hookmask, LUA_HOOKRET, LUA_HOOKTAILRET, LUA_MASKRET, luaD_callhook(), restorestack, savestack, and CallInfo::tailcalls.
Referenced by luaD_poscall().
Definition at line 132 of file ldo.c.
References lua_State::base, CallInfo::base, lua_State::base_ci, CallInfo::func, GCObject::gch, gco2uv, lua_State::openupval, lua_State::stack, CallInfo::top, and lua_State::top.
Referenced by luaD_reallocstack().
static void f_parser | ( | lua_State * | L, | |
void * | ud | |||
) | [static] |
Definition at line 496 of file ldo.c.
References SParser::buff, cast, gt, hvalue, incr_top, Closure::l, LUA_SIGNATURE, luaC_checkGC, luaF_newLclosure(), luaF_newupval(), luaU_undump(), luaY_parser(), luaZ_lookahead(), SParser::name, Proto::nups, LClosure::p, setclvalue, lua_State::top, LClosure::upvals, and SParser::z.
Referenced by luaD_protectedparser().
Definition at line 175 of file ldo.c.
References lua_State::ci, LUA_ERRERR, luaD_reallocCI(), luaD_throw(), luaG_runerror_1, LUAI_MAXCALLS, and lua_State::size_ci.
LUA_API int lua_resume | ( | lua_State * | L, | |
int | nargs | |||
) |
Definition at line 423 of file ldo.c.
References lua_State::base_ci, lua_State::baseCcalls, cast_byte, lua_State::ci, lua_State::errfunc, lua_assert, lua_lock, lua_unlock, LUA_YIELD, luaD_rawrunprotected(), luaD_seterrorobj(), LUAI_MAXCCALLS, luai_userstateresume, lua_State::nCcalls, resume(), resume_error(), lua_State::status, lua_longjmp::status, CallInfo::top, and lua_State::top.
Referenced by auxresume().
LUA_API int lua_yield | ( | lua_State * | L, | |
int | nresults | |||
) |
Definition at line 449 of file ldo.c.
References lua_State::base, lua_State::baseCcalls, lua_lock, lua_unlock, LUA_YIELD, luaG_runerror_1, luai_userstateyield, lua_State::nCcalls, lua_State::status, and lua_State::top.
Referenced by luaB_yield().
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().
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().
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().
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().
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().
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().
static void resetstack | ( | lua_State * | L, | |
int | status | |||
) | [static] |
Definition at line 84 of file ldo.c.
References lua_State::allowhook, CallInfo::base, lua_State::base, lua_State::base_ci, lua_State::baseCcalls, lua_State::ci, lua_State::errfunc, lua_State::errorJmp, luaD_seterrorobj(), luaF_close(), lua_State::nCcalls, and restore_stack_limit().
Referenced by luaD_throw().
static void restore_stack_limit | ( | lua_State * | L | ) | [static] |
Definition at line 74 of file ldo.c.
References lua_State::base_ci, cast_int, lua_State::ci, EXTRA_STACK, lua_assert, luaD_reallocCI(), LUAI_MAXCALLS, lua_State::size_ci, lua_State::stack, lua_State::stack_last, and lua_State::stacksize.
Referenced by luaD_pcall(), and resetstack().
static void resume | ( | lua_State * | L, | |
void * | ud | |||
) | [static] |
Definition at line 389 of file ldo.c.
References CallInfo::base, lua_State::base, lua_State::base_ci, cast, cast_int, lua_State::ci, f_isLua, GET_OPCODE, lua_assert, LUA_MULTRET, LUA_YIELD, luaD_poscall(), luaD_precall(), luaV_execute(), OP_CALL, OP_TAILCALL, PCRLUA, lua_State::status, CallInfo::top, and lua_State::top.
Referenced by lua_resume().
static int resume_error | ( | lua_State * | L, | |
const char * | msg | |||
) | [static] |
Definition at line 414 of file ldo.c.
References CallInfo::base, lua_State::ci, incr_top, LUA_ERRRUN, lua_unlock, luaS_new, setsvalue2s, and lua_State::top.
Referenced by lua_resume().
Definition at line 249 of file ldo.c.
References incr_top, luaG_typeerror(), luaT_gettmbyobj(), restorestack, savestack, setobj2s, setobjs2s, TM_CALL, lua_State::top, and ttisfunction.
Referenced by luaD_precall().
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:59 2011 by Doxygen 1.6.1