xref: /openbsd/gnu/usr.bin/perl/opnames.h (revision e0680481)
1 /* -*- mode: C; buffer-read-only: t -*-
2  *
3  *    opnames.h
4  *
5  *    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
6  *    2008 by Larry Wall and others
7  *
8  *    You may distribute under the terms of either the GNU General Public
9  *    License or the Artistic License, as specified in the README file.
10  *
11  * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
12  * This file is built by regen/opcode.pl from its data.
13  * Any changes made here will be lost!
14  */
15 
16 typedef enum opcode {
17 	OP_NULL		 = 0,
18 	OP_STUB		 = 1,
19 	OP_SCALAR	 = 2,
20 	OP_PUSHMARK	 = 3,
21 	OP_WANTARRAY	 = 4,
22 	OP_CONST	 = 5,
23 	OP_GVSV		 = 6,
24 	OP_GV		 = 7,
25 	OP_GELEM	 = 8,
26 	OP_PADSV	 = 9,
27 	OP_PADSV_STORE	 = 10,
28 	OP_PADAV	 = 11,
29 	OP_PADHV	 = 12,
30 	OP_PADANY	 = 13,
31 	OP_RV2GV	 = 14,
32 	OP_RV2SV	 = 15,
33 	OP_AV2ARYLEN	 = 16,
34 	OP_RV2CV	 = 17,
35 	OP_ANONCODE	 = 18,
36 	OP_PROTOTYPE	 = 19,
37 	OP_REFGEN	 = 20,
38 	OP_SREFGEN	 = 21,
39 	OP_REF		 = 22,
40 	OP_BLESS	 = 23,
41 	OP_BACKTICK	 = 24,
42 	OP_GLOB		 = 25,
43 	OP_READLINE	 = 26,
44 	OP_RCATLINE	 = 27,
45 	OP_REGCMAYBE	 = 28,
46 	OP_REGCRESET	 = 29,
47 	OP_REGCOMP	 = 30,
48 	OP_MATCH	 = 31,
49 	OP_QR		 = 32,
50 	OP_SUBST	 = 33,
51 	OP_SUBSTCONT	 = 34,
52 	OP_TRANS	 = 35,
53 	OP_TRANSR	 = 36,
54 	OP_SASSIGN	 = 37,
55 	OP_AASSIGN	 = 38,
56 	OP_CHOP		 = 39,
57 	OP_SCHOP	 = 40,
58 	OP_CHOMP	 = 41,
59 	OP_SCHOMP	 = 42,
60 	OP_DEFINED	 = 43,
61 	OP_UNDEF	 = 44,
62 	OP_STUDY	 = 45,
63 	OP_POS		 = 46,
64 	OP_PREINC	 = 47,
65 	OP_I_PREINC	 = 48,
66 	OP_PREDEC	 = 49,
67 	OP_I_PREDEC	 = 50,
68 	OP_POSTINC	 = 51,
69 	OP_I_POSTINC	 = 52,
70 	OP_POSTDEC	 = 53,
71 	OP_I_POSTDEC	 = 54,
72 	OP_POW		 = 55,
73 	OP_MULTIPLY	 = 56,
74 	OP_I_MULTIPLY	 = 57,
75 	OP_DIVIDE	 = 58,
76 	OP_I_DIVIDE	 = 59,
77 	OP_MODULO	 = 60,
78 	OP_I_MODULO	 = 61,
79 	OP_REPEAT	 = 62,
80 	OP_ADD		 = 63,
81 	OP_I_ADD	 = 64,
82 	OP_SUBTRACT	 = 65,
83 	OP_I_SUBTRACT	 = 66,
84 	OP_CONCAT	 = 67,
85 	OP_MULTICONCAT	 = 68,
86 	OP_STRINGIFY	 = 69,
87 	OP_LEFT_SHIFT	 = 70,
88 	OP_RIGHT_SHIFT	 = 71,
89 	OP_LT		 = 72,
90 	OP_I_LT		 = 73,
91 	OP_GT		 = 74,
92 	OP_I_GT		 = 75,
93 	OP_LE		 = 76,
94 	OP_I_LE		 = 77,
95 	OP_GE		 = 78,
96 	OP_I_GE		 = 79,
97 	OP_EQ		 = 80,
98 	OP_I_EQ		 = 81,
99 	OP_NE		 = 82,
100 	OP_I_NE		 = 83,
101 	OP_NCMP		 = 84,
102 	OP_I_NCMP	 = 85,
103 	OP_SLT		 = 86,
104 	OP_SGT		 = 87,
105 	OP_SLE		 = 88,
106 	OP_SGE		 = 89,
107 	OP_SEQ		 = 90,
108 	OP_SNE		 = 91,
109 	OP_SCMP		 = 92,
110 	OP_BIT_AND	 = 93,
111 	OP_BIT_XOR	 = 94,
112 	OP_BIT_OR	 = 95,
113 	OP_NBIT_AND	 = 96,
114 	OP_NBIT_XOR	 = 97,
115 	OP_NBIT_OR	 = 98,
116 	OP_SBIT_AND	 = 99,
117 	OP_SBIT_XOR	 = 100,
118 	OP_SBIT_OR	 = 101,
119 	OP_NEGATE	 = 102,
120 	OP_I_NEGATE	 = 103,
121 	OP_NOT		 = 104,
122 	OP_COMPLEMENT	 = 105,
123 	OP_NCOMPLEMENT	 = 106,
124 	OP_SCOMPLEMENT	 = 107,
125 	OP_SMARTMATCH	 = 108,
126 	OP_ATAN2	 = 109,
127 	OP_SIN		 = 110,
128 	OP_COS		 = 111,
129 	OP_RAND		 = 112,
130 	OP_SRAND	 = 113,
131 	OP_EXP		 = 114,
132 	OP_LOG		 = 115,
133 	OP_SQRT		 = 116,
134 	OP_INT		 = 117,
135 	OP_HEX		 = 118,
136 	OP_OCT		 = 119,
137 	OP_ABS		 = 120,
138 	OP_LENGTH	 = 121,
139 	OP_SUBSTR	 = 122,
140 	OP_VEC		 = 123,
141 	OP_INDEX	 = 124,
142 	OP_RINDEX	 = 125,
143 	OP_SPRINTF	 = 126,
144 	OP_FORMLINE	 = 127,
145 	OP_ORD		 = 128,
146 	OP_CHR		 = 129,
147 	OP_CRYPT	 = 130,
148 	OP_UCFIRST	 = 131,
149 	OP_LCFIRST	 = 132,
150 	OP_UC		 = 133,
151 	OP_LC		 = 134,
152 	OP_QUOTEMETA	 = 135,
153 	OP_RV2AV	 = 136,
154 	OP_AELEMFAST	 = 137,
155 	OP_AELEMFAST_LEX = 138,
156 	OP_AELEMFASTLEX_STORE = 139,
157 	OP_AELEM	 = 140,
158 	OP_ASLICE	 = 141,
159 	OP_KVASLICE	 = 142,
160 	OP_AEACH	 = 143,
161 	OP_AVALUES	 = 144,
162 	OP_AKEYS	 = 145,
163 	OP_EACH		 = 146,
164 	OP_VALUES	 = 147,
165 	OP_KEYS		 = 148,
166 	OP_DELETE	 = 149,
167 	OP_EXISTS	 = 150,
168 	OP_RV2HV	 = 151,
169 	OP_HELEM	 = 152,
170 	OP_HSLICE	 = 153,
171 	OP_KVHSLICE	 = 154,
172 	OP_MULTIDEREF	 = 155,
173 	OP_UNPACK	 = 156,
174 	OP_PACK		 = 157,
175 	OP_SPLIT	 = 158,
176 	OP_JOIN		 = 159,
177 	OP_LIST		 = 160,
178 	OP_LSLICE	 = 161,
179 	OP_ANONLIST	 = 162,
180 	OP_ANONHASH	 = 163,
181 	OP_EMPTYAVHV	 = 164,
182 	OP_SPLICE	 = 165,
183 	OP_PUSH		 = 166,
184 	OP_POP		 = 167,
185 	OP_SHIFT	 = 168,
186 	OP_UNSHIFT	 = 169,
187 	OP_SORT		 = 170,
188 	OP_REVERSE	 = 171,
189 	OP_GREPSTART	 = 172,
190 	OP_GREPWHILE	 = 173,
191 	OP_MAPSTART	 = 174,
192 	OP_MAPWHILE	 = 175,
193 	OP_RANGE	 = 176,
194 	OP_FLIP		 = 177,
195 	OP_FLOP		 = 178,
196 	OP_AND		 = 179,
197 	OP_OR		 = 180,
198 	OP_XOR		 = 181,
199 	OP_DOR		 = 182,
200 	OP_COND_EXPR	 = 183,
201 	OP_ANDASSIGN	 = 184,
202 	OP_ORASSIGN	 = 185,
203 	OP_DORASSIGN	 = 186,
204 	OP_ENTERSUB	 = 187,
205 	OP_LEAVESUB	 = 188,
206 	OP_LEAVESUBLV	 = 189,
207 	OP_ARGCHECK	 = 190,
208 	OP_ARGELEM	 = 191,
209 	OP_ARGDEFELEM	 = 192,
210 	OP_CALLER	 = 193,
211 	OP_WARN		 = 194,
212 	OP_DIE		 = 195,
213 	OP_RESET	 = 196,
214 	OP_LINESEQ	 = 197,
215 	OP_NEXTSTATE	 = 198,
216 	OP_DBSTATE	 = 199,
217 	OP_UNSTACK	 = 200,
218 	OP_ENTER	 = 201,
219 	OP_LEAVE	 = 202,
220 	OP_SCOPE	 = 203,
221 	OP_ENTERITER	 = 204,
222 	OP_ITER		 = 205,
223 	OP_ENTERLOOP	 = 206,
224 	OP_LEAVELOOP	 = 207,
225 	OP_RETURN	 = 208,
226 	OP_LAST		 = 209,
227 	OP_NEXT		 = 210,
228 	OP_REDO		 = 211,
229 	OP_DUMP		 = 212,
230 	OP_GOTO		 = 213,
231 	OP_EXIT		 = 214,
232 	OP_METHOD	 = 215,
233 	OP_METHOD_NAMED	 = 216,
234 	OP_METHOD_SUPER	 = 217,
235 	OP_METHOD_REDIR	 = 218,
236 	OP_METHOD_REDIR_SUPER = 219,
237 	OP_ENTERGIVEN	 = 220,
238 	OP_LEAVEGIVEN	 = 221,
239 	OP_ENTERWHEN	 = 222,
240 	OP_LEAVEWHEN	 = 223,
241 	OP_BREAK	 = 224,
242 	OP_CONTINUE	 = 225,
243 	OP_OPEN		 = 226,
244 	OP_CLOSE	 = 227,
245 	OP_PIPE_OP	 = 228,
246 	OP_FILENO	 = 229,
247 	OP_UMASK	 = 230,
248 	OP_BINMODE	 = 231,
249 	OP_TIE		 = 232,
250 	OP_UNTIE	 = 233,
251 	OP_TIED		 = 234,
252 	OP_DBMOPEN	 = 235,
253 	OP_DBMCLOSE	 = 236,
254 	OP_SSELECT	 = 237,
255 	OP_SELECT	 = 238,
256 	OP_GETC		 = 239,
257 	OP_READ		 = 240,
258 	OP_ENTERWRITE	 = 241,
259 	OP_LEAVEWRITE	 = 242,
260 	OP_PRTF		 = 243,
261 	OP_PRINT	 = 244,
262 	OP_SAY		 = 245,
263 	OP_SYSOPEN	 = 246,
264 	OP_SYSSEEK	 = 247,
265 	OP_SYSREAD	 = 248,
266 	OP_SYSWRITE	 = 249,
267 	OP_EOF		 = 250,
268 	OP_TELL		 = 251,
269 	OP_SEEK		 = 252,
270 	OP_TRUNCATE	 = 253,
271 	OP_FCNTL	 = 254,
272 	OP_IOCTL	 = 255,
273 	OP_FLOCK	 = 256,
274 	OP_SEND		 = 257,
275 	OP_RECV		 = 258,
276 	OP_SOCKET	 = 259,
277 	OP_SOCKPAIR	 = 260,
278 	OP_BIND		 = 261,
279 	OP_CONNECT	 = 262,
280 	OP_LISTEN	 = 263,
281 	OP_ACCEPT	 = 264,
282 	OP_SHUTDOWN	 = 265,
283 	OP_GSOCKOPT	 = 266,
284 	OP_SSOCKOPT	 = 267,
285 	OP_GETSOCKNAME	 = 268,
286 	OP_GETPEERNAME	 = 269,
287 	OP_LSTAT	 = 270,
288 	OP_STAT		 = 271,
289 	OP_FTRREAD	 = 272,
290 	OP_FTRWRITE	 = 273,
291 	OP_FTREXEC	 = 274,
292 	OP_FTEREAD	 = 275,
293 	OP_FTEWRITE	 = 276,
294 	OP_FTEEXEC	 = 277,
295 	OP_FTIS		 = 278,
296 	OP_FTSIZE	 = 279,
297 	OP_FTMTIME	 = 280,
298 	OP_FTATIME	 = 281,
299 	OP_FTCTIME	 = 282,
300 	OP_FTROWNED	 = 283,
301 	OP_FTEOWNED	 = 284,
302 	OP_FTZERO	 = 285,
303 	OP_FTSOCK	 = 286,
304 	OP_FTCHR	 = 287,
305 	OP_FTBLK	 = 288,
306 	OP_FTFILE	 = 289,
307 	OP_FTDIR	 = 290,
308 	OP_FTPIPE	 = 291,
309 	OP_FTSUID	 = 292,
310 	OP_FTSGID	 = 293,
311 	OP_FTSVTX	 = 294,
312 	OP_FTLINK	 = 295,
313 	OP_FTTTY	 = 296,
314 	OP_FTTEXT	 = 297,
315 	OP_FTBINARY	 = 298,
316 	OP_CHDIR	 = 299,
317 	OP_CHOWN	 = 300,
318 	OP_CHROOT	 = 301,
319 	OP_UNLINK	 = 302,
320 	OP_CHMOD	 = 303,
321 	OP_UTIME	 = 304,
322 	OP_RENAME	 = 305,
323 	OP_LINK		 = 306,
324 	OP_SYMLINK	 = 307,
325 	OP_READLINK	 = 308,
326 	OP_MKDIR	 = 309,
327 	OP_RMDIR	 = 310,
328 	OP_OPEN_DIR	 = 311,
329 	OP_READDIR	 = 312,
330 	OP_TELLDIR	 = 313,
331 	OP_SEEKDIR	 = 314,
332 	OP_REWINDDIR	 = 315,
333 	OP_CLOSEDIR	 = 316,
334 	OP_FORK		 = 317,
335 	OP_WAIT		 = 318,
336 	OP_WAITPID	 = 319,
337 	OP_SYSTEM	 = 320,
338 	OP_EXEC		 = 321,
339 	OP_KILL		 = 322,
340 	OP_GETPPID	 = 323,
341 	OP_GETPGRP	 = 324,
342 	OP_SETPGRP	 = 325,
343 	OP_GETPRIORITY	 = 326,
344 	OP_SETPRIORITY	 = 327,
345 	OP_TIME		 = 328,
346 	OP_TMS		 = 329,
347 	OP_LOCALTIME	 = 330,
348 	OP_GMTIME	 = 331,
349 	OP_ALARM	 = 332,
350 	OP_SLEEP	 = 333,
351 	OP_SHMGET	 = 334,
352 	OP_SHMCTL	 = 335,
353 	OP_SHMREAD	 = 336,
354 	OP_SHMWRITE	 = 337,
355 	OP_MSGGET	 = 338,
356 	OP_MSGCTL	 = 339,
357 	OP_MSGSND	 = 340,
358 	OP_MSGRCV	 = 341,
359 	OP_SEMOP	 = 342,
360 	OP_SEMGET	 = 343,
361 	OP_SEMCTL	 = 344,
362 	OP_REQUIRE	 = 345,
363 	OP_DOFILE	 = 346,
364 	OP_HINTSEVAL	 = 347,
365 	OP_ENTEREVAL	 = 348,
366 	OP_LEAVEEVAL	 = 349,
367 	OP_ENTERTRY	 = 350,
368 	OP_LEAVETRY	 = 351,
369 	OP_GHBYNAME	 = 352,
370 	OP_GHBYADDR	 = 353,
371 	OP_GHOSTENT	 = 354,
372 	OP_GNBYNAME	 = 355,
373 	OP_GNBYADDR	 = 356,
374 	OP_GNETENT	 = 357,
375 	OP_GPBYNAME	 = 358,
376 	OP_GPBYNUMBER	 = 359,
377 	OP_GPROTOENT	 = 360,
378 	OP_GSBYNAME	 = 361,
379 	OP_GSBYPORT	 = 362,
380 	OP_GSERVENT	 = 363,
381 	OP_SHOSTENT	 = 364,
382 	OP_SNETENT	 = 365,
383 	OP_SPROTOENT	 = 366,
384 	OP_SSERVENT	 = 367,
385 	OP_EHOSTENT	 = 368,
386 	OP_ENETENT	 = 369,
387 	OP_EPROTOENT	 = 370,
388 	OP_ESERVENT	 = 371,
389 	OP_GPWNAM	 = 372,
390 	OP_GPWUID	 = 373,
391 	OP_GPWENT	 = 374,
392 	OP_SPWENT	 = 375,
393 	OP_EPWENT	 = 376,
394 	OP_GGRNAM	 = 377,
395 	OP_GGRGID	 = 378,
396 	OP_GGRENT	 = 379,
397 	OP_SGRENT	 = 380,
398 	OP_EGRENT	 = 381,
399 	OP_GETLOGIN	 = 382,
400 	OP_SYSCALL	 = 383,
401 	OP_LOCK		 = 384,
402 	OP_ONCE		 = 385,
403 	OP_CUSTOM	 = 386,
404 	OP_COREARGS	 = 387,
405 	OP_AVHVSWITCH	 = 388,
406 	OP_RUNCV	 = 389,
407 	OP_FC		 = 390,
408 	OP_PADCV	 = 391,
409 	OP_INTROCV	 = 392,
410 	OP_CLONECV	 = 393,
411 	OP_PADRANGE	 = 394,
412 	OP_REFASSIGN	 = 395,
413 	OP_LVREF	 = 396,
414 	OP_LVREFSLICE	 = 397,
415 	OP_LVAVREF	 = 398,
416 	OP_ANONCONST	 = 399,
417 	OP_ISA		 = 400,
418 	OP_CMPCHAIN_AND	 = 401,
419 	OP_CMPCHAIN_DUP	 = 402,
420 	OP_ENTERTRYCATCH = 403,
421 	OP_LEAVETRYCATCH = 404,
422 	OP_POPTRY	 = 405,
423 	OP_CATCH	 = 406,
424 	OP_PUSHDEFER	 = 407,
425 	OP_IS_BOOL	 = 408,
426 	OP_IS_WEAK	 = 409,
427 	OP_WEAKEN	 = 410,
428 	OP_UNWEAKEN	 = 411,
429 	OP_BLESSED	 = 412,
430 	OP_REFADDR	 = 413,
431 	OP_REFTYPE	 = 414,
432 	OP_CEIL		 = 415,
433 	OP_FLOOR	 = 416,
434 	OP_IS_TAINTED	 = 417,
435 	OP_HELEMEXISTSOR = 418,
436 	OP_METHSTART	 = 419,
437 	OP_INITFIELD	 = 420,
438 	OP_max
439 } opcode;
440 
441 #define MAXO 421
442 #define OP_FREED MAXO
443 
444 /* the OP_IS_* macros are optimized to a simple range check because
445     all the member OPs are contiguous in regen/opcodes table.
446     opcode.pl verifies the range contiguity, or generates an OR-equals
447     expression */
448 
449 #define OP_IS_SOCKET(op)   \
450 	((op) >= OP_SEND && (op) <= OP_GETPEERNAME)
451 
452 #define OP_IS_FILETEST(op)   \
453 	((op) >= OP_FTRREAD && (op) <= OP_FTBINARY)
454 
455 #define OP_IS_FILETEST_ACCESS(op)   \
456 	((op) >= OP_FTRREAD && (op) <= OP_FTEEXEC)
457 
458 #define OP_IS_NUMCOMPARE(op)   \
459 	((op) >= OP_LT && (op) <= OP_I_NCMP)
460 
461 #define OP_IS_DIRHOP(op)   \
462 	((op) >= OP_READDIR && (op) <= OP_CLOSEDIR)
463 
464 #define OP_IS_INFIX_BIT(op)   \
465 	((op) >= OP_BIT_AND && (op) <= OP_SBIT_OR)
466 
467 /* ex: set ro ft=c: */
468