Showing the changes to src/lcode.h (1 of 66 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | /* |
| 2 | −** $Id: lcode.h,v 1.40 2004/10/04 19:01:53 roberto Exp $ | |
| 2 | +** $Id: lcode.h,v 1.43 2005/04/25 19:24:10 roberto Exp $ | |
| 3 | 3 | ** Code generator for Lua |
| 4 | 4 | ** See Copyright Notice in lua.h |
| 5 | 5 | */ |
| @@ -24,7 +24,7 @@ · 18 unmodified lines | ||
| 24 | 24 | ** grep "ORDER OPR" if you change these enums |
| 25 | 25 | */ |
| 26 | 26 | typedef enum BinOpr { |
| 27 | − OPR_ADD, OPR_SUB, OPR_MULT, OPR_DIV, OPR_POW, | |
| 27 | + OPR_ADD, OPR_SUB, OPR_MULT, OPR_DIV, OPR_MOD, OPR_POW, | |
| 28 | 28 | OPR_CONCAT, |
| 29 | 29 | OPR_NE, OPR_EQ, |
| 30 | 30 | OPR_LT, OPR_LE, OPR_GT, OPR_GE, |
| @@ -34,7 +34,7 @@ typedef enum BinOpr { · 3 unmodified lines | ||
| 34 | 34 | |
| 35 | 35 | #define binopistest(op) ((op) >= OPR_NE) |
| 36 | 36 | |
| 37 | −typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_NOUNOPR } UnOpr; | |
| 37 | +typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_SIZE, OPR_NOUNOPR } UnOpr; | |
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | #define getcode(fs,e) ((fs)->f->code[(e)->info]) |
| @@ -43,36 +43,36 @@ typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_NOUNOPR } UnOpr; · 2 unmodified lines | ||
| 43 | 43 | |
| 44 | 44 | #define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) |
| 45 | 45 | |
| 46 | −int luaK_code (FuncState *fs, Instruction i, int line); | |
| 47 | −int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); | |
| 48 | −int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); | |
| 49 | −void luaK_fixline (FuncState *fs, int line); | |
| 50 | −void luaK_nil (FuncState *fs, int from, int n); | |
| 51 | −void luaK_reserveregs (FuncState *fs, int n); | |
| 52 | −void luaK_checkstack (FuncState *fs, int n); | |
| 53 | −int luaK_stringK (FuncState *fs, TString *s); | |
| 54 | −int luaK_numberK (FuncState *fs, lua_Number r); | |
| 55 | −void luaK_dischargevars (FuncState *fs, expdesc *e); | |
| 56 | −int luaK_exp2anyreg (FuncState *fs, expdesc *e); | |
| 57 | −void luaK_exp2nextreg (FuncState *fs, expdesc *e); | |
| 58 | −void luaK_exp2val (FuncState *fs, expdesc *e); | |
| 59 | −int luaK_exp2RK (FuncState *fs, expdesc *e); | |
| 60 | −void luaK_self (FuncState *fs, expdesc *e, expdesc *key); | |
| 61 | −void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); | |
| 62 | −void luaK_goiftrue (FuncState *fs, expdesc *e); | |
| 63 | −void luaK_goiffalse (FuncState *fs, expdesc *e); | |
| 64 | −void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); | |
| 65 | −void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); | |
| 66 | −void luaK_setoneret (FuncState *fs, expdesc *e); | |
| 67 | −int luaK_jump (FuncState *fs); | |
| 68 | −void luaK_patchlist (FuncState *fs, int list, int target); | |
| 69 | −void luaK_patchtohere (FuncState *fs, int list); | |
| 70 | −void luaK_concat (FuncState *fs, int *l1, int l2); | |
| 71 | −int luaK_getlabel (FuncState *fs); | |
| 72 | −void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v); | |
| 73 | −void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); | |
| 74 | −void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, expdesc *v2); | |
| 75 | −void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); | |
| 46 | +LUAI_FUNC int luaK_code (FuncState *fs, Instruction i, int line); | |
| 47 | +LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); | |
| 48 | +LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); | |
| 49 | +LUAI_FUNC void luaK_fixline (FuncState *fs, int line); | |
| 50 | +LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); | |
| 51 | +LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); | |
| 52 | +LUAI_FUNC void luaK_checkstack (FuncState *fs, int n); | |
| 53 | +LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s); | |
| 54 | +LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r); | |
| 55 | +LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e); | |
| 56 | +LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e); | |
| 57 | +LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e); | |
| 58 | +LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e); | |
| 59 | +LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e); | |
| 60 | +LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); | |
| 61 | +LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); | |
| 62 | +LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); | |
| 63 | +LUAI_FUNC void luaK_goiffalse (FuncState *fs, expdesc *e); | |
| 64 | +LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); | |
| 65 | +LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); | |
| 66 | +LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); | |
| 67 | +LUAI_FUNC int luaK_jump (FuncState *fs); | |
| 68 | +LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target); | |
| 69 | +LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list); | |
| 70 | +LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2); | |
| 71 | +LUAI_FUNC int luaK_getlabel (FuncState *fs); | |
| 72 | +LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v); | |
| 73 | +LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); | |
| 74 | +LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, expdesc *v2); | |
| 75 | +LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); | |
| 76 | 76 | |
| 77 | 77 | |
| 78 | 78 | #endif |