History

Lua 5.1-work6

Lua Team committed 21 years ago

Commit b5301731 parent e684a4d66 files · +1742 −1346Browse files

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

Unified · Split

src/lcode.h+33−33
@@ -1,5 +1,5 @@
11 /*
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 $
33 ** Code generator for Lua
44 ** See Copyright Notice in lua.h
55 */
@@ -24,7 +24,7 @@ · 18 unmodified lines
2424 ** grep "ORDER OPR" if you change these enums
2525 */
2626 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,
2828 OPR_CONCAT,
2929 OPR_NE, OPR_EQ,
3030 OPR_LT, OPR_LE, OPR_GT, OPR_GE,
@@ -34,7 +34,7 @@ typedef enum BinOpr { · 3 unmodified lines
3434
3535 #define binopistest(op) ((op) >= OPR_NE)
3636
37−typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_NOUNOPR } UnOpr;
37+typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_SIZE, OPR_NOUNOPR } UnOpr;
3838
3939
4040 #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
4343
4444 #define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET)
4545
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);
7676
7777
7878 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t