aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-07-09 12:50:51 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-07-09 12:50:51 -0300
commitb08c9079c5ab026f07942fb898f791325d270177 (patch)
tree8252b2f5b1eb75abc678ab4deead8faf218b9322 /lopcodes.c
parent06e08c6d05b1346df935634be395f4d86035e3ea (diff)
downloadlua-b08c9079c5ab026f07942fb898f791325d270177.tar.gz
lua-b08c9079c5ab026f07942fb898f791325d270177.tar.bz2
lua-b08c9079c5ab026f07942fb898f791325d270177.zip
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.
Diffstat (limited to 'lopcodes.c')
-rw-r--r--lopcodes.c88
1 files changed, 1 insertions, 87 deletions
diff --git a/lopcodes.c b/lopcodes.c
index 823d3485..1a3b0e6a 100644
--- a/lopcodes.c
+++ b/lopcodes.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.c,v 1.81 2018/04/04 14:23:41 roberto Exp roberto $ 2** $Id: lopcodes.c,v 1.83 2018/06/26 18:00:55 roberto Exp $
3** Opcodes for Lua virtual machine 3** Opcodes for Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -17,92 +17,6 @@
17 17
18/* ORDER OP */ 18/* ORDER OP */
19 19
20#if defined(LUAI_DEFOPNAMES)
21
22LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
23 "MOVE",
24 "LOADI",
25 "LOADF",
26 "LOADK",
27 "LOADKX",
28 "LOADBOOL",
29 "LOADNIL",
30 "GETUPVAL",
31 "SETUPVAL",
32 "GETTABUP",
33 "GETTABLE",
34 "GETI",
35 "GETFIELD",
36 "SETTABUP",
37 "SETTABLE",
38 "SETI",
39 "SETFIELD",
40 "NEWTABLE",
41 "SELF",
42 "ADDI",
43 "SUBI",
44 "MULI",
45 "MODI",
46 "POWI",
47 "DIVI",
48 "IDIVI",
49 "BANDK",
50 "BORK",
51 "BXORK",
52 "SHRI",
53 "SHLI",
54 "ADD",
55 "SUB",
56 "MUL",
57 "MOD",
58 "POW",
59 "DIV",
60 "IDIV",
61 "BAND",
62 "BOR",
63 "BXOR",
64 "SHL",
65 "SHR",
66 "UNM",
67 "BNOT",
68 "NOT",
69 "LEN",
70 "CONCAT",
71 "CLOSE",
72 "JMP",
73 "EQ",
74 "LT",
75 "LE",
76 "EQK",
77 "EQI",
78 "LTI",
79 "LEI",
80 "GTI",
81 "GEI",
82 "TEST",
83 "TESTSET",
84 "CALL",
85 "TAILCALL",
86 "RETURN",
87 "RETURN0",
88 "RETURN1",
89 "FORLOOP1",
90 "FORPREP1",
91 "FORLOOP",
92 "FORPREP",
93 "TFORCALL",
94 "TFORLOOP",
95 "SETLIST",
96 "CLOSURE",
97 "VARARG",
98 "PREPVARARG",
99 "EXTRAARG",
100 NULL
101};
102
103#endif
104
105
106LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { 20LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
107/* OT IT T A mode opcode */ 21/* OT IT T A mode opcode */
108 opmode(0, 0, 0, 1, iABC) /* OP_MOVE */ 22 opmode(0, 0, 0, 1, iABC) /* OP_MOVE */