37 #define hasjumps(e) ((e)->t != (e)->f) 118 return &fs->
f->
code[fs->
pc - 1];
131 int l = from + n - 1;
135 int pl = pfrom +
GETARG_B(*previous);
136 if ((pfrom <= from && from <= pl + 1) ||
137 (from <= pfrom && pfrom <= l + 1)) {
138 if (pfrom < from) from = pfrom;
158 return (pc+1)+offset;
168 int offset = dest - (pc + 1);
321 #if !defined(MAXIWTHABS) 322 #define MAXIWTHABS 120 327 #define LIMLINEDIFF 0x80 475 int newstack = fs->
freereg + n;
479 "function or expression needs too many registers");
568 while (oldsize < f->sizek)
setnilvalue(&f->
k[oldsize++]);
582 return addk(fs, &o, &o);
596 return addk(fs, &k, &o);
605 return addk(fs, &o, &o);
615 return addk(fs, &o, &o);
625 return addk(fs, &o, &o);
637 return addk(fs, &k, &v);
848 if (reg != e->
u.
info)
991 case VK: info = e->
u.
info;
break;
1194 {
int temp = e->
f; e->
f = e->
t; e->
t = temp; }
1305 return (
nvalue(v2) != 0);
1357 OpCode op,
int v2,
int flip,
int line,
1418 expdesc temp = *e1; *e1 = *e2; *e2 = temp;
1430 int v2 = e2->
u.
info;
1735 int extra = asize / (
MAXARG_C + 1);
1737 int k = (extra > 0);
1757 int extra = nelems / (
MAXARG_C + 1);
1771 for (count = 0; count < 100; count++) {
1789 for (i = 0; i < fs->
pc; i++) {
static void exp2reg(FuncState *fs, expdesc *e, int reg)
static void freereg(FuncState *fs, int reg)
static void codenot(FuncState *fs, expdesc *e)
l_noret luaX_syntaxerror(LexState *ls, const char *msg)
int luaK_codeAsBx(FuncState *fs, OpCode o, int a, int bc)
void luaK_exp2anyregup(FuncState *fs, expdesc *e)
void luaK_reserveregs(FuncState *fs, int n)
int luaO_rawarith(lua_State *L, int op, const TValue *p1, const TValue *p2, TValue *res)
void luaK_indexed(FuncState *fs, expdesc *t, expdesc *k)
static void discharge2anyreg(FuncState *fs, expdesc *e)
static int boolT(FuncState *fs)
static void codearith(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int flip, int line)
int luaK_exp2const(FuncState *fs, const expdesc *e, TValue *v)
static void codebitwise(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int line)
int luaK_exp2anyreg(FuncState *fs, expdesc *e)
static void codebinexpval(FuncState *fs, OpCode op, expdesc *e1, expdesc *e2, int line)
static int patchtestreg(FuncState *fs, int node, int reg)
static int validop(int op, TValue *v1, TValue *v2)
static int finishbinexpneg(FuncState *fs, expdesc *e1, expdesc *e2, OpCode op, int line, TMS event)
static void removelastinstruction(FuncState *fs)
static int condjump(FuncState *fs, OpCode op, int A, int B, int C, int k)
static void freeregs(FuncState *fs, int r1, int r2)
AbsLineInfo * abslineinfo
#define luaC_barrier(L, p, v)
static int cond(LexState *ls)
void luaK_setoneret(FuncState *fs, expdesc *e)
int luaK_code(FuncState *fs, Instruction i)
static void codebini(FuncState *fs, OpCode op, expdesc *e1, expdesc *e2, int flip, int line, TMS event)
void luaK_self(FuncState *fs, expdesc *e, expdesc *key)
void luaK_setreturns(FuncState *fs, expdesc *e, int nresults)
static void codecommutative(FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2, int line)
static int nilK(FuncState *fs)
void luaK_goiftrue(FuncState *fs, expdesc *e)
void luaK_storevar(FuncState *fs, expdesc *var, expdesc *ex)
void luaK_infix(FuncState *fs, BinOpr op, expdesc *v)
void luaK_dischargevars(FuncState *fs, expdesc *e)
static void const2exp(TValue *v, expdesc *e)
#define tointegerns(o, i)
int luaK_jump(FuncState *fs)
void luaK_checkstack(FuncState *fs, int n)
void luaK_nil(FuncState *fs, int from, int n)
void luaK_int(FuncState *fs, int reg, lua_Integer i)
#define CREATE_ABx(o, a, bc)
#define sethvalue(L, obj, x)
static void removelastlineinfo(FuncState *fs)
static void codeconcat(FuncState *fs, expdesc *e1, expdesc *e2, int line)
int luaO_ceillog2(unsigned int x)
static void codeeq(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2)
static int isCint(expdesc *e)
static void fixjump(FuncState *fs, int pc, int dest)
TValue * luaH_set(lua_State *L, Table *t, const TValue *key)
int luaK_isKint(expdesc *e)
static void codeorder(FuncState *fs, OpCode op, expdesc *e1, expdesc *e2)
void luaK_finish(FuncState *fs)
void luaK_patchlist(FuncState *fs, int list, int target)
static void patchlistaux(FuncState *fs, int list, int vtarget, int reg, int dtarget)
#define LFIELDS_PER_FLUSH
static TValue * const2val(FuncState *fs, const expdesc *e)
int luaK_exp2RK(FuncState *fs, expdesc *e)
l_noret luaK_semerror(LexState *ls, const char *msg)
static void freeexp(FuncState *fs, expdesc *e)
static int isKstr(FuncState *fs, expdesc *e)
struct expdesc::@25::@27 var
int luaK_codeABx(FuncState *fs, OpCode o, int a, unsigned int bc)
static int jumponcond(FuncState *fs, expdesc *e, int cond)
static int codeextraarg(FuncState *fs, int a)
static int getjump(FuncState *fs, int pc)
static void negatecondition(FuncState *fs, expdesc *e)
void luaK_prefix(FuncState *fs, UnOpr op, expdesc *e, int line)
static void codeunexpval(FuncState *fs, OpCode op, expdesc *e, int line)
#define setpvalue(obj, x)
static int luaK_codek(FuncState *fs, int reg, int k)
#define setivalue(obj, x)
#define setobj(L, obj1, obj2)
void luaK_ret(FuncState *fs, int first, int nret)
static void str2K(FuncState *fs, expdesc *e)
static Instruction * getjumpcontrol(FuncState *fs, int pc)
static void removevalues(FuncState *fs, int list)
static int code_loadbool(FuncState *fs, int A, OpCode op)
#define setfltvalue(obj, x)
struct expdesc::@25::@26 ind
void luaK_goiffalse(FuncState *fs, expdesc *e)
static int luaK_exp2K(FuncState *fs, expdesc *e)
int luaK_codeABCk(FuncState *fs, OpCode o, int a, int b, int c, int k)
static void finishbinexpval(FuncState *fs, expdesc *e1, expdesc *e2, OpCode op, int v2, int flip, int line, OpCode mmop, TMS event)
static int boolF(FuncState *fs)
int luaK_getlabel(FuncState *fs)
void luaK_exp2val(FuncState *fs, expdesc *e)
struct Dyndata::@29 actvar
void luaK_fixline(FuncState *fs, int line)
static int tonumeral(const expdesc *e, TValue *v)
static int luaK_intK(FuncState *fs, lua_Integer n)
int luaV_flttointeger(lua_Number n, lua_Integer *p, F2Imod mode)
static int fitsC(lua_Integer i)
#define getinstruction(fs, e)
static void discharge2reg(FuncState *fs, expdesc *e, int reg)
static int finaltarget(Instruction *code, int i)
static void freeexps(FuncState *fs, expdesc *e1, expdesc *e2)
#define luaK_codeABC(fs, o, a, b, c)
static int isSCint(expdesc *e)
static int fitsBx(lua_Integer i)
static void codeABRK(FuncState *fs, OpCode o, int a, int b, expdesc *ec)
void luaK_settablesize(FuncState *fs, int pc, int ra, int asize, int hsize)
#define CREATE_ABCk(o, a, b, c, k)
static int constfolding(FuncState *fs, int op, expdesc *e1, const expdesc *e2)
static int need_value(FuncState *fs, int list)
static void savelineinfo(FuncState *fs, Proto *f, int line)
void luaK_exp2nextreg(FuncState *fs, expdesc *e)
static int isSCnumber(expdesc *e, int *pi, int *isfloat)
static void luaK_float(FuncState *fs, int reg, lua_Number f)
static int codesJ(FuncState *fs, OpCode o, int sj, int k)
static int luaK_numberK(FuncState *fs, lua_Number r)
static int addk(FuncState *fs, TValue *key, TValue *v)
static int stringK(FuncState *fs, TString *s)
void luaK_patchtohere(FuncState *fs, int list)
#define luaM_growvector(L, v, nelems, size, t, limit, e)
void luaK_setlist(FuncState *fs, int base, int nelems, int tostore)
void luaK_posfix(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int line)
int luaY_nvarstack(FuncState *fs)
#define luaV_rawequalobj(t1, t2)
static void swapexps(expdesc *e1, expdesc *e2)
void luaK_concat(FuncState *fs, int *l1, int l2)
#define CREATE_sJ(o, j, k)
static Instruction * previousinstruction(FuncState *fs)
#define setsvalue(L, obj, x)