37#define hasmultret(k) ((k) == VCALL || (k) == VVARARG)
42#define eqstr(a,b) ((a) == (b))
83 const char *where = (line == 0)
118#define check_condition(ls,c,msg) { if (!(c)) luaX_syntaxerror(ls, msg); }
128 "%s expected (to close %s at line %d)",
166 LocVar, SHRT_MAX,
"local variables");
167 while (oldsize < f->sizelocvars)
191#define new_localvarliteral(ls,v) \
192 new_localvarliteral_(ls, "" v, (sizeof(v)/sizeof(char))-1)
205 for (; nvars; nvars--) {
221 for (i = 0; i < fs->
nups; i++) {
234 while (oldsize < f->sizeupvalues)
311 int extra = nvars - nexps;
314 if (extra < 0) extra = 0;
338#define leavelevel(ls) ((ls)->L->nCcalls--)
350 "<goto %s> at line %d jumps into the scope of local '%s'",
356 for (i = g; i < gl->
n - 1; i++)
357 gl->
arr[i] = gl->
arr[i + 1];
466 ?
"<%s> at line %d not inside a loop"
467 :
"no visible label '%s' for <goto> at line %d";
505 int oldsize = f->
sizep;
507 while (oldsize < f->sizep)
508 f->
p[oldsize++] =
NULL;
740 if (ls->
t.
token ==
'}')
break;
854 nparams = fs->
freereg - (base+1);
965 "cannot use '...' outside a vararg function");
1026static const struct {
1034 {6, 6}, {4, 4}, {5, 5},
1037 {3, 3}, {3, 3}, {3, 3},
1038 {3, 3}, {3, 3}, {3, 3},
1042#define UNARY_PRIORITY 12
1124 for (; lh; lh = lh->
prev) {
1209 "label '%s' already defined on line %d",
1250 condexit =
cond(ls);
1272 condexit =
cond(ls);
1336 forbody(ls, base, line, 1, 1);
1361 forbody(ls, base, line, nvars - 3, 0);
1374 case '=':
fornum(ls, varname, line);
break;
1467 while (ls->
t.
token ==
'.')
1469 if (ls->
t.
token ==
':') {
1483 body(ls, &b, ismethod, line);
1516 if (e.
k ==
VCALL && nret == 1) {
1642 lexstate.
buff = buff;
int luaK_jump(FuncState *fs)
void luaK_prefix(FuncState *fs, UnOpr op, expdesc *e)
void luaK_infix(FuncState *fs, BinOpr op, expdesc *v)
void luaK_exp2val(FuncState *fs, expdesc *e)
void luaK_exp2nextreg(FuncState *fs, expdesc *e)
static void luaK_goiffalse(FuncState *fs, expdesc *e)
void luaK_storevar(FuncState *fs, expdesc *var, expdesc *ex)
void luaK_self(FuncState *fs, expdesc *e, expdesc *key)
int luaK_codeABx(FuncState *fs, OpCode o, int a, unsigned int bc)
void luaK_patchlist(FuncState *fs, int list, int target)
void luaK_patchtohere(FuncState *fs, int list)
void luaK_nil(FuncState *fs, int from, int n)
void luaK_posfix(FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2)
void luaK_goiftrue(FuncState *fs, expdesc *e)
void luaK_setoneret(FuncState *fs, expdesc *e)
int luaK_exp2RK(FuncState *fs, expdesc *e)
void luaK_dischargevars(FuncState *fs, expdesc *e)
void luaK_concat(FuncState *fs, int *l1, int l2)
void luaK_setreturns(FuncState *fs, expdesc *e, int nresults)
void luaK_fixline(FuncState *fs, int line)
int luaK_stringK(FuncState *fs, TString *s)
int luaK_exp2anyreg(FuncState *fs, expdesc *e)
void luaK_setlist(FuncState *fs, int base, int nelems, int tostore)
void luaK_ret(FuncState *fs, int first, int nret)
void luaK_reserveregs(FuncState *fs, int n)
void luaK_indexed(FuncState *fs, expdesc *t, expdesc *k)
int luaK_getlabel(FuncState *fs)
void luaK_checkstack(FuncState *fs, int n)
#define luaK_setmultret(fs, e)
#define luaK_codeAsBx(fs, o, A, sBx)
Proto * luaF_newproto(lua_State *L)
Closure * luaF_newLclosure(lua_State *L, int nelems, Table *e)
#define luaC_objbarrier(L, p, o)
void luaX_syntaxerror(LexState *ls, const char *msg)
TString * luaX_newstring(LexState *ls, const char *str, size_t l)
void luaX_next(LexState *ls)
void luaX_setinput(lua_State *L, LexState *ls, ZIO *z, TString *source)
const char * luaX_token2str(LexState *ls, int token)
void luaX_lookahead(LexState *ls)
#define luaM_growvector(L, v, nelems, size, t, limit, e)
#define luaM_reallocvector(L, v, oldn, n, t)
const char * luaO_pushfstring(lua_State *L, const char *fmt,...)
int luaO_int2fb(unsigned int x)
#define sethvalue(L, obj, x)
#define LFIELDS_PER_FLUSH
Table * luaH_new(lua_State *L, int narray, int nhash)
LUAI_FUNC void luaK_patchclose(FuncState *fs, int list, int level)
int luaK_codek(FuncState *fs, int reg, int k)
void luaK_exp2anyregup(FuncState *fs, expdesc *e)
#define luaK_jumpto(fs, t)
#define setclLvalue(L, obj, x)
int luaK_intK(FuncState *fs, lua_Integer n)
#define getinstruction(fs, e)
void luaD_inctop(lua_State *L)
static void checknext(LexState *ls, int c)
static void mainfunc(LexState *ls, FuncState *fs)
#define new_localvarliteral(ls, v)
static l_noret undefgoto(LexState *ls, Labeldesc *gt)
static TString * str_checkname(LexState *ls)
static void removevars(FuncState *fs, int tolevel)
static void fornum(LexState *ls, TString *varname, int line)
static void gotostat(LexState *ls, int pc)
static void block(LexState *ls)
static int exp1(LexState *ls)
static int cond(LexState *ls)
static int explist(LexState *ls, expdesc *v)
static l_noret error_expected(LexState *ls, int token)
static void assignment(LexState *ls, struct LHS_assign *lh, int nvars)
static void exprstat(LexState *ls)
static void checkrepeated(FuncState *fs, Labellist *ll, TString *label)
static void findgotos(LexState *ls, Labeldesc *lb)
static void singlevar(LexState *ls, expdesc *var)
static void simpleexp(LexState *ls, expdesc *v)
static void codeclosure(LexState *ls, expdesc *v)
static void labelstat(LexState *ls, TString *label, int line)
static void close_func(LexState *ls)
static BinOpr subexpr(LexState *ls, expdesc *v, int limit)
static void skipnoopstat(LexState *ls)
static void closegoto(LexState *ls, int g, Labeldesc *label)
static void singlevaraux(FuncState *fs, TString *n, expdesc *var, int base)
static void adjustlocalvars(LexState *ls, int nvars)
static int searchupvalue(FuncState *fs, TString *name)
static void funcargs(LexState *ls, expdesc *f, int line)
static void test_then_block(LexState *ls, int *escapelist)
static void checkname(LexState *ls, expdesc *e)
static void new_localvar(LexState *ls, TString *name)
static void movegotosout(FuncState *fs, BlockCnt *bl)
static int block_follow(LexState *ls, int withuntil)
static void forlist(LexState *ls, TString *indexname)
static void new_localvarliteral_(LexState *ls, const char *name, size_t sz)
static int testnext(LexState *ls, int c)
static void fieldsel(LexState *ls, expdesc *v)
static BinOpr getbinopr(int op)
static void retstat(LexState *ls)
static void funcstat(LexState *ls, int line)
static int findlabel(LexState *ls, int g)
static void check_conflict(LexState *ls, struct LHS_assign *lh, expdesc *v)
static void adjust_assign(LexState *ls, int nvars, int nexps, expdesc *e)
static int registerlocalvar(LexState *ls, TString *varname)
static void field(LexState *ls, struct ConsControl *cc)
static int newupvalue(FuncState *fs, TString *name, expdesc *v)
static void repeatstat(LexState *ls, int line)
static void localfunc(LexState *ls)
static Proto * addprototype(LexState *ls)
static int funcname(LexState *ls, expdesc *v)
static void lastlistfield(FuncState *fs, struct ConsControl *cc)
static void leaveblock(FuncState *fs)
static void body(LexState *ls, expdesc *e, int ismethod, int line)
static void init_exp(expdesc *e, expkind k, int i)
static void closelistfield(FuncState *fs, struct ConsControl *cc)
static void codestring(LexState *ls, expdesc *e, TString *s)
static void markupval(FuncState *fs, int level)
static void primaryexp(LexState *ls, expdesc *v)
LClosure * luaY_parser(lua_State *L, ZIO *z, Mbuffer *buff, Dyndata *dyd, const char *name, int firstchar)
static void check_match(LexState *ls, int what, int who, int where)
static int searchvar(FuncState *fs, TString *n)
static void statement(LexState *ls)
static void yindex(LexState *ls, expdesc *v)
static void listfield(LexState *ls, struct ConsControl *cc)
static int newlabelentry(LexState *ls, Labellist *l, TString *name, int line, int pc)
static void open_func(LexState *ls, FuncState *fs, BlockCnt *bl)
static l_noret errorlimit(FuncState *fs, int limit, const char *what)
static void forbody(LexState *ls, int base, int line, int nvars, int isnum)
static void recfield(LexState *ls, struct ConsControl *cc)
static void parlist(LexState *ls)
static void checklimit(FuncState *fs, int v, int l, const char *what)
static l_noret semerror(LexState *ls, const char *msg)
static void suffixedexp(LexState *ls, expdesc *v)
static void ifstat(LexState *ls, int line)
static void breaklabel(LexState *ls)
#define check_condition(ls, c, msg)
static void localstat(LexState *ls)
static void enterblock(FuncState *fs, BlockCnt *bl, lu_byte isloop)
static const struct @72 priority[]
static void whilestat(LexState *ls, int line)
static void expr(LexState *ls, expdesc *v)
static void forstat(LexState *ls, int line)
static UnOpr getunopr(int op)
static void constructor(LexState *ls, expdesc *t)
static void statlist(LexState *ls)
#define luaK_codeABC(fs, o, a, b, c)
CURL_EXTERN CURLMcode curl_socket_t s
struct BlockCnt * previous
struct Dyndata::@63 actvar
struct expdesc::@61::@62 ind