Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <stdarg.h>
#include <stddef.h>
#include <string.h>
#include "lua.h"
#include "lapi.h"
#include "lcode.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lobject.h"
#include "lopcodes.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
#include "lvm.h"
Go to the source code of this file.
Macros | |
#define | ldebug_c |
#define | LUA_CORE |
#define | noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_VCCL) |
Functions | |
static const char * | funcnamefromcode (lua_State *L, CallInfo *ci, const char **name) |
static int | currentpc (CallInfo *ci) |
static int | getbaseline (const Proto *f, int pc, int *basepc) |
int | luaG_getfuncline (const Proto *f, int pc) |
static int | getcurrentline (CallInfo *ci) |
static void | settraps (CallInfo *ci) |
LUA_API void | 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 const char * | upvalname (const Proto *p, int uv) |
static const char * | findvararg (CallInfo *ci, int n, StkId *pos) |
const char * | luaG_findlocal (lua_State *L, CallInfo *ci, int n, StkId *pos) |
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 int | nextline (const Proto *p, int currentline, int pc) |
static void | collectvalidlines (lua_State *L, Closure *f) |
static const char * | getfuncname (lua_State *L, CallInfo *ci, const char **name) |
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 const char * | getobjname (const Proto *p, int lastpc, int reg, const char **name) |
static void | kname (const Proto *p, int c, const char **name) |
static void | rname (const Proto *p, int pc, int c, const char **name) |
static void | rkname (const Proto *p, int pc, Instruction i, const char **name) |
static int | filterpc (int pc, int jmptarget) |
static int | findsetreg (const Proto *p, int lastpc, int reg) |
static const char * | gxf (const Proto *p, int pc, Instruction i, int isup) |
static int | isinstack (CallInfo *ci, const TValue *o) |
static const char * | getupvalname (CallInfo *ci, const TValue *o, const char **name) |
static const char * | varinfo (lua_State *L, const TValue *o) |
l_noret | luaG_typeerror (lua_State *L, const TValue *o, const char *op) |
l_noret | luaG_callerror (lua_State *L, const TValue *o) |
l_noret | luaG_forerror (lua_State *L, const TValue *o, const char *what) |
l_noret | luaG_concaterror (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) |
l_noret | luaG_tointerror (lua_State *L, const TValue *p1, const TValue *p2) |
l_noret | luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2) |
const char * | luaG_addinfo (lua_State *L, const char *msg, TString *src, int line) |
l_noret | luaG_errormsg (lua_State *L) |
l_noret | luaG_runerror (lua_State *L, const char *fmt,...) |
static int | changedline (const Proto *p, int oldpc, int newpc) |
int | luaG_traceexec (lua_State *L, const Instruction *pc) |
#define ldebug_c |
Definition at line 7 of file lua-5.4.3/src/ldebug.c.
#define LUA_CORE |
Definition at line 8 of file lua-5.4.3/src/ldebug.c.
Definition at line 34 of file lua-5.4.3/src/ldebug.c.
Referenced by auxgetinfo(), collectvalidlines(), and funcinfo().
|
static |
Definition at line 326 of file lua-5.4.3/src/ldebug.c.
References Closure::c, CallInfo::callstatus, CIST_TAIL, CIST_TRAN, lua_Debug::currentline, CallInfo::ftransfer, lua_Debug::ftransfer, funcinfo(), getcurrentline(), getfuncname(), Proto::is_vararg, isLua, lua_Debug::istailcall, lua_Debug::isvararg, Closure::l, lua_Debug::name, lua_Debug::namewhat, noLuaClosure, lua_Debug::nparams, CallInfo::ntransfer, lua_Debug::ntransfer, NULL, Proto::numparams, lua_Debug::nups, LClosure::p, CallInfo::transferinfo, and CallInfo::u2.
Referenced by lua_getinfo().
|
static |
Definition at line 800 of file lua-5.4.3/src/ldebug.c.
References ABSLINEINFO, Proto::lineinfo, luaG_getfuncline(), MAXIWTHABS, and NULL.
Referenced by luaG_traceexec().
Definition at line 290 of file lua-5.4.3/src/ldebug.c.
References api_incr_top, currentline(), Closure::l, Proto::linedefined, luaH_new(), luaH_setint(), nextline(), noLuaClosure, LClosure::p, s2v, setbtvalue, sethvalue2s, setnilvalue, Proto::sizelineinfo, and lua_State::top.
Referenced by lua_getinfo().
|
static |
Definition at line 41 of file lua-5.4.3/src/ldebug.c.
References ci_func, isLua, CallInfo::l, lua_assert, pcRel, CallInfo::savedpc, and CallInfo::u.
Referenced by funcnamefromcode(), getcurrentline(), luaG_findlocal(), and varinfo().
|
static |
Definition at line 454 of file lua-5.4.3/src/ldebug.c.
Referenced by findsetreg().
|
static |
Definition at line 464 of file lua-5.4.3/src/ldebug.c.
References Proto::code, filterpc(), GET_OPCODE, GETARG_A, GETARG_B, GETARG_sJ, OP_CALL, OP_JMP, OP_LOADNIL, OP_TAILCALL, OP_TFORCALL, testAMode, and testMMMode.
Referenced by getobjname().
Definition at line 184 of file lua-5.4.3/src/ldebug.c.
References clLvalue, CallInfo::func, CallInfo::l, CallInfo::nextraargs, NULL, s2v, and CallInfo::u.
Referenced by luaG_findlocal().
Definition at line 256 of file lua-5.4.3/src/ldebug.c.
References getstr, Closure::l, Proto::lastlinedefined, lua_Debug::lastlinedefined, Proto::linedefined, lua_Debug::linedefined, LL, luaO_chunkid(), noLuaClosure, LClosure::p, lua_Debug::short_src, Proto::source, lua_Debug::source, lua_Debug::srclen, tsslen, and lua_Debug::what.
Referenced by auxgetinfo().
Definition at line 593 of file lua-5.4.3/src/ldebug.c.
References CallInfo::callstatus, cast, ci_func, CIST_HOOKED, Proto::code, currentpc(), G, GET_OPCODE, GETARG_A, GETARG_C, getobjname(), getstr, name, NULL, OP_BNOT, OP_CALL, OP_CLOSE, OP_CONCAT, OP_EQ, OP_GEI, OP_GETFIELD, OP_GETI, OP_GETTABLE, OP_GETTABUP, OP_GTI, OP_LE, OP_LEI, OP_LEN, OP_LT, OP_LTI, OP_MMBIN, OP_MMBINI, OP_MMBINK, OP_RETURN, OP_SELF, OP_SETFIELD, OP_SETI, OP_SETTABLE, OP_SETTABUP, OP_TAILCALL, OP_TFORCALL, OP_UNM, Proto::p, TM_BNOT, TM_CLOSE, TM_CONCAT, TM_EQ, TM_INDEX, TM_LE, TM_LEN, TM_LT, TM_NEWINDEX, TM_UNM, and tmname.
Referenced by getfuncname(), and luaG_callerror().
|
static |
Definition at line 60 of file lua-5.4.3/src/ldebug.c.
References Proto::abslineinfo, cast_uint, AbsLineInfo::line, Proto::linedefined, lua_assert, MAXIWTHABS, AbsLineInfo::pc, and Proto::sizeabslineinfo.
Referenced by luaG_getfuncline().
|
static |
Definition at line 98 of file lua-5.4.3/src/ldebug.c.
References ci_func, currentpc(), and luaG_getfuncline().
Referenced by auxgetinfo(), and luaG_runerror().
Definition at line 312 of file lua-5.4.3/src/ldebug.c.
References CallInfo::callstatus, CIST_FIN, CIST_TAIL, funcnamefromcode(), isLua, name, NULL, and CallInfo::previous.
Referenced by auxgetinfo().
|
static |
Definition at line 525 of file lua-5.4.3/src/ldebug.c.
References Proto::code, findsetreg(), GET_OPCODE, GETARG_A, GETARG_Ax, GETARG_B, GETARG_Bx, GETARG_C, getobjname(), gxf(), Proto::k, kname(), luaF_getlocalname(), name, NULL, OP_GETFIELD, OP_GETI, OP_GETTABLE, OP_GETTABUP, OP_GETUPVAL, OP_LOADK, OP_LOADKX, OP_MOVE, OP_SELF, rkname(), rname(), svalue, ttisstring, and upvalname().
Referenced by funcnamefromcode(), getobjname(), gxf(), rname(), and varinfo().
Definition at line 664 of file lua-5.4.3/src/ldebug.c.
References ci_func, name, NULL, LClosure::p, upvalname(), LClosure::upvals, and UpVal::v.
Referenced by varinfo().
|
static |
Definition at line 514 of file lua-5.4.3/src/ldebug.c.
References GETARG_B, getobjname(), LUA_ENV, name, and upvalname().
Referenced by getobjname().
Definition at line 649 of file lua-5.4.3/src/ldebug.c.
References CallInfo::func, s2v, and CallInfo::top.
Referenced by varinfo().
|
static |
Definition at line 426 of file lua-5.4.3/src/ldebug.c.
References Proto::k, name, svalue, and ttisstring.
Referenced by getobjname(), and rkname().
Definition at line 145 of file lua-5.4.3/src/ldebug.c.
References lua_State::hook.
Definition at line 155 of file lua-5.4.3/src/ldebug.c.
References lua_State::basehookcount.
Definition at line 382 of file lua-5.4.3/src/ldebug.c.
References api_check, api_incr_top, auxgetinfo(), clvalue, collectvalidlines(), CallInfo::func, lua_Debug::i_ci, lua_assert, lua_lock, lua_unlock, NULL, s2v, setobj2s, lua_State::top, ttisclosure, and ttisfunction.
Definition at line 220 of file lua-5.4.3/src/ldebug.c.
References api_incr_top, clLvalue, lua_Debug::i_ci, isLfunction, lua_lock, lua_unlock, luaF_getlocalname(), luaG_findlocal(), name, NULL, s2v, setobjs2s, and lua_State::top.
Definition at line 160 of file lua-5.4.3/src/ldebug.c.
References lua_State::base_ci, lua_State::ci, lua_Debug::i_ci, lua_lock, lua_unlock, and CallInfo::previous.
Definition at line 131 of file lua-5.4.3/src/ldebug.c.
References lua_State::basehookcount, cast_byte, lua_State::ci, lua_State::hook, lua_State::hookmask, mask, NULL, resethookcount, and settraps().
Definition at line 242 of file lua-5.4.3/src/ldebug.c.
References lua_Debug::i_ci, lua_lock, lua_unlock, luaG_findlocal(), name, NULL, setobjs2s, and lua_State::top.
Definition at line 753 of file lua-5.4.3/src/ldebug.c.
References getstr, LUA_IDSIZE, luaO_chunkid(), luaO_pushfstring(), and tsslen.
Referenced by luaG_runerror().
Definition at line 698 of file lua-5.4.3/src/ldebug.c.
References lua_State::ci, funcnamefromcode(), isLua, luaG_runerror(), luaG_typeerror(), luaT_objtypename(), name, and NULL.
Referenced by luaD_tryfuncTM().
Definition at line 717 of file lua-5.4.3/src/ldebug.c.
References cvt2str, luaG_typeerror(), and ttisstring.
Definition at line 765 of file lua-5.4.3/src/ldebug.c.
References lua_State::errfunc, lua_assert, LUA_ERRRUN, luaD_callnoyield(), luaD_throw(), restorestack, s2v, setobjs2s, lua_State::top, and ttisfunction.
Referenced by luaG_runerror().
Definition at line 196 of file lua-5.4.3/src/ldebug.c.
References lua_State::ci, ci_func, currentpc(), findvararg(), CallInfo::func, isLua, luaF_getlocalname(), name, CallInfo::next, NULL, and lua_State::top.
Referenced by checkclosemth(), lua_getlocal(), and lua_setlocal().
Definition at line 711 of file lua-5.4.3/src/ldebug.c.
References luaG_runerror(), and luaT_objtypename().
Referenced by forlimit(), and forprep().
int luaG_getfuncline | ( | const Proto * | f, |
int | pc ) |
Definition at line 83 of file lua-5.4.3/src/ldebug.c.
References ABSLINEINFO, getbaseline(), Proto::lineinfo, lua_assert, and NULL.
Referenced by changedline(), getcurrentline(), luaG_traceexec(), nextline(), and PrintCode().
Definition at line 723 of file lua-5.4.3/src/ldebug.c.
References luaG_typeerror(), and ttisnumber.
Definition at line 742 of file lua-5.4.3/src/ldebug.c.
References luaG_runerror(), and luaT_objtypename().
Definition at line 778 of file lua-5.4.3/src/ldebug.c.
References lua_State::ci, ci_func, getcurrentline(), isLua, luaC_checkGC, luaG_addinfo(), luaG_errormsg(), and luaO_pushvfstring().
Referenced by luaG_callerror(), luaG_forerror(), luaG_ordererror(), luaG_tointerror(), and luaG_typeerror().
Definition at line 734 of file lua-5.4.3/src/ldebug.c.
References LUA_FLOORN2I, luaG_runerror(), luaV_tointegerns(), and varinfo().
int luaG_traceexec | ( | lua_State * | L, |
const Instruction * | pc ) |
Definition at line 833 of file lua-5.4.3/src/ldebug.c.
References CallInfo::callstatus, changedline(), lua_State::ci, ci_func, CIST_HOOKYIELD, lua_State::hookcount, lua_State::hookmask, isIT, CallInfo::l, LUA_HOOKCOUNT, LUA_HOOKLINE, LUA_MASKCOUNT, LUA_MASKLINE, LUA_YIELD, luaD_hook(), luaD_throw(), luaG_getfuncline(), mask, lua_State::oldpc, Proto::p, pcRel, resethookcount, CallInfo::savedpc, Proto::sizecode, lua_State::status, CallInfo::top, lua_State::top, CallInfo::trap, and CallInfo::u.
Definition at line 692 of file lua-5.4.3/src/ldebug.c.
References luaG_runerror(), luaT_objtypename(), and varinfo().
Referenced by luaG_callerror(), luaG_concaterror(), and luaG_opinterror().
|
static |
Definition at line 282 of file lua-5.4.3/src/ldebug.c.
References ABSLINEINFO, currentline(), Proto::lineinfo, and luaG_getfuncline().
Referenced by collectvalidlines().
|
static |
Definition at line 445 of file lua-5.4.3/src/ldebug.c.
References GETARG_C, GETARG_k, kname(), name, and rname().
Referenced by getobjname().
|
static |
Definition at line 435 of file lua-5.4.3/src/ldebug.c.
References getobjname(), and name.
Referenced by getobjname(), and rkname().
|
static |
Definition at line 114 of file lua-5.4.3/src/ldebug.c.
References isLua, CallInfo::l, NULL, CallInfo::previous, CallInfo::trap, and CallInfo::u.
Referenced by lua_sethook().
|
static |
Definition at line 177 of file lua-5.4.3/src/ldebug.c.
References check_exp, getstr, NULL, s, and Proto::upvalues.
Referenced by getobjname(), getupvalname(), and gxf().
Definition at line 678 of file lua-5.4.3/src/ldebug.c.
References cast, cast_int, lua_State::ci, ci_func, currentpc(), CallInfo::func, getobjname(), getupvalname(), isinstack(), isLua, luaO_pushfstring(), name, and NULL.
Referenced by luaG_tointerror(), and luaG_typeerror().