Go to the source code of this file.
Defines | |
#define | ldebug_c |
#define | LUA_CORE |
#define | check(x) if (!(x)) return 0; |
#define | checkjump(pt, pc) check(0 <= pc && pc < pt->sizecode) |
#define | checkreg(pt, reg) check((reg) < (pt)->maxstacksize) |
#define | checkopenop(pt, pc) luaG_checkopenop((pt)->code[(pc)+1]) |
Functions | |
static const char * | getfuncname (lua_State *L, CallInfo *ci, const char **name) |
static int | currentpc (lua_State *L, CallInfo *ci) |
static int | currentline (lua_State *L, CallInfo *ci) |
LUA_API int | lua_sethook (lua_State *L, lua_Hook func, int mask, int count) |
LUA_API lua_Hook | lua_gethook (lua_State *L) |
LUA_API int | lua_gethookmask (lua_State *L) |
LUA_API int | lua_gethookcount (lua_State *L) |
LUA_API int | lua_getstack (lua_State *L, int level, lua_Debug *ar) |
static Proto * | getluaproto (CallInfo *ci) |
static const char * | findlocal (lua_State *L, CallInfo *ci, int n) |
LUA_API const char * | lua_getlocal (lua_State *L, const lua_Debug *ar, int n) |
LUA_API const char * | lua_setlocal (lua_State *L, const lua_Debug *ar, int n) |
static void | funcinfo (lua_Debug *ar, Closure *cl) |
static void | info_tailcall (lua_Debug *ar) |
static void | collectvalidlines (lua_State *L, Closure *f) |
static int | auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, Closure *f, CallInfo *ci) |
LUA_API int | lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) |
static int | precheck (const Proto *pt) |
int | luaG_checkopenop (Instruction i) |
static int | checkArgMode (const Proto *pt, int r, enum OpArgMask mode) |
static Instruction | symbexec (const Proto *pt, int lastpc, int reg) |
int | luaG_checkcode (const Proto *pt) |
static const char * | kname (Proto *p, int c) |
static const char * | getobjname (lua_State *L, CallInfo *ci, int stackpos, const char **name) |
static int | isinstack (CallInfo *ci, const TValue *o) |
void | luaG_typeerror (lua_State *L, const TValue *o, const char *op) |
void | luaG_concaterror (lua_State *L, StkId p1, StkId p2) |
void | luaG_aritherror (lua_State *L, const TValue *p1, const TValue *p2) |
int | luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2) |
void | luaG_errormsg (lua_State *L) |
static void | addinfo (lua_State *L, const char *msg) |
void | luaG_runerror_ok (lua_State *L, const char *fmt,...) |
#define check | ( | x | ) | if (!(x)) return 0; |
Definition at line 269 of file ldebug.c.
Referenced by checkArgMode(), checknext(), luaG_checkopenop(), luaY_parser(), precheck(), str_checkname(), and symbexec().
#define checkjump | ( | pt, | |||
pc | ) | check(0 <= pc && pc < pt->sizecode) |
#define checkopenop | ( | pt, | |||
pc | ) | luaG_checkopenop((pt)->code[(pc)+1]) |
Definition at line 289 of file ldebug.c.
Referenced by symbexec().
#define checkreg | ( | pt, | |||
reg | ) | check((reg) < (pt)->maxstacksize) |
Definition at line 273 of file ldebug.c.
Referenced by checkArgMode(), and symbexec().
static void addinfo | ( | lua_State * | L, | |
const char * | msg | |||
) | [static] |
Definition at line 653 of file ldebug.c.
References lua_State::ci, currentline(), getluaproto(), getstr, isLua, LUA_IDSIZE, luaO_chunkid(), and luaO_pushfstring().
Referenced by luaG_runerror_ok().
static int auxgetinfo | ( | lua_State * | L, | |
const char * | what, | |||
lua_Debug * | ar, | |||
Closure * | f, | |||
CallInfo * | ci | |||
) | [static] |
Definition at line 194 of file ldebug.c.
References Closure::c, currentline(), lua_Debug::currentline, funcinfo(), getfuncname(), info_tailcall(), lua_Debug::name, lua_Debug::namewhat, and lua_Debug::nups.
Referenced by lua_getinfo().
Definition at line 178 of file ldebug.c.
References Closure::c, incr_top, Closure::l, Proto::lineinfo, luaH_new(), luaH_setnum(), LClosure::p, setbvalue, sethvalue, setnilvalue, Proto::sizelineinfo, and lua_State::top.
Referenced by lua_getinfo().
Definition at line 45 of file ldebug.c.
References ci_func, currentpc(), and getline.
Referenced by addinfo(), and auxgetinfo().
Definition at line 37 of file ldebug.c.
References lua_State::ci, ci_func, isLua, pcRel, lua_State::savedpc, and CallInfo::savedpc.
Referenced by currentline(), findlocal(), getfuncname(), and getobjname().
Definition at line 113 of file ldebug.c.
References CallInfo::base, lua_State::ci, currentpc(), getluaproto(), luaF_getlocalname(), and lua_State::top.
Referenced by lua_getlocal(), and lua_setlocal().
Definition at line 151 of file ldebug.c.
References Closure::c, getstr, Closure::l, Proto::lastlinedefined, lua_Debug::lastlinedefined, Proto::linedefined, lua_Debug::linedefined, LUA_IDSIZE, luaO_chunkid(), LClosure::p, lua_Debug::short_src, Proto::source, lua_Debug::source, and lua_Debug::what.
Referenced by auxgetinfo().
Definition at line 545 of file ldebug.c.
References ci_func, currentpc(), GET_OPCODE, GETARG_A, getobjname(), isLua, OP_CALL, OP_TAILCALL, OP_TFORLOOP, and CallInfo::tailcalls.
Referenced by auxgetinfo().
static const char* getobjname | ( | lua_State * | L, | |
CallInfo * | ci, | |||
int | stackpos, | |||
const char ** | name | |||
) | [static] |
Definition at line 498 of file ldebug.c.
References ci_func, currentpc(), GET_OPCODE, GETARG_A, GETARG_B, GETARG_Bx, GETARG_C, getstr, isLua, Proto::k, kname(), lua_assert, luaF_getlocalname(), OP_GETGLOBAL, OP_GETTABLE, OP_GETUPVAL, OP_MOVE, OP_SELF, svalue, symbexec(), ttisstring, and Proto::upvalues.
Referenced by getfuncname(), and luaG_typeerror().
static void info_tailcall | ( | lua_Debug * | ar | ) | [static] |
Definition at line 168 of file ldebug.c.
References lua_Debug::currentline, lua_Debug::lastlinedefined, lua_Debug::linedefined, LUA_IDSIZE, luaO_chunkid(), lua_Debug::name, lua_Debug::namewhat, lua_Debug::nups, lua_Debug::short_src, lua_Debug::source, and lua_Debug::what.
Referenced by auxgetinfo().
static const char* kname | ( | Proto * | p, | |
int | c | |||
) | [static] |
Definition at line 490 of file ldebug.c.
References INDEXK, ISK, Proto::k, svalue, and ttisstring.
Referenced by getobjname().
LUA_API int lua_gethookcount | ( | lua_State * | L | ) |
Definition at line 80 of file ldebug.c.
References lua_State::basehookcount.
Referenced by db_gethook().
LUA_API int lua_gethookmask | ( | lua_State * | L | ) |
Definition at line 233 of file ldebug.c.
References auxgetinfo(), lua_State::base_ci, clvalue, collectvalidlines(), f(), CallInfo::func, lua_Debug::i_ci, incr_top, lua_assert, lua_lock, lua_unlock, luai_apicheck, setclvalue, setnilvalue, lua_State::top, and ttisfunction.
Referenced by db_errorfb(), db_getinfo(), getfunc(), hookf(), luaL_argerror(), luaL_where(), and setfenv().
Definition at line 128 of file ldebug.c.
References CallInfo::base, lua_State::base_ci, findlocal(), lua_Debug::i_ci, lua_lock, lua_unlock, and luaA_pushobject().
Referenced by db_getlocal().
Definition at line 85 of file ldebug.c.
References lua_State::base_ci, cast_int, lua_State::ci, f_isLua, lua_Debug::i_ci, lua_lock, lua_unlock, and CallInfo::tailcalls.
Referenced by costatus(), db_errorfb(), db_getinfo(), db_getlocal(), db_setlocal(), getfunc(), luaL_argerror(), luaL_where(), and setfenv().
Definition at line 57 of file ldebug.c.
References lua_State::basehookcount, cast_byte, lua_State::hook, lua_State::hookmask, and resethookcount.
Referenced by db_sethook(), laction(), and lstop().
Definition at line 139 of file ldebug.c.
References CallInfo::base, lua_State::base_ci, findlocal(), lua_Debug::i_ci, lua_lock, lua_unlock, setobjs2s, and lua_State::top.
Referenced by db_setlocal().
Definition at line 593 of file ldebug.c.
References luaG_typeerror(), and luaV_tonumber().
Referenced by Arith().
int luaG_checkcode | ( | const Proto * | pt | ) |
Definition at line 485 of file ldebug.c.
References NO_REG, Proto::sizecode, and symbexec().
Referenced by close_func(), and LoadFunction().
int luaG_checkopenop | ( | Instruction | i | ) |
Definition at line 291 of file ldebug.c.
References check, GET_OPCODE, GETARG_B, OP_CALL, OP_RETURN, OP_SETLIST, and OP_TAILCALL.
Referenced by luaV_execute().
Definition at line 586 of file ldebug.c.
References lua_assert, luaG_typeerror(), ttisnumber, and ttisstring.
Referenced by luaV_concat().
void luaG_errormsg | ( | lua_State * | L | ) |
Definition at line 620 of file ldebug.c.
References lua_State::errfunc, incr_top, LUA_ERRERR, LUA_ERRRUN, luaD_call(), luaD_throw(), restorestack, setobjs2s, lua_State::top, and ttisfunction.
Referenced by lua_error(), and luaG_runerror_ok().
Definition at line 601 of file ldebug.c.
References incr_top, LUA_ERRRUN, luaD_throw(), luaG_runerror_m, luaS_new, luaT_typenames, setsvalue2s, lua_State::top, and ttype.
Referenced by lessequal(), and luaV_lessthan().
void luaG_runerror_ok | ( | lua_State * | L, | |
const char * | fmt, | |||
... | ||||
) |
Definition at line 665 of file ldebug.c.
References addinfo(), luaG_errormsg(), and luaO_pushvfstring().
Definition at line 568 of file ldebug.c.
References lua_State::base, cast_int, lua_State::ci, getobjname(), isinstack(), LUA_QS, luaG_runerror_m, luaT_typenames, and ttype.
Referenced by luaG_aritherror(), luaG_concaterror(), luaV_execute(), luaV_gettable(), luaV_settable(), and tryfuncTM().
static int precheck | ( | const Proto * | pt | ) | [static] |
Definition at line 277 of file ldebug.c.
References check, Proto::code, GET_OPCODE, Proto::is_vararg, MAXSTACK, Proto::maxstacksize, Proto::numparams, Proto::nups, OP_RETURN, Proto::sizecode, Proto::sizelineinfo, Proto::sizeupvalues, VARARG_HASARG, and VARARG_NEEDSARG.
Referenced by symbexec().
static Instruction symbexec | ( | const Proto * | pt, | |
int | lastpc, | |||
int | reg | |||
) | [static] |
Definition at line 318 of file ldebug.c.
References check, checkArgMode(), checkopenop, checkreg, Proto::code, d(), GET_OPCODE, GETARG_A, GETARG_B, GETARG_Bx, GETARG_C, GETARG_sBx, getBMode, getCMode, getOpMode, iABC, iABx, iAsBx, Proto::is_vararg, Proto::k, LUA_MULTRET, NO_REG, NUM_OPCODES, Proto::nups, OP_CALL, OP_CLOSURE, OP_CONCAT, OP_FORLOOP, OP_FORPREP, OP_GETGLOBAL, OP_GETUPVAL, OP_JMP, OP_LOADBOOL, OP_LOADNIL, OP_MOVE, OP_RETURN, OP_SELF, OP_SETGLOBAL, OP_SETLIST, OP_SETUPVAL, OP_TAILCALL, OP_TFORLOOP, OP_VARARG, OpArgK, OpArgR, Proto::p, precheck(), Proto::sizecode, testAMode, testTMode, ttisstring, VARARG_ISVARARG, and VARARG_NEEDSARG.
Referenced by getobjname(), and luaG_checkcode().
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:59 2011 by Doxygen 1.6.1