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 @@
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** 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_POW,27 OPR_ADD, OPR_SUB, OPR_MULT, 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,
@@ -34,7 +34,7 @@ typedef enum BinOpr { · 3 unmodified lines
34 34
35#define binopistest(op) ((op) >= OPR_NE)35#define binopistest(op) ((op) >= OPR_NE)
36 36
37typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_NOUNOPR } UnOpr;37typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_SIZE, 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)->info])
@@ -43,36 +43,36 @@ typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_NOUNOPR } UnOpr; · 2 unmodified lines
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
46int luaK_code (FuncState *fs, Instruction i, int line);46LUAI_FUNC int luaK_code (FuncState *fs, Instruction i, int line);
47int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);47LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);
48int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C);48LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C);
49void luaK_fixline (FuncState *fs, int line);49LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
50void luaK_nil (FuncState *fs, int from, int n);50LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);
51void luaK_reserveregs (FuncState *fs, int n);51LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n);
52void luaK_checkstack (FuncState *fs, int n);52LUAI_FUNC void luaK_checkstack (FuncState *fs, int n);
53int luaK_stringK (FuncState *fs, TString *s);53LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s);
54int luaK_numberK (FuncState *fs, lua_Number r);54LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r);
55void luaK_dischargevars (FuncState *fs, expdesc *e);55LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e);
56int luaK_exp2anyreg (FuncState *fs, expdesc *e);56LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e);
57void luaK_exp2nextreg (FuncState *fs, expdesc *e);57LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e);
58void luaK_exp2val (FuncState *fs, expdesc *e);58LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e);
59int luaK_exp2RK (FuncState *fs, expdesc *e);59LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e);
60void luaK_self (FuncState *fs, expdesc *e, expdesc *key);60LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key);
61void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k);61LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k);
62void luaK_goiftrue (FuncState *fs, expdesc *e);62LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e);
63void luaK_goiffalse (FuncState *fs, expdesc *e);63LUAI_FUNC void luaK_goiffalse (FuncState *fs, expdesc *e);
64void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e);64LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e);
65void luaK_setreturns (FuncState *fs, expdesc *e, int nresults);65LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults);
66void luaK_setoneret (FuncState *fs, expdesc *e);66LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e);
67int luaK_jump (FuncState *fs);67LUAI_FUNC int luaK_jump (FuncState *fs);
68void luaK_patchlist (FuncState *fs, int list, int target);68LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target);
69void luaK_patchtohere (FuncState *fs, int list);69LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list);
70void luaK_concat (FuncState *fs, int *l1, int l2);70LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2);
71int luaK_getlabel (FuncState *fs);71LUAI_FUNC int luaK_getlabel (FuncState *fs);
72void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v);72LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v);
73void luaK_infix (FuncState *fs, BinOpr op, expdesc *v);73LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v);
74void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, expdesc *v2);74LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, expdesc *v2);
75void luaK_setlist (FuncState *fs, int base, int nelems, int tostore);75LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore);
76 76
77 77
78#endif78#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