Github User Fetcher 1.0.0
C Application with Server and GUI
|
#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 | 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) |
static void | addinfo (lua_State *L, const char *msg) |
void | luaG_errormsg (lua_State *L) |
void | luaG_runerror (lua_State *L, const char *fmt,...) |
#define check | ( | x | ) | if (!(x)) return 0; |
Definition at line 268 of file lua-5.1.5/src/ldebug.c.
Referenced by checkArgMode(), checknext(), checknext(), checknext(), checknext(), luaG_checkopenop(), luaY_parser(), mainfunc(), mainfunc(), mainfunc(), precheck(), str_checkname(), str_checkname(), str_checkname(), str_checkname(), and symbexec().
#define checkjump | ( | pt, | |
pc ) check(0 <= pc && pc < pt->sizecode) |
Definition at line 270 of file lua-5.1.5/src/ldebug.c.
#define checkopenop | ( | pt, | |
pc ) luaG_checkopenop((pt)->code[(pc)+1]) |
Definition at line 288 of file lua-5.1.5/src/ldebug.c.
Referenced by symbexec().
#define checkreg | ( | pt, | |
reg ) check((reg) < (pt)->maxstacksize) |
Definition at line 272 of file lua-5.1.5/src/ldebug.c.
Referenced by checkArgMode(), and symbexec().
#define ldebug_c |
Definition at line 13 of file lua-5.1.5/src/ldebug.c.
#define LUA_CORE |
Definition at line 14 of file lua-5.1.5/src/ldebug.c.
|
static |
Definition at line 607 of file lua-5.1.5/src/ldebug.c.
References lua_State::ci, currentline(), getluaproto(), getstr, isLua, LUA_IDSIZE, luaO_chunkid(), and luaO_pushfstring().
Referenced by luaG_runerror().
|
static |
Definition at line 193 of file lua-5.1.5/src/ldebug.c.
References Closure::c, currentline(), lua_Debug::currentline, funcinfo(), getfuncname(), info_tailcall(), lua_Debug::name, lua_Debug::namewhat, NULL, and lua_Debug::nups.
Referenced by lua_getinfo().
Definition at line 304 of file lua-5.1.5/src/ldebug.c.
References check, checkreg, INDEXK, ISK, Proto::maxstacksize, OpArgK, OpArgN, OpArgR, OpArgU, and Proto::sizek.
Referenced by symbexec().
Definition at line 177 of file lua-5.1.5/src/ldebug.c.
References Closure::c, incr_top, Closure::l, Proto::lineinfo, luaH_new(), luaH_setnum(), NULL, LClosure::p, setbvalue, sethvalue, setnilvalue, Proto::sizelineinfo, and lua_State::top.
Referenced by lua_getinfo().
Definition at line 44 of file lua-5.1.5/src/ldebug.c.
References ci_func, currentpc(), and getline.
Referenced by addinfo(), auxgetinfo(), collectvalidlines(), and nextline().
Definition at line 36 of file lua-5.1.5/src/ldebug.c.
References lua_State::ci, ci_func, isLua, pcRel, CallInfo::savedpc, and lua_State::savedpc.
Referenced by currentline(), findlocal(), getfuncname(), and getobjname().
Definition at line 112 of file lua-5.1.5/src/ldebug.c.
References CallInfo::base, lua_State::ci, currentpc(), getluaproto(), luaF_getlocalname(), name, NULL, and lua_State::top.
Referenced by lua_getlocal(), and lua_setlocal().
Definition at line 150 of file lua-5.1.5/src/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 544 of file lua-5.1.5/src/ldebug.c.
References ci_func, currentpc(), GET_OPCODE, GETARG_A, getobjname(), isLua, CallInfo::l, name, NULL, OP_CALL, OP_TAILCALL, OP_TFORLOOP, and CallInfo::tailcalls.
Referenced by auxgetinfo().
Definition at line 107 of file lua-5.1.5/src/ldebug.c.
References ci_func, isLua, and NULL.
Referenced by addinfo(), and findlocal().
|
static |
Definition at line 497 of file lua-5.1.5/src/ldebug.c.
References ci_func, currentpc(), GET_OPCODE, GETARG_A, GETARG_B, GETARG_Bx, GETARG_C, getobjname(), getstr, isLua, Proto::k, kname(), lua_assert, luaF_getlocalname(), name, NULL, OP_GETGLOBAL, OP_GETTABLE, OP_GETUPVAL, OP_MOVE, OP_SELF, Proto::p, svalue, symbexec(), ttisstring, and Proto::upvalues.
Referenced by getfuncname(), getobjname(), and luaG_typeerror().
|
static |
Definition at line 167 of file lua-5.1.5/src/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().
Definition at line 559 of file lua-5.1.5/src/ldebug.c.
References CallInfo::base, and CallInfo::top.
Referenced by luaG_typeerror().
|
static |
Definition at line 489 of file lua-5.1.5/src/ldebug.c.
References INDEXK, ISK, Proto::k, svalue, and ttisstring.
Referenced by getobjname().
Definition at line 69 of file lua-5.1.5/src/ldebug.c.
References lua_State::hook.
Referenced by db_gethook(), db_gethook(), db_gethook(), and db_gethook().
Definition at line 79 of file lua-5.1.5/src/ldebug.c.
References lua_State::basehookcount.
Referenced by db_gethook(), db_gethook(), db_gethook(), and db_gethook().
Definition at line 74 of file lua-5.1.5/src/ldebug.c.
References lua_State::hookmask.
Referenced by db_gethook(), db_gethook(), db_gethook(), and db_gethook().
Definition at line 232 of file lua-5.1.5/src/ldebug.c.
References auxgetinfo(), lua_State::base_ci, clvalue, collectvalidlines(), CallInfo::func, lua_Debug::i_ci, incr_top, lua_assert, lua_lock, lua_unlock, luai_apicheck, NULL, setclvalue, setnilvalue, lua_State::top, and ttisfunction.
Referenced by checkupval(), db_errorfb(), db_getinfo(), db_getinfo(), db_getinfo(), db_getinfo(), getfunc(), hookf(), hookf(), hookf(), hookf(), luaL_argerror(), luaL_argerror(), luaL_traceback(), luaL_where(), pushglobalfuncname(), pushglobalfuncname(), pushglobalfuncname(), and setfenv().
Definition at line 127 of file lua-5.1.5/src/ldebug.c.
References CallInfo::base, lua_State::base_ci, findlocal(), lua_Debug::i_ci, lua_lock, lua_unlock, luaA_pushobject(), and name.
Referenced by db_getlocal(), db_getlocal(), db_getlocal(), and db_getlocal().
Definition at line 84 of file lua-5.1.5/src/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 auxstatus(), costatus(), countlevels(), db_errorfb(), db_getinfo(), db_getinfo(), db_getinfo(), db_getinfo(), db_getlocal(), db_getlocal(), db_getlocal(), db_getlocal(), db_setlocal(), db_setlocal(), db_setlocal(), db_setlocal(), getfunc(), lastlevel(), lastlevel(), luaB_costatus(), luaB_costatus(), luaL_argerror(), luaL_argerror(), luaL_traceback(), luaL_where(), and setfenv().
Definition at line 56 of file lua-5.1.5/src/ldebug.c.
References lua_State::basehookcount, cast_byte, lua_State::hook, lua_State::hookmask, mask, NULL, and resethookcount.
Referenced by db_sethook(), db_sethook(), db_sethook(), db_sethook(), laction(), laction(), laction(), laction(), lstop(), lstop(), lstop(), and lstop().
Definition at line 138 of file lua-5.1.5/src/ldebug.c.
References CallInfo::base, lua_State::base_ci, findlocal(), lua_Debug::i_ci, lua_lock, lua_unlock, name, setobjs2s, and lua_State::top.
Referenced by db_setlocal(), db_setlocal(), db_setlocal(), and db_setlocal().
Definition at line 588 of file lua-5.1.5/src/ldebug.c.
References luaG_typeerror(), luaV_tonumber(), and NULL.
Referenced by Arith(), and luaV_arith().
int luaG_checkcode | ( | const Proto * | pt | ) |
Definition at line 484 of file lua-5.1.5/src/ldebug.c.
References NO_REG, Proto::sizecode, and symbexec().
Referenced by close_func(), and LoadFunction().
int luaG_checkopenop | ( | Instruction | i | ) |
Definition at line 290 of file lua-5.1.5/src/ldebug.c.
References check, GET_OPCODE, GETARG_B, OP_CALL, OP_RETURN, OP_SETLIST, and OP_TAILCALL.
Referenced by luaV_execute().
Definition at line 581 of file lua-5.1.5/src/ldebug.c.
References lua_assert, luaG_typeerror(), ttisnumber, and ttisstring.
Referenced by luaT_trybinTM(), luaT_tryconcatTM(), luaV_concat(), and luaV_concat().
void luaG_errormsg | ( | lua_State * | L | ) |
Definition at line 618 of file lua-5.1.5/src/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().
Definition at line 596 of file lua-5.1.5/src/ldebug.c.
References luaG_runerror(), luaT_typenames, and ttype.
Referenced by lessequal(), luaT_callorderTM(), luaV_lessequal(), and luaV_lessthan().
void luaG_runerror | ( | lua_State * | L, |
const char * | fmt, | ||
... ) |
Definition at line 631 of file lua-5.1.5/src/ldebug.c.
References addinfo(), luaG_errormsg(), and luaO_pushvfstring().
Referenced by checkclosemth(), findindex(), findindex(), findindex(), findindex(), forprep(), growCI(), lua_pushnumber(), lua_replace(), lua_yield(), lua_yieldk(), lua_yieldk(), luaD_call(), luaD_call(), luaD_growstack(), luaD_growstack(), luaE_checkcstack(), luaG_ordererror(), luaG_typeerror(), luaH_newkey(), luaH_newkey(), luaH_set(), luaM_growaux_(), luaM_growaux_(), luaM_growaux_(), luaM_toobig(), luaO_pushvfstring(), luaV_concat(), luaV_concat(), luaV_div(), luaV_execute(), luaV_execute(), luaV_finishget(), luaV_finishset(), luaV_finishset(), luaV_gettable(), luaV_idiv(), luaV_mod(), luaV_settable(), setnodevector(), setnodevector(), setnodevector(), setnodevector(), and stackerror().
Definition at line 567 of file lua-5.1.5/src/ldebug.c.
References lua_State::base, cast_int, lua_State::ci, getobjname(), isinstack(), LUA_QS, luaG_runerror(), luaT_typenames, name, NULL, and ttype.
Referenced by luaG_aritherror(), luaG_concaterror(), luaV_execute(), luaV_finishget(), luaV_finishset(), luaV_finishset(), luaV_gettable(), luaV_objlen(), luaV_settable(), tryfuncTM(), tryfuncTM(), and tryfuncTM().
|
static |
Definition at line 276 of file lua-5.1.5/src/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 |
Definition at line 317 of file lua-5.1.5/src/ldebug.c.
References check, checkArgMode(), checkopenop, checkreg, Proto::code, 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().