Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <setjmp.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lapi.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lopcodes.h"
#include "lparser.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
#include "lundump.h"
#include "lvm.h"
#include "lzio.h"
Go to the source code of this file.
Data Structures | |
struct | lua_longjmp |
struct | CloseP |
struct | SParser |
Macros | |
#define | ldo_c |
#define | LUA_CORE |
#define | errorstatus(s) ((s) > LUA_YIELD) |
#define | LUAI_THROW(L, c) longjmp((c)->b, 1) |
#define | LUAI_TRY(L, c, a) if (setjmp((c)->b) == 0) { a } |
#define | luai_jmpbuf jmp_buf |
#define | ERRORSTACKSIZE (LUAI_MAXSTACK + 200) |
#define | next_ci(L) (L->ci->next ? L->ci->next : luaE_extendCI(L)) |
Functions | |
void | luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) |
l_noret | luaD_throw (lua_State *L, int errcode) |
int | luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) |
static void | correctstack (lua_State *L, StkId oldstack, StkId newstack) |
int | luaD_reallocstack (lua_State *L, int newsize, int raiseerror) |
int | luaD_growstack (lua_State *L, int n, int raiseerror) |
static int | stackinuse (lua_State *L) |
void | luaD_shrinkstack (lua_State *L) |
void | luaD_inctop (lua_State *L) |
void | luaD_hook (lua_State *L, int event, int line, int ftransfer, int ntransfer) |
void | luaD_hookcall (lua_State *L, CallInfo *ci) |
static void | rethook (lua_State *L, CallInfo *ci, int nres) |
void | luaD_tryfuncTM (lua_State *L, StkId func) |
static void | moveresults (lua_State *L, StkId res, int nres, int wanted) |
void | luaD_poscall (lua_State *L, CallInfo *ci, int nres) |
void | luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func, int narg1) |
CallInfo * | luaD_precall (lua_State *L, StkId func, int nresults) |
static void | ccall (lua_State *L, StkId func, int nResults, int inc) |
void | luaD_call (lua_State *L, StkId func, int nResults) |
void | luaD_callnoyield (lua_State *L, StkId func, int nResults) |
static int | finishpcallk (lua_State *L, CallInfo *ci) |
static void | finishCcall (lua_State *L, CallInfo *ci) |
static void | unroll (lua_State *L, void *ud) |
static CallInfo * | findpcall (lua_State *L) |
static int | resume_error (lua_State *L, const char *msg, int narg) |
static void | resume (lua_State *L, void *ud) |
static int | precover (lua_State *L, int status) |
LUA_API int | lua_resume (lua_State *L, lua_State *from, int nargs, int *nresults) |
LUA_API int | lua_isyieldable (lua_State *L) |
LUA_API int | lua_yieldk (lua_State *L, int nresults, lua_KContext ctx, lua_KFunction k) |
static void | closepaux (lua_State *L, void *ud) |
int | luaD_closeprotected (lua_State *L, ptrdiff_t level, int status) |
int | luaD_pcall (lua_State *L, Pfunc func, void *u, ptrdiff_t old_top, ptrdiff_t ef) |
static void | checkmode (lua_State *L, const char *mode, const char *x) |
static void | f_parser (lua_State *L, void *ud) |
int | luaD_protectedparser (lua_State *L, ZIO *z, const char *name, const char *mode) |
#define ERRORSTACKSIZE (LUAI_MAXSTACK + 200) |
Definition at line 177 of file lua-5.4.3/src/ldo.c.
Referenced by luaD_growstack(), and luaD_reallocstack().
Definition at line 38 of file lua-5.4.3/src/ldo.c.
Referenced by lua_resume(), luaD_seterrorobj(), and precover().
#define ldo_c |
Definition at line 7 of file lua-5.4.3/src/ldo.c.
#define LUA_CORE |
Definition at line 8 of file lua-5.4.3/src/ldo.c.
#define luai_jmpbuf jmp_buf |
Definition at line 75 of file lua-5.4.3/src/ldo.c.
#define LUAI_THROW | ( | L, | |
c ) longjmp((c)->b, 1) |
Definition at line 73 of file lua-5.4.3/src/ldo.c.
Referenced by luaD_throw().
Definition at line 74 of file lua-5.4.3/src/ldo.c.
Referenced by luaD_rawrunprotected().
#define next_ci | ( | L | ) | (L->ci->next ? L->ci->next : luaE_extendCI(L)) |
Definition at line 473 of file lua-5.4.3/src/ldo.c.
Referenced by luaD_precall().
Definition at line 570 of file lua-5.4.3/src/ldo.c.
References CallInfo::callstatus, CIST_FRESH, getCcalls, luaD_precall(), luaE_checkcstack(), LUAI_MAXCCALLS, luaV_execute(), lua_State::nCcalls, and NULL.
Referenced by luaD_call(), luaD_callnoyield(), and resume().
|
static |
Definition at line 918 of file lua-5.4.3/src/ldo.c.
References LUA_ERRSYNTAX, luaD_throw(), luaO_pushfstring(), and NULL.
Referenced by f_parser().
|
static |
Definition at line 853 of file lua-5.4.3/src/ldo.c.
References cast, CloseP::level, luaF_close(), and CloseP::status.
Referenced by luaD_closeprotected().
Definition at line 160 of file lua-5.4.3/src/ldo.c.
References lua_State::ci, CallInfo::func, isLua, CallInfo::l, UpVal::next, NULL, UpVal::open, lua_State::openupval, CallInfo::previous, s2v, lua_State::tbclist, CallInfo::top, lua_State::top, CallInfo::trap, UpVal::u, CallInfo::u, uplevel, and UpVal::v.
Referenced by luaD_reallocstack().
|
static |
Definition at line 927 of file lua-5.4.3/src/ldo.c.
References SParser::buff, cast, checkmode(), SParser::dyd, lua_assert, LUA_SIGNATURE, luaF_initupvals(), luaU_undump(), luaY_parser(), SParser::mode, SParser::name, LClosure::p, Proto::sizeupvalues, SParser::z, and zgetc.
Referenced by luaD_protectedparser().
Definition at line 695 of file lua-5.4.3/src/ldo.c.
References CallInfo::callstatus, lua_State::ci, CIST_YPCALL, NULL, and CallInfo::previous.
Referenced by precover().
Definition at line 649 of file lua-5.4.3/src/ldo.c.
References adjustresults, api_checknelems, CallInfo::c, CallInfo::callstatus, CIST_CLSRET, CIST_YPCALL, CallInfo::ctx, finishpcallk(), hastocloseCfunc, CallInfo::k, lua_assert, lua_lock, LUA_MULTRET, lua_unlock, LUA_YIELD, luaD_poscall(), CallInfo::nres, CallInfo::nresults, NULL, lua_longjmp::status, CallInfo::u, CallInfo::u2, and yieldable.
Referenced by unroll().
Definition at line 615 of file lua-5.4.3/src/ldo.c.
References lua_State::allowhook, CallInfo::c, CallInfo::callstatus, lua_State::errfunc, CallInfo::funcidx, getcistrecst, getoah, LUA_OK, LUA_YIELD, luaD_seterrorobj(), luaD_shrinkstack(), luaF_close(), CallInfo::old_errfunc, restorestack, setcistrecst, lua_longjmp::status, CallInfo::u, and CallInfo::u2.
Referenced by finishCcall().
Definition at line 805 of file lua-5.4.3/src/ldo.c.
References yieldable.
Definition at line 773 of file lua-5.4.3/src/ldo.c.
References api_checknelems, lua_State::base_ci, cast_byte, cast_int, lua_State::ci, errorstatus, CallInfo::func, getCcalls, lua_assert, lua_lock, LUA_OK, lua_unlock, LUA_YIELD, luaD_rawrunprotected(), luaD_seterrorobj(), luai_userstateresume, lua_State::nCcalls, CallInfo::nyield, precover(), resume(), resume_error(), lua_longjmp::status, lua_State::status, CallInfo::top, lua_State::top, and CallInfo::u2.
LUA_API int lua_yieldk | ( | lua_State * | L, |
int | nresults, | ||
lua_KContext | ctx, | ||
lua_KFunction | k ) |
Definition at line 810 of file lua-5.4.3/src/ldo.c.
References api_check, api_checknelems, CallInfo::c, CallInfo::callstatus, lua_State::ci, CIST_HOOKED, CallInfo::ctx, G, isLua, isLuacode, CallInfo::k, lua_assert, lua_lock, lua_unlock, LUA_YIELD, luaD_throw(), luaG_runerror(), luai_userstateyield, NULL, CallInfo::nyield, lua_State::status, CallInfo::u, CallInfo::u2, and yieldable.
Definition at line 586 of file lua-5.4.3/src/ldo.c.
References ccall().
Definition at line 594 of file lua-5.4.3/src/ldo.c.
int luaD_closeprotected | ( | lua_State * | L, |
ptrdiff_t | level, | ||
int | status ) |
Definition at line 863 of file lua-5.4.3/src/ldo.c.
References lua_State::allowhook, lua_State::ci, closepaux(), CloseP::level, LUA_OK, luaD_rawrunprotected(), restorestack, and CloseP::status.
Referenced by close_state(), luaD_pcall(), and luaE_resetthread().
int luaD_growstack | ( | lua_State * | L, |
int | n, | ||
int | raiseerror ) |
Definition at line 219 of file lua-5.4.3/src/ldo.c.
References cast_int, ERRORSTACKSIZE, lua_assert, LUA_ERRERR, luaD_reallocstack(), luaD_throw(), luaG_runerror(), LUAI_MAXSTACK, lua_State::stack, stacksize, and lua_State::top.
void luaD_hook | ( | lua_State * | L, |
int | event, | ||
int | line, | ||
int | ftransfer, | ||
int | ntransfer ) |
Definition at line 306 of file lua-5.4.3/src/ldo.c.
References lua_State::allowhook, CallInfo::callstatus, lua_State::ci, CIST_HOOKED, CIST_TRAN, lua_Debug::currentline, lua_Debug::event, CallInfo::ftransfer, lua_State::hook, lua_Debug::i_ci, isLua, lua_assert, lua_lock, LUA_MINSTACK, lua_unlock, luaD_checkstack, mask, CallInfo::ntransfer, restorestack, savestack, CallInfo::top, lua_State::top, CallInfo::transferinfo, and CallInfo::u2.
Referenced by luaD_hookcall(), luaD_precall(), and rethook().
Definition at line 347 of file lua-5.4.3/src/ldo.c.
References CallInfo::callstatus, ci_func, CIST_TAIL, lua_State::hookmask, CallInfo::l, LUA_HOOKCALL, LUA_HOOKTAILCALL, LUA_MASKCALL, luaD_hook(), Proto::numparams, lua_State::oldpc, Proto::p, CallInfo::savedpc, and CallInfo::u.
Referenced by luaV_execute().
void luaD_inctop | ( | lua_State * | L | ) |
Definition at line 293 of file lua-5.4.3/src/ldo.c.
References luaD_checkstack, and lua_State::top.
Definition at line 885 of file lua-5.4.3/src/ldo.c.
References lua_State::allowhook, lua_State::ci, lua_State::errfunc, LUA_OK, luaD_closeprotected(), luaD_rawrunprotected(), luaD_seterrorobj(), luaD_shrinkstack(), restorestack, and CloseP::status.
Referenced by luaD_protectedparser().
Definition at line 459 of file lua-5.4.3/src/ldo.c.
References CallInfo::callstatus, lua_State::ci, CIST_CLSRET, CIST_FIN, CIST_HOOKED, CIST_TRAN, CIST_YPCALL, CallInfo::func, hastocloseCfunc, lua_State::hookmask, lua_assert, moveresults(), CallInfo::nresults, CallInfo::previous, and rethook().
Referenced by finishCcall(), luaD_precall(), and resume().
Definition at line 508 of file lua-5.4.3/src/ldo.c.
References api_checknelems, CallInfo::callstatus, cast_int, checkstackGCp, lua_State::ci, CIST_C, clCvalue, clLvalue, Proto::code, CallInfo::func, fvalue, lua_State::hookmask, CallInfo::l, lua_assert, LUA_HOOKCALL, lua_lock, LUA_MASKCALL, LUA_MINSTACK, lua_unlock, LUA_VCCL, LUA_VLCF, LUA_VLCL, luaD_hook(), luaD_poscall(), luaD_tryfuncTM(), Proto::maxstacksize, next_ci, CallInfo::nresults, NULL, Proto::numparams, Proto::p, s2v, CallInfo::savedpc, setnilvalue, lua_State::stack_last, CallInfo::top, lua_State::top, ttypetag, and CallInfo::u.
Referenced by ccall().
Definition at line 481 of file lua-5.4.3/src/ldo.c.
References CallInfo::callstatus, checkstackGC, CIST_TAIL, clLvalue, Proto::code, CallInfo::func, CallInfo::l, lua_assert, Proto::maxstacksize, Proto::numparams, Proto::p, s2v, CallInfo::savedpc, setnilvalue, setobjs2s, lua_State::stack_last, CallInfo::top, lua_State::top, and CallInfo::u.
Referenced by luaV_execute().
Definition at line 944 of file lua-5.4.3/src/ldo.c.
References Dyndata::actvar, Labellist::arr, Dyndata::arr, SParser::buff, decnny, SParser::dyd, lua_State::errfunc, f_parser(), Dyndata::gt, incnny, Dyndata::label, luaD_pcall(), luaM_freearray, luaZ_freebuffer, luaZ_initbuffer, SParser::mode, name, SParser::name, NULL, savestack, Labellist::size, Dyndata::size, lua_State::top, and SParser::z.
Definition at line 138 of file lua-5.4.3/src/ldo.c.
References lua_State::errorJmp, LUA_OK, LUAI_TRY, lua_State::nCcalls, lua_longjmp::previous, and lua_longjmp::status.
Referenced by lua_resume(), luaD_closeprotected(), luaD_pcall(), and precover().
int luaD_reallocstack | ( | lua_State * | L, |
int | newsize, | ||
int | raiseerror ) |
Definition at line 191 of file lua-5.4.3/src/ldo.c.
References correctstack(), ERRORSTACKSIZE, EXTRA_STACK, lua_assert, LUAI_MAXSTACK, luaM_error, luaM_freearray, luaM_reallocvector, NULL, s2v, setnilvalue, lua_State::stack, lua_State::stack_last, and stacksize.
Referenced by luaD_growstack(), and luaD_shrinkstack().
Definition at line 91 of file lua-5.4.3/src/ldo.c.
References errorstatus, G, lua_assert, LUA_ERRERR, LUA_ERRMEM, LUA_OK, luaS_newliteral, s2v, setnilvalue, setobjs2s, setsvalue2s, and lua_State::top.
Referenced by finishpcallk(), lua_resume(), and luaD_pcall().
void luaD_shrinkstack | ( | lua_State * | L | ) |
Definition at line 274 of file lua-5.4.3/src/ldo.c.
References condmovestack, luaD_reallocstack(), luaE_shrinkCI(), LUAI_MAXSTACK, stackinuse(), and stacksize.
Referenced by finishpcallk(), and luaD_pcall().
Definition at line 115 of file lua-5.4.3/src/ldo.c.
References lua_State::errorJmp, G, lua_unlock, luaD_throw(), luaE_resetthread(), LUAI_THROW, global_State::mainthread, global_State::panic, setobjs2s, lua_longjmp::status, and lua_State::top.
Referenced by checkmode(), lua_yieldk(), luaD_growstack(), and luaD_throw().
Definition at line 390 of file lua-5.4.3/src/ldo.c.
References luaG_callerror(), luaT_gettmbyobj(), s2v, setobj2s, setobjs2s, TM_CALL, lua_State::top, and ttisnil.
Referenced by luaD_precall(), and luaV_execute().
Definition at line 408 of file lua-5.4.3/src/ldo.c.
References CallInfo::callstatus, lua_State::ci, CIST_CLSRET, CLOSEKTOP, decodeNresults, hastocloseCfunc, lua_State::hookmask, LUA_MULTRET, luaF_close(), CallInfo::nres, restorestack, rethook(), s2v, savestack, setnilvalue, setobjs2s, lua_State::top, and CallInfo::u2.
Referenced by luaD_poscall().
|
static |
Definition at line 762 of file lua-5.4.3/src/ldo.c.
References lua_State::ci, errorstatus, findpcall(), luaD_rawrunprotected(), NULL, setcistrecst, lua_longjmp::status, and unroll().
Referenced by lua_resume().
|
static |
Definition at line 726 of file lua-5.4.3/src/ldo.c.
References api_checknelems, CallInfo::c, cast, ccall(), lua_State::ci, CallInfo::ctx, isLua, CallInfo::k, lua_assert, lua_lock, LUA_MULTRET, LUA_OK, lua_unlock, LUA_YIELD, luaD_poscall(), luaE_incCstack(), luaV_execute(), NULL, lua_State::status, lua_State::top, CallInfo::u, and unroll().
Referenced by lua_resume().
|
static |
Definition at line 710 of file lua-5.4.3/src/ldo.c.
References api_incr_top, LUA_ERRRUN, lua_unlock, luaS_new, setsvalue2s, and lua_State::top.
Referenced by lua_resume().
Definition at line 365 of file lua-5.4.3/src/ldo.c.
References cast, ci_func, CallInfo::func, lua_State::hookmask, Proto::is_vararg, isLua, CallInfo::l, LUA_HOOKRET, LUA_MASKRET, luaD_hook(), CallInfo::nextraargs, Proto::numparams, lua_State::oldpc, Proto::p, pcRel, CallInfo::previous, CallInfo::savedpc, lua_State::top, and CallInfo::u.
Referenced by luaD_poscall(), and moveresults().
|
static |
Definition at line 250 of file lua-5.4.3/src/ldo.c.
References cast_int, lua_State::ci, lua_assert, LUA_MINSTACK, NULL, CallInfo::previous, lua_State::stack, CallInfo::top, and lua_State::top.
Referenced by luaD_shrinkstack().
|
static |
Definition at line 677 of file lua-5.4.3/src/ldo.c.
References lua_State::base_ci, lua_State::ci, finishCcall(), isLua, luaV_execute(), luaV_finishOp(), and UNUSED.
Referenced by precover(), and resume().