From b08c9079c5ab026f07942fb898f791325d270177 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 9 Jul 2018 12:50:51 -0300 Subject: Opcode names moved to a new header file The array with the names of the opcodes was moved to a header file ('lopnames.h'), as it is not used by the Lua kernel. Files that need that array ('luac.c' and 'ltests.c') include the header file to get a private (static) copy. --- lopcodes.c | 88 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 87 deletions(-) (limited to 'lopcodes.c') diff --git a/lopcodes.c b/lopcodes.c index 823d3485..1a3b0e6a 100644 --- a/lopcodes.c +++ b/lopcodes.c @@ -1,5 +1,5 @@ /* -** $Id: lopcodes.c,v 1.81 2018/04/04 14:23:41 roberto Exp roberto $ +** $Id: lopcodes.c,v 1.83 2018/06/26 18:00:55 roberto Exp $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ @@ -17,92 +17,6 @@ /* ORDER OP */ -#if defined(LUAI_DEFOPNAMES) - -LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = { - "MOVE", - "LOADI", - "LOADF", - "LOADK", - "LOADKX", - "LOADBOOL", - "LOADNIL", - "GETUPVAL", - "SETUPVAL", - "GETTABUP", - "GETTABLE", - "GETI", - "GETFIELD", - "SETTABUP", - "SETTABLE", - "SETI", - "SETFIELD", - "NEWTABLE", - "SELF", - "ADDI", - "SUBI", - "MULI", - "MODI", - "POWI", - "DIVI", - "IDIVI", - "BANDK", - "BORK", - "BXORK", - "SHRI", - "SHLI", - "ADD", - "SUB", - "MUL", - "MOD", - "POW", - "DIV", - "IDIV", - "BAND", - "BOR", - "BXOR", - "SHL", - "SHR", - "UNM", - "BNOT", - "NOT", - "LEN", - "CONCAT", - "CLOSE", - "JMP", - "EQ", - "LT", - "LE", - "EQK", - "EQI", - "LTI", - "LEI", - "GTI", - "GEI", - "TEST", - "TESTSET", - "CALL", - "TAILCALL", - "RETURN", - "RETURN0", - "RETURN1", - "FORLOOP1", - "FORPREP1", - "FORLOOP", - "FORPREP", - "TFORCALL", - "TFORLOOP", - "SETLIST", - "CLOSURE", - "VARARG", - "PREPVARARG", - "EXTRAARG", - NULL -}; - -#endif - - LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { /* OT IT T A mode opcode */ opmode(0, 0, 0, 1, iABC) /* OP_MOVE */ -- cgit v1.2.3-55-g6feb