diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-07-09 12:50:51 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-07-09 12:50:51 -0300 |
commit | b08c9079c5ab026f07942fb898f791325d270177 (patch) | |
tree | 8252b2f5b1eb75abc678ab4deead8faf218b9322 /lopnames.h | |
parent | 06e08c6d05b1346df935634be395f4d86035e3ea (diff) | |
download | lua-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 'lopnames.h')
-rw-r--r-- | lopnames.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/lopnames.h b/lopnames.h new file mode 100644 index 00000000..ab434b59 --- /dev/null +++ b/lopnames.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | ** $Id: lopnames.h,v 1.1 2018/06/26 18:00:55 roberto Exp $ | ||
3 | ** Opcode names | ||
4 | ** See Copyright Notice in lua.h | ||
5 | */ | ||
6 | |||
7 | #if !defined(lopnames_h) | ||
8 | #define lopnames_h | ||
9 | |||
10 | /* ORDER OP */ | ||
11 | |||
12 | static const char *const opnames[] = { | ||
13 | "MOVE", | ||
14 | "LOADI", | ||
15 | "LOADF", | ||
16 | "LOADK", | ||
17 | "LOADKX", | ||
18 | "LOADBOOL", | ||
19 | "LOADNIL", | ||
20 | "GETUPVAL", | ||
21 | "SETUPVAL", | ||
22 | "GETTABUP", | ||
23 | "GETTABLE", | ||
24 | "GETI", | ||
25 | "GETFIELD", | ||
26 | "SETTABUP", | ||
27 | "SETTABLE", | ||
28 | "SETI", | ||
29 | "SETFIELD", | ||
30 | "NEWTABLE", | ||
31 | "SELF", | ||
32 | "ADDI", | ||
33 | "SUBI", | ||
34 | "MULI", | ||
35 | "MODI", | ||
36 | "POWI", | ||
37 | "DIVI", | ||
38 | "IDIVI", | ||
39 | "BANDK", | ||
40 | "BORK", | ||
41 | "BXORK", | ||
42 | "SHRI", | ||
43 | "SHLI", | ||
44 | "ADD", | ||
45 | "SUB", | ||
46 | "MUL", | ||
47 | "MOD", | ||
48 | "POW", | ||
49 | "DIV", | ||
50 | "IDIV", | ||
51 | "BAND", | ||
52 | "BOR", | ||
53 | "BXOR", | ||
54 | "SHL", | ||
55 | "SHR", | ||
56 | "UNM", | ||
57 | "BNOT", | ||
58 | "NOT", | ||
59 | "LEN", | ||
60 | "CONCAT", | ||
61 | "CLOSE", | ||
62 | "JMP", | ||
63 | "EQ", | ||
64 | "LT", | ||
65 | "LE", | ||
66 | "EQK", | ||
67 | "EQI", | ||
68 | "LTI", | ||
69 | "LEI", | ||
70 | "GTI", | ||
71 | "GEI", | ||
72 | "TEST", | ||
73 | "TESTSET", | ||
74 | "CALL", | ||
75 | "TAILCALL", | ||
76 | "RETURN", | ||
77 | "RETURN0", | ||
78 | "RETURN1", | ||
79 | "FORLOOP1", | ||
80 | "FORPREP1", | ||
81 | "FORLOOP", | ||
82 | "FORPREP", | ||
83 | "TFORCALL", | ||
84 | "TFORLOOP", | ||
85 | "SETLIST", | ||
86 | "CLOSURE", | ||
87 | "VARARG", | ||
88 | "PREPVARARG", | ||
89 | "EXTRAARG", | ||
90 | NULL | ||
91 | }; | ||
92 | |||
93 | #endif | ||
94 | |||