Showing the changes to src/lcode.h (1 of 39 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.h,v 1.45 2005/08/29 20:49:21 roberto Exp $ | 2 | ** $Id: lcode.h,v 1.47 2005/11/08 19:44:31 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 | */ |
| @@ -24,7 +24,7 @@ · 18 unmodified lines | |||
| 24 | ** grep "ORDER OPR" if you change these enums | 24 | ** grep "ORDER OPR" if you change these enums |
| 25 | */ | 25 | */ |
| 26 | typedef enum BinOpr { | 26 | typedef enum BinOpr { |
| 27 | OPR_ADD, OPR_SUB, OPR_MULT, 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_NE, OPR_EQ, |
| 30 | OPR_LT, OPR_LE, OPR_GT, OPR_GE, | 30 | OPR_LT, OPR_LE, OPR_GT, OPR_GE, |
| @@ -37,13 +37,12 @@ typedef enum BinOpr { · 6 unmodified lines | |||
| 37 | typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; | 37 | typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | #define getcode(fs,e) ((fs)->f->code[(e)->info]) | 40 | #define getcode(fs,e) ((fs)->f->code[(e)->u.s.info]) |
| 41 | 41 | ||
| 42 | #define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) | 42 | #define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) |
| 43 | 43 | ||
| 44 | #define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) | 44 | #define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) |
| 45 | 45 | ||
| 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); | 46 | 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); | 47 | 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); | 48 | LUAI_FUNC void luaK_fixline (FuncState *fs, int line); |
| @@ -60,7 +59,6 @@ LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e); · 10 unmodified lines | |||
| 60 | LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); | 59 | LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); |
| 61 | LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); | 60 | LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); |
| 62 | LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); | 61 | 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); | 62 | LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); |
| 65 | LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); | 63 | LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); |
| 66 | LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); | 64 | LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); |