Github User Fetcher 1.0.0
C Application with Server and GUI
|
#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 | 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))) |
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_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 StkId | tryfuncTM (lua_State *L, StkId func) |
int | luaD_precall (lua_State *L, StkId func, int nresults) |
int | luaD_poscall (lua_State *L, StkId firstResult) |
void | luaD_call (lua_State *L, StkId func, int nResults, int allowyield) |
static void | finishCcall (lua_State *L) |
static void | unroll (lua_State *L, void *ud) |
static CallInfo * | findpcall (lua_State *L) |
static int | recover (lua_State *L, int status) |
static l_noret | resume_error (lua_State *L, const char *msg, StkId firstArg) |
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_yieldk (lua_State *L, int nresults, int ctx, lua_CFunction 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 ERRORSTACKSIZE (LUAI_MAXSTACK + 200) |
Definition at line 158 of file lua-5.2.4/src/ldo.c.
Referenced by luaD_growstack(), and luaD_reallocstack().
#define ldo_c |
Definition at line 12 of file lua-5.2.4/src/ldo.c.
#define LUA_CORE |
Definition at line 13 of file lua-5.2.4/src/ldo.c.
#define luai_jmpbuf jmp_buf |
Definition at line 68 of file lua-5.2.4/src/ldo.c.
#define LUAI_THROW | ( | L, | |
c ) longjmp((c)->b, 1) |
Definition at line 66 of file lua-5.2.4/src/ldo.c.
Referenced by luaD_throw().
Definition at line 67 of file lua-5.2.4/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 290 of file lua-5.2.4/src/ldo.c.
Referenced by luaD_precall().
Definition at line 257 of file lua-5.2.4/src/ldo.c.
References lua_assert, luaD_checkstack, Proto::maxstacksize, Proto::numparams, setnilvalue, setobjs2s, and lua_State::top.
Referenced by luaD_precall().
Definition at line 244 of file lua-5.2.4/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 631 of file lua-5.2.4/src/ldo.c.
References LUA_ERRSYNTAX, LUA_QS, luaD_throw(), luaO_pushfstring(), and NULL.
Referenced by f_parser().
Definition at line 142 of file lua-5.2.4/src/ldo.c.
References CallInfo::base, lua_State::ci, CallInfo::func, GCObject::gch, gco2uv, isLua, CallInfo::l, NULL, lua_State::openupval, CallInfo::previous, lua_State::stack, CallInfo::top, lua_State::top, and CallInfo::u.
Referenced by luaD_reallocstack().
|
static |
Definition at line 640 of file lua-5.2.4/src/ldo.c.
References SParser::buff, cast, checkmode(), SParser::dyd, Closure::l, lua_assert, LUA_SIGNATURE, luaC_objbarrier, luaF_newupval(), luaU_undump(), luaY_parser(), SParser::mode, SParser::name, LClosure::p, Proto::sizeupvalues, LClosure::upvals, SParser::z, and zgetc.
Referenced by luaD_protectedparser().
Definition at line 451 of file lua-5.2.4/src/ldo.c.
References CallInfo::callstatus, lua_State::ci, CIST_YPCALL, NULL, and CallInfo::previous.
Referenced by recover().
|
static |
Definition at line 408 of file lua-5.2.4/src/ldo.c.
References adjustresults, api_checknelems, CallInfo::c, CallInfo::callstatus, lua_State::ci, CIST_STAT, CIST_YIELDED, CIST_YPCALL, lua_State::errfunc, CallInfo::k, lua_assert, lua_lock, LUA_OK, lua_unlock, LUA_YIELD, luaD_poscall(), lua_State::nny, CallInfo::nresults, NULL, CallInfo::old_errfunc, CallInfo::status, lua_State::top, and CallInfo::u.
Referenced by unroll().
Definition at line 535 of file lua-5.2.4/src/ldo.c.
References api_checknelems, cast_byte, lua_State::ci, lua_assert, LUA_ERRRUN, lua_lock, LUA_OK, lua_unlock, LUA_YIELD, luaD_rawrunprotected(), luai_userstateresume, lua_State::nCcalls, lua_State::nny, NULL, recover(), resume(), seterrorobj(), lua_longjmp::status, lua_State::status, CallInfo::top, lua_State::top, and unroll().
LUA_API int lua_yieldk | ( | lua_State * | L, |
int | nresults, | ||
int | ctx, | ||
lua_CFunction | k ) |
Definition at line 567 of file lua-5.2.4/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 393 of file lua-5.2.4/src/ldo.c.
References LUA_ERRERR, luaD_precall(), luaD_throw(), luaG_runerror(), LUAI_MAXCCALLS, luaV_execute(), lua_State::nCcalls, and lua_State::nny.
void luaD_growstack | ( | lua_State * | L, |
int | n ) |
Definition at line 175 of file lua-5.2.4/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 217 of file lua-5.2.4/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(), luaD_precall(), luaG_traceexec(), luaG_traceexec(), and traceexec().
Definition at line 595 of file lua-5.2.4/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 362 of file lua-5.2.4/src/ldo.c.
References lua_State::ci, CallInfo::func, lua_State::hookmask, CallInfo::l, LUA_HOOKRET, LUA_MASKLINE, LUA_MASKRET, LUA_MULTRET, luaD_hook(), CallInfo::nresults, lua_State::oldpc, CallInfo::previous, restorestack, CallInfo::savedpc, savestack, setnilvalue, setobjs2s, lua_State::top, and CallInfo::u.
Referenced by finishCcall(), luaD_precall(), and resume().
Definition at line 296 of file lua-5.2.4/src/ldo.c.
References adjust_varargs(), api_checknelems, CallInfo::base, callhook(), CallInfo::callstatus, cast_int, 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, luaC_checkGC, luaD_checkstack, luaD_hook(), luaD_poscall(), luaD_precall(), Proto::maxstacksize, next_ci, CallInfo::nresults, Proto::numparams, Proto::p, restorestack, CallInfo::savedpc, savestack, 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 662 of file lua-5.2.4/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 125 of file lua-5.2.4/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 161 of file lua-5.2.4/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 205 of file lua-5.2.4/src/ldo.c.
References condmovestack, EXTRA_STACK, luaD_reallocstack(), LUAI_MAXSTACK, stackinuse(), and lua_State::stacksize.
Referenced by luaD_pcall(), recover(), sweepthread(), traversethread(), and traversethread().
Definition at line 103 of file lua-5.2.4/src/ldo.c.
References cast_byte, lua_State::errorJmp, G, lua_unlock, luaD_throw(), LUAI_THROW, panic(), setobjs2s, lua_longjmp::status, lua_State::status, and lua_State::top.
Referenced by checkmode(), lua_yieldk(), luaD_call(), luaD_growstack(), luaD_throw(), and resume_error().
|
static |
Definition at line 461 of file lua-5.2.4/src/ldo.c.
References lua_State::allowhook, CallInfo::c, CallInfo::callstatus, lua_State::ci, CIST_STAT, lua_State::errfunc, CallInfo::extra, findpcall(), luaD_shrinkstack(), luaF_close(), lua_State::nny, NULL, CallInfo::old_allowhook, CallInfo::old_errfunc, restorestack, seterrorobj(), lua_longjmp::status, CallInfo::status, and CallInfo::u.
Referenced by lua_resume().
|
static |
Definition at line 496 of file lua-5.2.4/src/ldo.c.
References api_checknelems, lua_State::base_ci, CallInfo::c, CallInfo::callstatus, cast, lua_State::ci, CIST_YIELDED, CallInfo::extra, CallInfo::func, isLua, CallInfo::k, lua_assert, lua_lock, LUA_MULTRET, LUA_OK, lua_unlock, LUA_YIELD, luaD_poscall(), luaD_precall(), LUAI_MAXCCALLS, luaV_execute(), lua_State::nCcalls, NULL, restorestack, resume_error(), lua_State::status, CallInfo::status, lua_State::top, CallInfo::u, and unroll().
Referenced by lua_resume().
Definition at line 485 of file lua-5.2.4/src/ldo.c.
References api_incr_top, luaD_throw(), luaS_new, setsvalue2s, and lua_State::top.
Referenced by resume().
Definition at line 84 of file lua-5.2.4/src/ldo.c.
References G, LUA_ERRERR, LUA_ERRMEM, luaS_newliteral, setobjs2s, setsvalue2s, and lua_State::top.
Referenced by lua_resume(), luaD_pcall(), and recover().
|
static |
Definition at line 194 of file lua-5.2.4/src/ldo.c.
References cast_int, lua_State::ci, lua_assert, NULL, CallInfo::previous, lua_State::stack, lua_State::stack_last, CallInfo::top, and lua_State::top.
Referenced by luaD_shrinkstack().
Definition at line 274 of file lua-5.2.4/src/ldo.c.
References incr_top, luaG_typeerror(), luaT_gettmbyobj(), restorestack, savestack, setobj2s, setobjs2s, TM_CALL, lua_State::top, and ttisfunction.
Referenced by luaD_precall().
|
static |
Definition at line 433 of file lua-5.2.4/src/ldo.c.
References lua_State::base_ci, lua_State::ci, finishCcall(), isLua, luaV_execute(), luaV_finishOp(), and UNUSED.
Referenced by lua_resume(), and resume().