diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-19 17:06:52 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-19 17:06:52 -0200 |
| commit | 062e809e542ec066986c4e3e054f95e1bfc0cb50 (patch) | |
| tree | 5663d1961cb5253f4261dc3df7d3ac3c9a18f6a1 /lopcodes.c | |
| parent | b4c18248247d84a3acffc020b09d1637dd2990c6 (diff) | |
| download | lua-062e809e542ec066986c4e3e054f95e1bfc0cb50.tar.gz lua-062e809e542ec066986c4e3e054f95e1bfc0cb50.tar.bz2 lua-062e809e542ec066986c4e3e054f95e1bfc0cb50.zip | |
new macros 'LUAI_DDEC'/'LUAI_DDEF' to better control declarations and
definitions of non-static variables
Diffstat (limited to 'lopcodes.c')
| -rw-r--r-- | lopcodes.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lopcodes.c,v 1.39 2008/04/02 16:16:06 roberto Exp roberto $ | 2 | ** $Id: lopcodes.c,v 1.40 2008/10/30 15:39:30 roberto Exp roberto $ |
| 3 | ** See Copyright Notice in lua.h | 3 | ** See Copyright Notice in lua.h |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | /* ORDER OP */ | 14 | /* ORDER OP */ |
| 15 | 15 | ||
| 16 | const char *const luaP_opnames[NUM_OPCODES+1] = { | 16 | LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = { |
| 17 | "MOVE", | 17 | "MOVE", |
| 18 | "LOADK", | 18 | "LOADK", |
| 19 | "LOADBOOL", | 19 | "LOADBOOL", |
| @@ -60,7 +60,7 @@ const char *const luaP_opnames[NUM_OPCODES+1] = { | |||
| 60 | 60 | ||
| 61 | #define opmode(t,a,b,c,m) (((t)<<7) | ((a)<<6) | ((b)<<4) | ((c)<<2) | (m)) | 61 | #define opmode(t,a,b,c,m) (((t)<<7) | ((a)<<6) | ((b)<<4) | ((c)<<2) | (m)) |
| 62 | 62 | ||
| 63 | const lu_byte luaP_opmodes[NUM_OPCODES] = { | 63 | LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { |
| 64 | /* T A B C mode opcode */ | 64 | /* T A B C mode opcode */ |
| 65 | opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_MOVE */ | 65 | opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_MOVE */ |
| 66 | ,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_LOADK */ | 66 | ,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_LOADK */ |
