37 if (!
isLua(ci))
return -1;
88 for (ci = L->
ci; level > 0 && ci > L->
base_ci; ci--) {
93 if (level == 0 && ci > L->
base_ci) {
118 StkId limit = (ci == L->
ci) ? L->
top : (ci+1)->func;
119 if (limit - ci->
base >= n && n > 0)
120 return "(*temporary)";
171 ar->
source =
"=(tail call)";
178 if (f ==
NULL || f->
c.isC) {
200 for (; *what; what++) {
211 ar->
nups = f->
c.nupvalues;
244 else if (ar->
i_ci != 0) {
250 if (strchr(what,
'f')) {
255 if (strchr(what,
'L'))
268#define check(x) if (!(x)) return 0;
270#define checkjump(pt,pc) check(0 <= pc && pc < pt->sizecode)
272#define checkreg(pt,reg) check((reg) < (pt)->maxstacksize)
288#define checkopenop(pt,pc) luaG_checkopenop((pt)->code[(pc)+1])
322 for (pc = 0; pc < lastpc; pc++) {
347 check(0 <= dest && dest < pt->sizecode);
354 for (j = 0; j < dest; j++) {
367 if (
a == reg) last = pc;
383 if (
a <= reg && reg <= b)
399 if (reg ==
a+1) last = pc;
409 if (reg >=
a+2) last = pc;
419 if (reg !=
NO_REG && pc < dest && dest <= lastpc)
434 if (reg >=
a) last = pc;
446 check(pc < pt->sizecode - 1);
452 check(b < pt->sizep);
453 nup = pt->
p[b]->
nups;
454 check(pc + nup < pt->sizecode);
455 for (j = 1; j <= nup; j++) {
474 return pt->
code[last];
561 for (p = ci->
base; p < ci->
top; p++)
562 if (o == p)
return 1;
void luaA_pushobject(lua_State *L, const TValue *o)
LUA_API int lua_gethookmask(lua_State *L)
static void info_tailcall(lua_Debug *ar)
#define checkreg(pt, reg)
LUA_API int lua_gethookcount(lua_State *L)
int luaG_checkcode(const Proto *pt)
static int precheck(const Proto *pt)
void luaG_concaterror(lua_State *L, StkId p1, StkId p2)
static const char * getobjname(lua_State *L, CallInfo *ci, int stackpos, const char **name)
LUA_API lua_Hook lua_gethook(lua_State *L)
static int currentline(lua_State *L, CallInfo *ci)
int luaG_checkopenop(Instruction i)
static Instruction symbexec(const Proto *pt, int lastpc, int reg)
void luaG_aritherror(lua_State *L, const TValue *p1, const TValue *p2)
void luaG_runerror(lua_State *L, const char *fmt,...)
static const char * kname(Proto *p, int c)
LUA_API int lua_sethook(lua_State *L, lua_Hook func, int mask, int count)
static void collectvalidlines(lua_State *L, Closure *f)
int luaG_ordererror(lua_State *L, const TValue *p1, const TValue *p2)
static void funcinfo(lua_Debug *ar, Closure *cl)
static Proto * getluaproto(CallInfo *ci)
static void addinfo(lua_State *L, const char *msg)
static int isinstack(CallInfo *ci, const TValue *o)
static int currentpc(lua_State *L, CallInfo *ci)
static const char * getfuncname(lua_State *L, CallInfo *ci, const char **name)
LUA_API int lua_getstack(lua_State *L, int level, lua_Debug *ar)
void luaG_typeerror(lua_State *L, const TValue *o, const char *op)
LUA_API int lua_getinfo(lua_State *L, const char *what, lua_Debug *ar)
LUA_API const char * lua_getlocal(lua_State *L, const lua_Debug *ar, int n)
void luaG_errormsg(lua_State *L)
static int auxgetinfo(lua_State *L, const char *what, lua_Debug *ar, Closure *f, CallInfo *ci)
static const char * findlocal(lua_State *L, CallInfo *ci, int n)
static int checkArgMode(const Proto *pt, int r, enum OpArgMask mode)
LUA_API const char * lua_setlocal(lua_State *L, const lua_Debug *ar, int n)
#define checkopenop(pt, pc)
#define resethookcount(L)
void luaD_call(lua_State *L, StkId func, int nResults)
void luaD_throw(lua_State *L, int errcode)
#define restorestack(L, n)
const char * luaF_getlocalname(const Proto *f, int local_number, int pc)
void luaO_chunkid(char *out, const char *source, size_t bufflen)
const char * luaO_pushfstring(lua_State *L, const char *fmt,...)
const char * luaO_pushvfstring(lua_State *L, const char *fmt, va_list argp)
#define setbvalue(obj, x)
#define setclvalue(L, obj, x)
#define sethvalue(L, obj, x)
TValue * luaH_setnum(lua_State *L, Table *t, int key)
Table * luaH_new(lua_State *L, int narray, int nhash)
const char *const luaT_typenames[]
void(* lua_Hook)(lua_State *L, lua_Debug *ar)
#define luai_apicheck(L, o)
const TValue * luaV_tonumber(const TValue *obj, TValue *n)
struct CallInfo::@64::@65 l
const Instruction * savedpc
char short_src[LUA_IDSIZE]
const Instruction * savedpc