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 | 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 = (L->ci->next ? L->ci->next : luaE_extendCI(L))) |
#define | checkstackp(L, n, p) |
Functions | |
static void | 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, TValue *oldstack) |
void | luaD_reallocstack (lua_State *L, int newsize) |
void | luaD_growstack (lua_State *L, int n) |
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) |
static void | callhook (lua_State *L, CallInfo *ci) |
static StkId | adjust_varargs (lua_State *L, Proto *p, int actual) |
static void | tryfuncTM (lua_State *L, StkId func) |
static int | moveresults (lua_State *L, const TValue *firstResult, StkId res, int nres, int wanted) |
int | luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) |
int | luaD_precall (lua_State *L, StkId func, int nresults) |
static void | stackerror (lua_State *L) |
void | luaD_call (lua_State *L, StkId func, int nResults) |
void | luaD_callnoyield (lua_State *L, StkId func, int nResults) |
static void | finishCcall (lua_State *L, int status) |
static void | unroll (lua_State *L, void *ud) |
static CallInfo * | findpcall (lua_State *L) |
static int | recover (lua_State *L, int status) |
static int | resume_error (lua_State *L, const char *msg, int narg) |
static void | resume (lua_State *L, void *ud) |
LUA_API int | lua_resume (lua_State *L, lua_State *from, int nargs) |
LUA_API int | lua_isyieldable (lua_State *L) |
LUA_API int | lua_yieldk (lua_State *L, int nresults, lua_KContext ctx, lua_KFunction k) |
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 checkstackp | ( | L, | |
n, | |||
p ) |
Definition at line 399 of file lua-5.3.6/src/ldo.c.
Referenced by luaD_precall().
#define ERRORSTACKSIZE (LUAI_MAXSTACK + 200) |
Definition at line 174 of file lua-5.3.6/src/ldo.c.
Referenced by luaD_growstack(), and luaD_reallocstack().
Definition at line 38 of file lua-5.3.6/src/ldo.c.
Referenced by lua_resume().
#define ldo_c |
Definition at line 7 of file lua-5.3.6/src/ldo.c.
#define LUA_CORE |
Definition at line 8 of file lua-5.3.6/src/ldo.c.
#define luai_jmpbuf jmp_buf |
Definition at line 75 of file lua-5.3.6/src/ldo.c.
#define LUAI_THROW | ( | L, | |
c ) longjmp((c)->b, 1) |
Definition at line 73 of file lua-5.3.6/src/ldo.c.
Referenced by luaD_throw().
Definition at line 74 of file lua-5.3.6/src/ldo.c.
Referenced by luaD_rawrunprotected().
#define next_ci | ( | L | ) | (L->ci = (L->ci->next ? L->ci->next : luaE_extendCI(L))) |
Definition at line 395 of file lua-5.3.6/src/ldo.c.
Referenced by luaD_precall().
Definition at line 293 of file lua-5.3.6/src/ldo.c.
References Proto::numparams, setnilvalue, setobjs2s, and lua_State::top.
Referenced by luaD_precall().
Definition at line 280 of file lua-5.3.6/src/ldo.c.
References CallInfo::callstatus, CIST_TAIL, GET_OPCODE, isLua, CallInfo::l, LUA_HOOKCALL, LUA_HOOKTAILCALL, luaD_hook(), OP_TAILCALL, CallInfo::previous, CallInfo::savedpc, and CallInfo::u.
Referenced by luaD_precall().
|
static |
Definition at line 757 of file lua-5.3.6/src/ldo.c.
References LUA_ERRSYNTAX, luaD_throw(), luaO_pushfstring(), and NULL.
Referenced by f_parser().
Definition at line 158 of file lua-5.3.6/src/ldo.c.
References CallInfo::base, lua_State::ci, CallInfo::func, isLua, CallInfo::l, UpVal::next, NULL, UpVal::open, lua_State::openupval, CallInfo::previous, lua_State::stack, CallInfo::top, lua_State::top, UpVal::u, CallInfo::u, and UpVal::v.
Referenced by luaD_reallocstack().
|
static |
Definition at line 766 of file lua-5.3.6/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 566 of file lua-5.3.6/src/ldo.c.
References CallInfo::callstatus, lua_State::ci, CIST_YPCALL, NULL, and CallInfo::previous.
Referenced by recover().
|
static |
Definition at line 518 of file lua-5.3.6/src/ldo.c.
References adjustresults, api_checknelems, CallInfo::c, CallInfo::callstatus, lua_State::ci, CIST_YPCALL, CallInfo::ctx, lua_State::errfunc, CallInfo::k, lua_assert, lua_lock, lua_unlock, LUA_YIELD, luaD_poscall(), lua_State::nny, CallInfo::nresults, NULL, CallInfo::old_errfunc, lua_longjmp::status, lua_State::top, and CallInfo::u.
Referenced by unroll().
Definition at line 687 of file lua-5.3.6/src/ldo.c.
References lua_State::nny.
Referenced by luaB_yieldable(), and luaB_yieldable().
Definition at line 648 of file lua-5.3.6/src/ldo.c.
References api_checknelems, lua_State::base_ci, cast_byte, lua_State::ci, errorstatus, lua_assert, LUA_ERRRUN, lua_lock, LUA_OK, lua_unlock, LUA_YIELD, luaD_rawrunprotected(), LUAI_MAXCCALLS, luai_userstateresume, lua_State::nCcalls, lua_State::nny, recover(), resume(), resume_error(), seterrorobj(), lua_longjmp::status, lua_State::status, CallInfo::top, lua_State::top, and unroll().
LUA_API int lua_yieldk | ( | lua_State * | L, |
int | nresults, | ||
lua_KContext | ctx, | ||
lua_KFunction | k ) |
Definition at line 692 of file lua-5.3.6/src/ldo.c.
References api_check, api_checknelems, CallInfo::c, CallInfo::callstatus, lua_State::ci, CIST_HOOKED, CallInfo::ctx, CallInfo::extra, CallInfo::func, G, isLua, CallInfo::k, lua_assert, lua_lock, lua_unlock, LUA_YIELD, luaD_throw(), luaG_runerror(), luai_userstateyield, lua_State::nny, NULL, savestack, lua_State::status, lua_State::top, and CallInfo::u.
Definition at line 495 of file lua-5.3.6/src/ldo.c.
References luaD_precall(), LUAI_MAXCCALLS, luaV_execute(), lua_State::nCcalls, and stackerror().
Referenced by luaD_callnoyield().
Definition at line 507 of file lua-5.3.6/src/ldo.c.
References luaD_call(), and lua_State::nny.
Referenced by callclosemethod(), dothecall(), dothecall(), f_call(), f_call(), lua_callk(), luaG_errormsg(), luaT_callTM(), luaT_callTM(), and luaT_callTMres().
void luaD_growstack | ( | lua_State * | L, |
int | n ) |
Definition at line 191 of file lua-5.3.6/src/ldo.c.
References cast_int, ERRORSTACKSIZE, EXTRA_STACK, LUA_ERRERR, luaD_reallocstack(), luaD_throw(), luaG_runerror(), LUAI_MAXSTACK, lua_State::stack, lua_State::stacksize, and lua_State::top.
void luaD_hook | ( | lua_State * | L, |
int | event, | ||
int | line ) |
Definition at line 253 of file lua-5.3.6/src/ldo.c.
References lua_State::allowhook, CallInfo::callstatus, lua_State::ci, CIST_HOOKED, lua_Debug::currentline, lua_Debug::event, lua_State::hook, lua_Debug::i_ci, lua_assert, lua_lock, LUA_MINSTACK, lua_unlock, luaD_checkstack, restorestack, savestack, lua_State::stack_last, CallInfo::top, and lua_State::top.
Referenced by callhook(), luaD_poscall(), and luaD_precall().
void luaD_inctop | ( | lua_State * | L | ) |
Definition at line 240 of file lua-5.3.6/src/ldo.c.
References luaD_checkstack, and lua_State::top.
Referenced by LoadString(), loadStringN(), luaO_pushvfstring(), luaU_undump(), luaY_parser(), and pushstr().
Definition at line 721 of file lua-5.3.6/src/ldo.c.
References lua_State::allowhook, lua_State::ci, lua_State::errfunc, LUA_OK, luaD_rawrunprotected(), luaD_shrinkstack(), luaF_close(), lua_State::nny, restorestack, seterrorobj(), and lua_longjmp::status.
Referenced by luaD_protectedparser().
Definition at line 376 of file lua-5.3.6/src/ldo.c.
References lua_State::ci, CallInfo::func, lua_State::hookmask, CallInfo::l, LUA_HOOKRET, LUA_MASKLINE, LUA_MASKRET, luaD_hook(), moveresults(), CallInfo::nresults, lua_State::oldpc, CallInfo::previous, restorestack, CallInfo::savedpc, savestack, and CallInfo::u.
Referenced by finishCcall(), luaD_precall(), and resume().
Definition at line 413 of file lua-5.3.6/src/ldo.c.
References adjust_varargs(), api_checknelems, CallInfo::base, callhook(), CallInfo::callstatus, cast_int, checkstackp, CIST_LUA, clCvalue, clLvalue, Proto::code, CallInfo::func, fvalue, lua_State::hookmask, Proto::is_vararg, CallInfo::l, lua_assert, LUA_HOOKCALL, lua_lock, LUA_MASKCALL, LUA_MINSTACK, LUA_TCCL, LUA_TLCF, LUA_TLCL, lua_unlock, luaD_hook(), luaD_poscall(), luaD_precall(), Proto::maxstacksize, next_ci, CallInfo::nresults, Proto::numparams, Proto::p, CallInfo::savedpc, setnilvalue, lua_State::stack_last, CallInfo::top, lua_State::top, tryfuncTM(), ttype, and CallInfo::u.
Referenced by luaD_call(), luaD_precall(), and resume().
Definition at line 783 of file lua-5.3.6/src/ldo.c.
References Dyndata::actvar, Labellist::arr, Dyndata::arr, SParser::buff, SParser::dyd, lua_State::errfunc, f_parser(), Dyndata::gt, Dyndata::label, luaD_pcall(), luaM_freearray, luaZ_freebuffer, luaZ_initbuffer, SParser::mode, name, SParser::name, lua_State::nny, NULL, savestack, Labellist::size, Dyndata::size, lua_State::top, and SParser::z.
Definition at line 136 of file lua-5.3.6/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(), and luaD_pcall().
void luaD_reallocstack | ( | lua_State * | L, |
int | newsize ) |
Definition at line 177 of file lua-5.3.6/src/ldo.c.
References correctstack(), ERRORSTACKSIZE, EXTRA_STACK, lua_assert, LUAI_MAXSTACK, luaM_reallocvector, setnilvalue, lua_State::stack, lua_State::stack_last, and lua_State::stacksize.
Referenced by luaD_growstack(), and luaD_shrinkstack().
void luaD_shrinkstack | ( | lua_State * | L | ) |
Definition at line 221 of file lua-5.3.6/src/ldo.c.
References condmovestack, EXTRA_STACK, luaD_reallocstack(), luaE_freeCI(), luaE_shrinkCI(), LUAI_MAXSTACK, stackinuse(), lua_State::stacksize, and stacksize.
Referenced by luaD_pcall(), and recover().
Definition at line 110 of file lua-5.3.6/src/ldo.c.
References cast_byte, lua_State::ci, lua_State::errorJmp, G, lua_unlock, luaD_throw(), LUAI_THROW, global_State::mainthread, global_State::panic, seterrorobj(), setobjs2s, lua_longjmp::status, lua_State::status, CallInfo::top, and lua_State::top.
Referenced by checkmode(), lua_yieldk(), luaD_growstack(), luaD_throw(), and stackerror().
|
static |
Definition at line 334 of file lua-5.3.6/src/ldo.c.
References LUA_MULTRET, luaO_nilobject, setnilvalue, setobjs2s, and lua_State::top.
Referenced by luaD_poscall().
|
static |
Definition at line 581 of file lua-5.3.6/src/ldo.c.
References lua_State::allowhook, CallInfo::c, CallInfo::callstatus, lua_State::ci, lua_State::errfunc, CallInfo::extra, findpcall(), getoah, luaD_shrinkstack(), luaF_close(), lua_State::nny, NULL, CallInfo::old_errfunc, restorestack, seterrorobj(), lua_longjmp::status, and CallInfo::u.
Referenced by lua_resume().
|
static |
Definition at line 619 of file lua-5.3.6/src/ldo.c.
References api_checknelems, CallInfo::c, cast, lua_State::ci, CallInfo::ctx, CallInfo::extra, CallInfo::func, isLua, CallInfo::k, lua_assert, lua_lock, LUA_MULTRET, LUA_OK, lua_unlock, LUA_YIELD, luaD_poscall(), luaD_precall(), luaV_execute(), NULL, restorestack, lua_State::status, lua_State::top, CallInfo::u, and unroll().
Referenced by lua_resume().
|
static |
Definition at line 603 of file lua-5.3.6/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 91 of file lua-5.3.6/src/ldo.c.
References G, LUA_ERRERR, LUA_ERRMEM, luaS_newliteral, setobjs2s, setsvalue2s, and lua_State::top.
Referenced by lua_resume(), luaD_pcall(), luaD_throw(), and recover().
|
static |
Definition at line 481 of file lua-5.3.6/src/ldo.c.
References LUA_ERRERR, luaD_throw(), luaG_runerror(), LUAI_MAXCCALLS, and lua_State::nCcalls.
Referenced by luaD_call().
|
static |
Definition at line 210 of file lua-5.3.6/src/ldo.c.
References cast_int, lua_State::ci, lua_assert, NULL, CallInfo::previous, lua_State::stack, CallInfo::top, and lua_State::top.
Referenced by luaD_shrinkstack().
Definition at line 315 of file lua-5.3.6/src/ldo.c.
References luaG_typeerror(), luaT_gettmbyobj(), setobj2s, setobjs2s, TM_CALL, lua_State::top, and ttisfunction.
Referenced by luaD_precall().
|
static |
Definition at line 548 of file lua-5.3.6/src/ldo.c.
References lua_State::base_ci, lua_State::ci, finishCcall(), isLua, LUA_YIELD, luaV_execute(), luaV_finishOp(), and NULL.
Referenced by lua_resume(), and resume().