34 #define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL) 38 #define ci_func(ci) (clLvalue((ci)->func)) 82 if (func == NULL || mask == 0) {
113 if (level < 0)
return 0;
117 if (level == 0 && ci != &L->
base_ci) {
129 if (s == NULL)
return "?";
139 *pos = ci->
func + nparams +
n;
147 const char *name = NULL;
161 if (limit - base >= n && n > 0)
162 name =
"(*temporary)";
166 *pos = base + (n - 1);
265 for (; *what; what++) {
276 ar->
nups = (f == NULL) ? 0 : f->
c.nupvalues;
330 if (strchr(what,
'f')) {
335 if (strchr(what,
'L'))
365 const char *what =
getobjname(p, pc, c, name);
366 if (what && *what ==
'c') {
389 for (pc = 0; pc < lastpc; pc++) {
396 if (a <= reg && reg <= a + b)
413 int dest = pc + 1 +
b;
415 if (pc < dest && dest <= lastpc) {
416 if (dest > jmptarget)
456 kname(p, pc, k, name);
457 return (vn && strcmp(vn,
LUA_ENV) == 0) ?
"global" :
"field";
475 kname(p, pc, k, name);
506 *name =
"for iterator";
507 return "for iterator";
533 *name =
getstr(
G(L)->tmname[tm]);
547 ptrdiff_t
i = o - ci->
u.
l.base;
548 return (0 <= i && i < (ci->
top - ci->
u.
l.base) && ci->
u.
l.base + i == o);
561 for (i = 0; i < c->nupvalues; i++) {
572 const char *name = NULL;
574 const char *kind = NULL;
620 if (strcmp(t1, t2) == 0)
634 buff[0] =
'?'; buff[1] =
'\0';
680 if (mask & LUA_MASKLINE) {
682 int npc =
pcRel(ci->
u.
l.savedpc, p);
static const char * getupvalname(CallInfo *ci, const TValue *o, const char **name)
unsigned short callstatus
const char * luaO_pushvfstring(lua_State *L, const char *fmt, va_list argp)
l_noret luaG_runerror(lua_State *L, const char *fmt,...)
static const char * upvalname(Proto *p, int uv)
#define setbvalue(obj, x)
LUA_API lua_Hook lua_gethook(lua_State *L)
static const char * funcnamefromcode(lua_State *L, CallInfo *ci, const char **name)
#define getfuncline(f, pc)
LUA_API int lua_gethookmask(lua_State *L)
static int currentpc(CallInfo *ci)
static int currentline(CallInfo *ci)
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
char short_src[LUA_IDSIZE]
LUA_API int lua_getstack(lua_State *L, int level, lua_Debug *ar)
static int findsetreg(Proto *p, int lastpc, int reg)
l_noret luaG_errormsg(lua_State *L)
static int filterpc(int pc, int jmptarget)
static const char * findvararg(CallInfo *ci, int n, StkId *pos)
static int isinstack(CallInfo *ci, const TValue *o)
static const char * findlocal(lua_State *L, CallInfo *ci, int n, StkId *pos)
l_noret luaG_typeerror(lua_State *L, const TValue *o, const char *op)
#define sethvalue(L, obj, x)
#define restorestack(L, n)
const char * luaF_getlocalname(const Proto *f, int local_number, int pc)
struct CallInfo::@10::@11 l
const char * luaT_objtypename(lua_State *L, const TValue *o)
LUA_API const char * lua_setlocal(lua_State *L, const lua_Debug *ar, int n)
if(win_locale=="af") win_locale
#define resethookcount(L)
void luaD_hook(lua_State *L, int event, int line)
l_noret luaG_ordererror(lua_State *L, const TValue *p1, const TValue *p2)
static const char * getobjname(Proto *p, int lastpc, int reg, const char **name)
Table * luaH_new(lua_State *L)
l_noret luaD_throw(lua_State *L, int errcode)
static const char * getfuncname(lua_State *L, CallInfo *ci, const char **name)
LUA_API int lua_getinfo(lua_State *L, const char *what, lua_Debug *ar)
static map_location::DIRECTION s
l_noret luaG_tointerror(lua_State *L, const TValue *p1, const TValue *p2)
l_noret luaG_opinterror(lua_State *L, const TValue *p1, const TValue *p2, const char *msg)
void luaG_traceexec(lua_State *L)
LUA_API const char * lua_getlocal(lua_State *L, const lua_Debug *ar, int n)
const char * luaO_pushfstring(lua_State *L, const char *fmt,...)
void luaO_chunkid(char *out, const char *source, size_t bufflen)
void luaD_callnoyield(lua_State *L, StkId func, int nResults)
unsigned long Instruction
#define api_check(l, e, msg)
struct CallInfo * previous
void(* lua_Hook)(lua_State *L, lua_Debug *ar)
static void swapextra(lua_State *L)
l_noret luaG_concaterror(lua_State *L, const TValue *p1, const TValue *p2)
static const char * varinfo(lua_State *L, const TValue *o)
LUA_API int lua_gethookcount(lua_State *L)
static void collectvalidlines(lua_State *L, Closure *f)
static int auxgetinfo(lua_State *L, const char *what, lua_Debug *ar, Closure *f, CallInfo *ci)
static void kname(Proto *p, int pc, int c, const char **name)
const Instruction * oldpc
static map_location::DIRECTION n
const char * luaG_addinfo(lua_State *L, const char *msg, TString *src, int line)
static void funcinfo(lua_Debug *ar, Closure *cl)
void luaH_setint(lua_State *L, Table *t, lua_Integer key, TValue *value)
LUA_API void lua_sethook(lua_State *L, lua_Hook func, int mask, int count)