1
0
mirror of https://github.com/lua/lua.git synced 2025-01-28 06:03:00 +08:00

no need to define 'luaP_opnames' in regular builds

This commit is contained in:
Roberto Ierusalimschy 2018-04-19 12:42:41 -03:00
parent f9c3d6fdbe
commit 26eb144541
2 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/* /*
** $Id: lopcodes.c,v 1.80 2018/03/07 15:55:38 roberto Exp roberto $ ** $Id: lopcodes.c,v 1.81 2018/04/04 14:23:41 roberto Exp roberto $
** Opcodes for Lua virtual machine ** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -17,6 +17,8 @@
/* ORDER OP */ /* ORDER OP */
#if defined(LUAI_DEFOPNAMES)
LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = { LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
"MOVE", "MOVE",
"LOADI", "LOADI",
@ -98,6 +100,8 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
NULL NULL
}; };
#endif
LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
/* OT IT T A mode opcode */ /* OT IT T A mode opcode */

View File

@ -1,5 +1,5 @@
/* /*
** $Id: ltests.h,v 2.56 2018/02/27 18:47:32 roberto Exp roberto $ ** $Id: ltests.h,v 2.57 2018/04/11 16:49:36 roberto Exp roberto $
** Internal Header for Debugging of the Lua Implementation ** Internal Header for Debugging of the Lua Implementation
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -24,6 +24,10 @@
#define lua_assert(c) assert(c) #define lua_assert(c) assert(c)
/* include opcode names */
#define LUAI_DEFOPNAMES
/* compiled with -O0, Lua uses a lot of C stack space... */ /* compiled with -O0, Lua uses a lot of C stack space... */
#undef LUAI_MAXCCALLS #undef LUAI_MAXCCALLS
#define LUAI_MAXCCALLS 200 #define LUAI_MAXCCALLS 200