Go to the documentation of this file.
34 #define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_VCCL)
61 if (
f->sizeabslineinfo == 0 || pc < f->abslineinfo[0].pc) {
63 return f->linedefined;
69 (i < f->sizeabslineinfo &&
f->abslineinfo[i].pc <= pc));
70 while (i + 1 <
f->sizeabslineinfo && pc >=
f->abslineinfo[i + 1].pc)
72 *basepc =
f->abslineinfo[i].pc;
73 return f->abslineinfo[i].line;
84 if (
f->lineinfo == NULL)
89 while (basepc++ < pc) {
91 baseline +=
f->lineinfo[basepc];
115 for (; ci != NULL; ci = ci->
previous)
132 if (func == NULL || mask == 0) {
163 if (level < 0)
return 0;
167 if (level == 0 && ci != &L->
base_ci) {
179 if (
s == NULL)
return "?";
186 int nextra = ci->
u.
l.nextraargs;
188 *pos = ci->
func - nextra - (n + 1);
198 const char *name = NULL;
207 if (limit - base >= n && n > 0) {
209 name =
isLua(ci) ?
"(temporary)" :
"(C temporary)";
215 *pos = base + (n - 1);
284 return currentline + p->
lineinfo[pc];
305 currentline =
nextline(p, currentline, i);
329 for (; *what; what++) {
340 ar->
nups = (
f == NULL) ? 0 :
f->c.nupvalues;
402 if (strchr(what,
'f')) {
406 if (strchr(what,
'L'))
426 static void kname (
const Proto *p,
int c,
const char **name) {
435 static void rname (
const Proto *p,
int pc,
int c,
const char **name) {
436 const char *what =
getobjname(p, pc, c, name);
437 if (!(what && *what ==
'c'))
450 rname(p, pc, c, name);
470 for (pc = 0; pc < lastpc; pc++) {
478 change = (a <= reg && reg <= a + b);
482 change = (reg >= a + 2);
492 int dest = pc + 1 + b;
494 if (dest <= lastpc && dest > jmptarget)
521 return (name && strcmp(name,
LUA_ENV) == 0) ?
"global" :
"field";
546 return gxf(p, pc, i, 1);
550 rname(p, pc, k, name);
551 return gxf(p, pc, i, 0);
554 *name =
"integer index";
560 return gxf(p, pc, i, 0);
608 *name =
"for iterator";
609 return "for iterator";
651 for (pos = ci->
func + 1; pos < ci->
top; pos++) {
668 for (i = 0; i < c->nupvalues; i++) {
679 const char *name = NULL;
681 const char *kind = NULL;
700 const char *name = NULL;
704 luaG_runerror(L,
"%s '%s' is not callable (a %s value)", what, name, t);
745 if (strcmp(t1, t2) == 0)
759 buff[0] =
'?'; buff[1] =
'\0';
843 ci->
u.
l.savedpc = pc;
853 if (!
isIT(*(ci->
u.
l.savedpc - 1)))
860 int npci =
pcRel(pc, p);
const char * luaF_getlocalname(const Proto *f, int local_number, int pc)
LUA_API int lua_gethookcount(lua_State *L)
#define setobjs2s(L, o1, o2)
#define resethookcount(L)
struct CallInfo * previous
static int isinstack(CallInfo *ci, const TValue *o)
static int getcurrentline(CallInfo *ci)
static void funcinfo(lua_Debug *ar, Closure *cl)
struct CallInfo::@13::@16 transferinfo
l_noret luaG_ordererror(lua_State *L, const TValue *p1, const TValue *p2)
LUA_API int lua_getinfo(lua_State *L, const char *what, lua_Debug *ar)
const LUA_API char * lua_getlocal(lua_State *L, const lua_Debug *ar, int n)
static void rname(const Proto *p, int pc, int c, const char **name)
l_noret luaG_runerror(lua_State *L, const char *fmt,...)
#define restorestack(L, n)
static const char * upvalname(const Proto *p, int uv)
static void kname(const Proto *p, int c, const char **name)
static const char * getobjname(const Proto *p, int lastpc, int reg, const char **name)
const char * luaG_findlocal(lua_State *L, CallInfo *ci, int n, StkId *pos)
static int filterpc(int pc, int jmptarget)
static int currentpc(CallInfo *ci)
l_noret luaG_tointerror(lua_State *L, const TValue *p1, const TValue *p2)
void luaD_callnoyield(lua_State *L, StkId func, int nResults)
static const char * varinfo(lua_State *L, const TValue *o)
static void settraps(CallInfo *ci)
void luaD_hook(lua_State *L, int event, int line, int ftransfer, int ntransfer)
unsigned short callstatus
char short_src[LUA_IDSIZE]
static const char * getupvalname(CallInfo *ci, const TValue *o, const char **name)
const char * luaT_objtypename(lua_State *L, const TValue *o)
LUA_API int lua_gethookmask(lua_State *L)
static int changedline(const Proto *p, int oldpc, int newpc)
constexpr auto count() -> size_t
int luaG_traceexec(lua_State *L, const Instruction *pc)
static int nextline(const Proto *p, int currentline, int pc)
LUA_API void lua_sethook(lua_State *L, lua_Hook func, int mask, int count)
static const char * gxf(const Proto *p, int pc, Instruction i, int isup)
static void collectvalidlines(lua_State *L, Closure *f)
l_noret luaG_typeerror(lua_State *L, const TValue *o, const char *op)
void luaO_chunkid(char *out, const char *source, size_t srclen)
void(* lua_Hook)(lua_State *L, lua_Debug *ar)
LUA_API int lua_getstack(lua_State *L, int level, lua_Debug *ar)
Table * luaH_new(lua_State *L)
l_noret luaG_opinterror(lua_State *L, const TValue *p1, const TValue *p2, const char *msg)
static const char * getfuncname(lua_State *L, CallInfo *ci, const char **name)
const char * luaO_pushfstring(lua_State *L, const char *fmt,...)
LUA_API lua_Hook lua_gethook(lua_State *L)
volatile l_signalT hookmask
void luaH_setint(lua_State *L, Table *t, lua_Integer key, TValue *value)
const char * luaO_pushvfstring(lua_State *L, const char *fmt, va_list argp)
l_noret luaG_concaterror(lua_State *L, const TValue *p1, const TValue *p2)
l_noret luaD_throw(lua_State *L, int errcode)
static const char * funcnamefromcode(lua_State *L, CallInfo *ci, const char **name)
#define sethvalue2s(L, o, h)
static const char * findvararg(CallInfo *ci, int n, StkId *pos)
static int getbaseline(const Proto *f, int pc, int *basepc)
int luaV_tointegerns(const TValue *obj, lua_Integer *p, F2Imod mode)
l_noret luaG_callerror(lua_State *L, const TValue *o)
static void rkname(const Proto *p, int pc, Instruction i, const char **name)
#define setobj2s(L, o1, o2)
const char * luaG_addinfo(lua_State *L, const char *msg, TString *src, int line)
int luaG_getfuncline(const Proto *f, int pc)
static int auxgetinfo(lua_State *L, const char *what, lua_Debug *ar, Closure *f, CallInfo *ci)
#define api_check(l, e, msg)
const LUA_API char * lua_setlocal(lua_State *L, const lua_Debug *ar, int n)
l_noret luaG_forerror(lua_State *L, const TValue *o, const char *what)
l_noret luaG_errormsg(lua_State *L)
struct CallInfo::@12::@14 l
static int findsetreg(const Proto *p, int lastpc, int reg)
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44