History

Lua 5.1-beta

Lua Team committed 21 years ago

Commit 27f2ec71 parent 573ffb039 files · +1862 −1502Browse files

Showing the changes to src/lcode.h (1 of 39 files). Show all

Unified · Split

src/lcode.h+3−5
@@ -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 Lua3** Code generator for Lua
4** See Copyright Notice in lua.h4** See Copyright Notice in lua.h
5*/5*/
@@ -24,7 +24,7 @@ · 18 unmodified lines
24** grep "ORDER OPR" if you change these enums24** grep "ORDER OPR" if you change these enums
25*/25*/
26typedef enum BinOpr {26typedef 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
37typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr;37typedef 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
46LUAI_FUNC int luaK_code (FuncState *fs, Instruction i, int line);
47LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);46LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);
48LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C);47LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C);
49LUAI_FUNC void luaK_fixline (FuncState *fs, int line);48LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
@@ -60,7 +59,6 @@ LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e); · 10 unmodified lines
60LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key);59LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key);
61LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k);60LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k);
62LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e);61LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e);
63LUAI_FUNC void luaK_goiffalse (FuncState *fs, expdesc *e);
64LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e);62LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e);
65LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults);63LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults);
66LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e);64LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e);