#include <setjmp.h>#include <stdlib.h>#include <string.h>#include "lua.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.
Classes | |
| struct | lua_longjmp |
| struct | SParser |
Defines | |
| #define | ldo_c |
| #define | LUA_CORE |
| #define | inc_ci(L) |
Functions | |
| void | luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) |
| static void | restore_stack_limit (lua_State *L) |
| static void | resetstack (lua_State *L, int status) |
| void | 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_reallocCI (lua_State *L, int newsize) |
| void | luaD_growstack (lua_State *L, int n) |
| static CallInfo * | growCI (lua_State *L) |
| void | luaD_callhook (lua_State *L, int event, int line) |
| 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) |
| static StkId | callrethooks (lua_State *L, StkId firstResult) |
| int | luaD_poscall (lua_State *L, StkId firstResult) |
| void | luaD_call (lua_State *L, StkId func, int nResults) |
| static void | resume (lua_State *L, void *ud) |
| static int | resume_error (lua_State *L, const char *msg) |
| LUA_API int | lua_resume (lua_State *L, int nargs) |
| LUA_API int | lua_yield (lua_State *L, int nresults) |
| int | luaD_pcall (lua_State *L, Pfunc func, void *u, ptrdiff_t old_top, ptrdiff_t ef) |
| static void | f_parser (lua_State *L, void *ud) |
| int | luaD_protectedparser (lua_State *L, ZIO *z, const char *name) |
| #define inc_ci | ( | L | ) |
Value:
((L->ci == L->end_ci) ? growCI(L) : \ (condhardstacktests(luaD_reallocCI(L, L->size_ci)), ++L->ci))
Definition at line 259 of file ldo.cpp.
Referenced by luaD_precall().
Definition at line 208 of file ldo.cpp.
References cast_num, Proto::is_vararg, iswhite, lua_assert, luaC_checkGC, luaH_new(), luaH_setnum(), luaH_setstr(), luaS_newliteral, NULL, Proto::numparams, obj2gco, sethvalue, setnilvalue, setnvalue, setobj2n, setobjs2s, lua_State::top, VARARG_HASARG, and VARARG_NEEDSARG.
Referenced by luaD_precall().
Definition at line 331 of file ldo.cpp.
References lua_State::ci, f_isLua, LUA_HOOKRET, LUA_HOOKTAILRET, luaD_callhook(), restorestack, savestack, and CallInfo::tailcalls.
Referenced by luaD_poscall().
Definition at line 126 of file ldo.cpp.
References lua_State::base, CallInfo::base, lua_State::base_ci, CallInfo::func, GCObject::gch, gco2uv, NULL, lua_State::openupval, lua_State::stack, CallInfo::top, and lua_State::top.
Referenced by luaD_reallocstack().
| static void f_parser | ( | lua_State * | L, | |
| void * | ud | |||
| ) | [static] |
Definition at line 488 of file ldo.cpp.
References SParser::buff, cast, gt, hvalue, incr_top, Closure::l, LUA_SIGNATURE, luaC_checkGC, luaF_newLclosure(), luaF_newupval(), luaU_undump(), luaY_parser(), luaZ_lookahead(), SParser::name, Proto::nups, LClosure::p, setclvalue, lua_State::top, LClosure::upvals, and SParser::z.
Referenced by luaD_protectedparser().
Definition at line 169 of file ldo.cpp.
References lua_State::ci, LUA_ERRERR, luaD_reallocCI(), luaD_throw(), luaG_runerror(), LUAI_MAXCALLS, and lua_State::size_ci.
| LUA_API int lua_resume | ( | lua_State * | L, | |
| int | nargs | |||
| ) |
| LUA_API int lua_yield | ( | lua_State * | L, | |
| int | nresults | |||
| ) |
Definition at line 369 of file ldo.cpp.
Referenced by callTM(), callTMres(), f_call(), f_Ccall(), GCTM(), lua_call(), and luaG_errormsg().
| void luaD_callhook | ( | lua_State * | L, | |
| int | event, | |||
| int | line | |||
| ) |
Definition at line 181 of file ldo.cpp.
Referenced by callrethooks(), luaD_precall(), and traceexec().
Definition at line 453 of file ldo.cpp.
Referenced by lua_cpcall(), lua_pcall(), and luaD_protectedparser().
Definition at line 111 of file ldo.cpp.
Referenced by lua_close(), lua_newstate(), lua_resume(), and luaD_pcall().
| void luaD_reallocCI | ( | lua_State * | L, | |
| int | newsize | |||
| ) |
Definition at line 152 of file ldo.cpp.
Referenced by checkstacksizes(), growCI(), and restore_stack_limit().
| void luaD_reallocstack | ( | lua_State * | L, | |
| int | newsize | |||
| ) |
| void luaD_throw | ( | lua_State * | L, | |
| int | errcode | |||
| ) |
Definition at line 94 of file ldo.cpp.
Referenced by error(), growCI(), luaD_call(), luaG_errormsg(), luaM_realloc_(), and luaX_lexerror().
| static void resetstack | ( | lua_State * | L, | |
| int | status | |||
| ) | [static] |
Definition at line 81 of file ldo.cpp.
References lua_State::allowhook, CallInfo::base, lua_State::base, lua_State::base_ci, lua_State::ci, lua_State::errfunc, lua_State::errorJmp, luaD_seterrorobj(), luaF_close(), lua_State::nCcalls, NULL, and restore_stack_limit().
Referenced by luaD_throw().
| static void restore_stack_limit | ( | lua_State * | L | ) | [static] |
Definition at line 71 of file ldo.cpp.
References lua_State::base_ci, cast_int, lua_State::ci, EXTRA_STACK, lua_assert, luaD_reallocCI(), LUAI_MAXCALLS, lua_State::size_ci, lua_State::stack, lua_State::stack_last, and lua_State::stacksize.
Referenced by luaD_pcall(), and resetstack().
| static void resume | ( | lua_State * | L, | |
| void * | ud | |||
| ) | [static] |
Definition at line 383 of file ldo.cpp.
References CallInfo::base, lua_State::base, lua_State::base_ci, cast, cast_int, lua_State::ci, f_isLua, GET_OPCODE, lua_assert, LUA_MULTRET, LUA_YIELD, luaD_poscall(), luaD_precall(), luaV_execute(), OP_CALL, OP_TAILCALL, PCRLUA, lua_State::status, CallInfo::top, and lua_State::top.
Referenced by lua_resume().
| static int resume_error | ( | lua_State * | L, | |
| const char * | msg | |||
| ) | [static] |
Definition at line 408 of file ldo.cpp.
References CallInfo::base, lua_State::ci, incr_top, LUA_ERRRUN, lua_unlock, luaS_new, setsvalue2s, and lua_State::top.
Referenced by lua_resume().
Definition at line 243 of file ldo.cpp.
References incr_top, luaG_typeerror(), luaT_gettmbyobj(), restorestack, savestack, setobj2s, setobjs2s, TM_CALL, lua_State::top, and ttisfunction.
Referenced by luaD_precall().
1.5.3