Showing the changes to src/lcode.h (1 of 86 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.h,v 1.48.1.1 2007/12/27 13:02:25 roberto Exp $ | 2 | ** $Id: lcode.h,v 1.52 2009/09/23 20:33:05 roberto Exp $ |
| 3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -21,13 +21,13 @@ · 15 unmodified lines | |||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* | 23 | /* |
| 24 | ** grep "ORDER OPR" if you change these enums | 24 | ** grep "ORDER OPR" if you change these enums (ORDER OP) |
| 25 | */ | 25 | */ |
| 26 | typedef enum BinOpr { | 26 | typedef enum BinOpr { |
| 27 | OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, | 27 | OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, |
| 28 | OPR_CONCAT, | 28 | OPR_CONCAT, |
| 29 | OPR_NE, OPR_EQ, | 29 | OPR_EQ, OPR_LT, OPR_LE, |
| 30 | OPR_LT, OPR_LE, OPR_GT, OPR_GE, | 30 | OPR_NE, OPR_GT, OPR_GE, |
| 31 | OPR_AND, OPR_OR, | 31 | OPR_AND, OPR_OR, |
| 32 | OPR_NOBINOPR | 32 | OPR_NOBINOPR |
| 33 | } BinOpr; | 33 | } BinOpr; |
| @@ -42,8 +42,13 @@ typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; · 8 unmodified lines | |||
| 42 | 42 | ||
| 43 | #define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) | 43 | #define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) |
| 44 | 44 | ||
| 45 | #define luaK_jumpto(fs,t) luaK_patchlist(fs, luaK_jump(fs), t) | ||
| 46 | |||
| 47 | #define luaK_codek(fs,reg,k) luaK_codeABxX(fs, OP_LOADK, reg, k) | ||
| 48 | |||
| 45 | LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); | 49 | LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); |
| 46 | LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); | 50 | LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); |
| 51 | LUAI_FUNC int luaK_codeABxX (FuncState *fs, OpCode o, int reg, int k); | ||
| 47 | LUAI_FUNC void luaK_fixline (FuncState *fs, int line); | 52 | LUAI_FUNC void luaK_fixline (FuncState *fs, int line); |
| 48 | LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); | 53 | LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); |
| 49 | LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); | 54 | LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); |