add cpan/autodie/t/truncate_me to makerel @writables list
[perl.git] / opnames.h
1 /* -*- 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_PADAV         = 10,
28         OP_PADHV         = 11,
29         OP_PADANY        = 12,
30         OP_PUSHRE        = 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_STRINGIFY     = 68,
86         OP_LEFT_SHIFT    = 69,
87         OP_RIGHT_SHIFT   = 70,
88         OP_LT            = 71,
89         OP_I_LT          = 72,
90         OP_GT            = 73,
91         OP_I_GT          = 74,
92         OP_LE            = 75,
93         OP_I_LE          = 76,
94         OP_GE            = 77,
95         OP_I_GE          = 78,
96         OP_EQ            = 79,
97         OP_I_EQ          = 80,
98         OP_NE            = 81,
99         OP_I_NE          = 82,
100         OP_NCMP          = 83,
101         OP_I_NCMP        = 84,
102         OP_SLT           = 85,
103         OP_SGT           = 86,
104         OP_SLE           = 87,
105         OP_SGE           = 88,
106         OP_SEQ           = 89,
107         OP_SNE           = 90,
108         OP_SCMP          = 91,
109         OP_BIT_AND       = 92,
110         OP_BIT_XOR       = 93,
111         OP_BIT_OR        = 94,
112         OP_NEGATE        = 95,
113         OP_I_NEGATE      = 96,
114         OP_NOT           = 97,
115         OP_COMPLEMENT    = 98,
116         OP_SMARTMATCH    = 99,
117         OP_ATAN2         = 100,
118         OP_SIN           = 101,
119         OP_COS           = 102,
120         OP_RAND          = 103,
121         OP_SRAND         = 104,
122         OP_EXP           = 105,
123         OP_LOG           = 106,
124         OP_SQRT          = 107,
125         OP_INT           = 108,
126         OP_HEX           = 109,
127         OP_OCT           = 110,
128         OP_ABS           = 111,
129         OP_LENGTH        = 112,
130         OP_SUBSTR        = 113,
131         OP_VEC           = 114,
132         OP_INDEX         = 115,
133         OP_RINDEX        = 116,
134         OP_SPRINTF       = 117,
135         OP_FORMLINE      = 118,
136         OP_ORD           = 119,
137         OP_CHR           = 120,
138         OP_CRYPT         = 121,
139         OP_UCFIRST       = 122,
140         OP_LCFIRST       = 123,
141         OP_UC            = 124,
142         OP_LC            = 125,
143         OP_QUOTEMETA     = 126,
144         OP_RV2AV         = 127,
145         OP_AELEMFAST     = 128,
146         OP_AELEMFAST_LEX = 129,
147         OP_AELEM         = 130,
148         OP_ASLICE        = 131,
149         OP_AEACH         = 132,
150         OP_AKEYS         = 133,
151         OP_AVALUES       = 134,
152         OP_EACH          = 135,
153         OP_VALUES        = 136,
154         OP_KEYS          = 137,
155         OP_DELETE        = 138,
156         OP_EXISTS        = 139,
157         OP_RV2HV         = 140,
158         OP_HELEM         = 141,
159         OP_HSLICE        = 142,
160         OP_UNPACK        = 143,
161         OP_PACK          = 144,
162         OP_SPLIT         = 145,
163         OP_JOIN          = 146,
164         OP_LIST          = 147,
165         OP_LSLICE        = 148,
166         OP_ANONLIST      = 149,
167         OP_ANONHASH      = 150,
168         OP_SPLICE        = 151,
169         OP_PUSH          = 152,
170         OP_POP           = 153,
171         OP_SHIFT         = 154,
172         OP_UNSHIFT       = 155,
173         OP_SORT          = 156,
174         OP_REVERSE       = 157,
175         OP_GREPSTART     = 158,
176         OP_GREPWHILE     = 159,
177         OP_MAPSTART      = 160,
178         OP_MAPWHILE      = 161,
179         OP_RANGE         = 162,
180         OP_FLIP          = 163,
181         OP_FLOP          = 164,
182         OP_AND           = 165,
183         OP_OR            = 166,
184         OP_XOR           = 167,
185         OP_DOR           = 168,
186         OP_COND_EXPR     = 169,
187         OP_ANDASSIGN     = 170,
188         OP_ORASSIGN      = 171,
189         OP_DORASSIGN     = 172,
190         OP_METHOD        = 173,
191         OP_ENTERSUB      = 174,
192         OP_LEAVESUB      = 175,
193         OP_LEAVESUBLV    = 176,
194         OP_CALLER        = 177,
195         OP_WARN          = 178,
196         OP_DIE           = 179,
197         OP_RESET         = 180,
198         OP_LINESEQ       = 181,
199         OP_NEXTSTATE     = 182,
200         OP_DBSTATE       = 183,
201         OP_UNSTACK       = 184,
202         OP_ENTER         = 185,
203         OP_LEAVE         = 186,
204         OP_SCOPE         = 187,
205         OP_ENTERITER     = 188,
206         OP_ITER          = 189,
207         OP_ENTERLOOP     = 190,
208         OP_LEAVELOOP     = 191,
209         OP_RETURN        = 192,
210         OP_LAST          = 193,
211         OP_NEXT          = 194,
212         OP_REDO          = 195,
213         OP_DUMP          = 196,
214         OP_GOTO          = 197,
215         OP_EXIT          = 198,
216         OP_METHOD_NAMED  = 199,
217         OP_ENTERGIVEN    = 200,
218         OP_LEAVEGIVEN    = 201,
219         OP_ENTERWHEN     = 202,
220         OP_LEAVEWHEN     = 203,
221         OP_BREAK         = 204,
222         OP_CONTINUE      = 205,
223         OP_OPEN          = 206,
224         OP_CLOSE         = 207,
225         OP_PIPE_OP       = 208,
226         OP_FILENO        = 209,
227         OP_UMASK         = 210,
228         OP_BINMODE       = 211,
229         OP_TIE           = 212,
230         OP_UNTIE         = 213,
231         OP_TIED          = 214,
232         OP_DBMOPEN       = 215,
233         OP_DBMCLOSE      = 216,
234         OP_SSELECT       = 217,
235         OP_SELECT        = 218,
236         OP_GETC          = 219,
237         OP_READ          = 220,
238         OP_ENTERWRITE    = 221,
239         OP_LEAVEWRITE    = 222,
240         OP_PRTF          = 223,
241         OP_PRINT         = 224,
242         OP_SAY           = 225,
243         OP_SYSOPEN       = 226,
244         OP_SYSSEEK       = 227,
245         OP_SYSREAD       = 228,
246         OP_SYSWRITE      = 229,
247         OP_EOF           = 230,
248         OP_TELL          = 231,
249         OP_SEEK          = 232,
250         OP_TRUNCATE      = 233,
251         OP_FCNTL         = 234,
252         OP_IOCTL         = 235,
253         OP_FLOCK         = 236,
254         OP_SEND          = 237,
255         OP_RECV          = 238,
256         OP_SOCKET        = 239,
257         OP_SOCKPAIR      = 240,
258         OP_BIND          = 241,
259         OP_CONNECT       = 242,
260         OP_LISTEN        = 243,
261         OP_ACCEPT        = 244,
262         OP_SHUTDOWN      = 245,
263         OP_GSOCKOPT      = 246,
264         OP_SSOCKOPT      = 247,
265         OP_GETSOCKNAME   = 248,
266         OP_GETPEERNAME   = 249,
267         OP_LSTAT         = 250,
268         OP_STAT          = 251,
269         OP_FTRREAD       = 252,
270         OP_FTRWRITE      = 253,
271         OP_FTREXEC       = 254,
272         OP_FTEREAD       = 255,
273         OP_FTEWRITE      = 256,
274         OP_FTEEXEC       = 257,
275         OP_FTIS          = 258,
276         OP_FTSIZE        = 259,
277         OP_FTMTIME       = 260,
278         OP_FTATIME       = 261,
279         OP_FTCTIME       = 262,
280         OP_FTROWNED      = 263,
281         OP_FTEOWNED      = 264,
282         OP_FTZERO        = 265,
283         OP_FTSOCK        = 266,
284         OP_FTCHR         = 267,
285         OP_FTBLK         = 268,
286         OP_FTFILE        = 269,
287         OP_FTDIR         = 270,
288         OP_FTPIPE        = 271,
289         OP_FTSUID        = 272,
290         OP_FTSGID        = 273,
291         OP_FTSVTX        = 274,
292         OP_FTLINK        = 275,
293         OP_FTTTY         = 276,
294         OP_FTTEXT        = 277,
295         OP_FTBINARY      = 278,
296         OP_CHDIR         = 279,
297         OP_CHOWN         = 280,
298         OP_CHROOT        = 281,
299         OP_UNLINK        = 282,
300         OP_CHMOD         = 283,
301         OP_UTIME         = 284,
302         OP_RENAME        = 285,
303         OP_LINK          = 286,
304         OP_SYMLINK       = 287,
305         OP_READLINK      = 288,
306         OP_MKDIR         = 289,
307         OP_RMDIR         = 290,
308         OP_OPEN_DIR      = 291,
309         OP_READDIR       = 292,
310         OP_TELLDIR       = 293,
311         OP_SEEKDIR       = 294,
312         OP_REWINDDIR     = 295,
313         OP_CLOSEDIR      = 296,
314         OP_FORK          = 297,
315         OP_WAIT          = 298,
316         OP_WAITPID       = 299,
317         OP_SYSTEM        = 300,
318         OP_EXEC          = 301,
319         OP_KILL          = 302,
320         OP_GETPPID       = 303,
321         OP_GETPGRP       = 304,
322         OP_SETPGRP       = 305,
323         OP_GETPRIORITY   = 306,
324         OP_SETPRIORITY   = 307,
325         OP_TIME          = 308,
326         OP_TMS           = 309,
327         OP_LOCALTIME     = 310,
328         OP_GMTIME        = 311,
329         OP_ALARM         = 312,
330         OP_SLEEP         = 313,
331         OP_SHMGET        = 314,
332         OP_SHMCTL        = 315,
333         OP_SHMREAD       = 316,
334         OP_SHMWRITE      = 317,
335         OP_MSGGET        = 318,
336         OP_MSGCTL        = 319,
337         OP_MSGSND        = 320,
338         OP_MSGRCV        = 321,
339         OP_SEMOP         = 322,
340         OP_SEMGET        = 323,
341         OP_SEMCTL        = 324,
342         OP_REQUIRE       = 325,
343         OP_DOFILE        = 326,
344         OP_HINTSEVAL     = 327,
345         OP_ENTEREVAL     = 328,
346         OP_LEAVEEVAL     = 329,
347         OP_ENTERTRY      = 330,
348         OP_LEAVETRY      = 331,
349         OP_GHBYNAME      = 332,
350         OP_GHBYADDR      = 333,
351         OP_GHOSTENT      = 334,
352         OP_GNBYNAME      = 335,
353         OP_GNBYADDR      = 336,
354         OP_GNETENT       = 337,
355         OP_GPBYNAME      = 338,
356         OP_GPBYNUMBER    = 339,
357         OP_GPROTOENT     = 340,
358         OP_GSBYNAME      = 341,
359         OP_GSBYPORT      = 342,
360         OP_GSERVENT      = 343,
361         OP_SHOSTENT      = 344,
362         OP_SNETENT       = 345,
363         OP_SPROTOENT     = 346,
364         OP_SSERVENT      = 347,
365         OP_EHOSTENT      = 348,
366         OP_ENETENT       = 349,
367         OP_EPROTOENT     = 350,
368         OP_ESERVENT      = 351,
369         OP_GPWNAM        = 352,
370         OP_GPWUID        = 353,
371         OP_GPWENT        = 354,
372         OP_SPWENT        = 355,
373         OP_EPWENT        = 356,
374         OP_GGRNAM        = 357,
375         OP_GGRGID        = 358,
376         OP_GGRENT        = 359,
377         OP_SGRENT        = 360,
378         OP_EGRENT        = 361,
379         OP_GETLOGIN      = 362,
380         OP_SYSCALL       = 363,
381         OP_LOCK          = 364,
382         OP_ONCE          = 365,
383         OP_CUSTOM        = 366,
384         OP_REACH         = 367,
385         OP_RKEYS         = 368,
386         OP_RVALUES       = 369,
387         OP_COREARGS      = 370,
388         OP_RUNCV         = 371,
389         OP_FC            = 372,
390         OP_PADCV         = 373,
391         OP_INTROCV       = 374,
392         OP_CLONECV       = 375,
393         OP_PADRANGE      = 376,
394         OP_max          
395 } opcode;
396
397 #define MAXO 377
398 #define OP_FREED MAXO
399
400 /* the OP_IS_* macros are optimized to a simple range check because
401     all the member OPs are contiguous in regen/opcodes table.
402     opcode.pl verifies the range contiguity, or generates an OR-equals
403     expression */
404
405 #define OP_IS_SOCKET(op)        \
406         ((op) >= OP_SEND && (op) <= OP_GETPEERNAME)
407
408 #define OP_IS_FILETEST(op)      \
409         ((op) >= OP_FTRREAD && (op) <= OP_FTBINARY)
410
411 #define OP_IS_FILETEST_ACCESS(op)       \
412         ((op) >= OP_FTRREAD && (op) <= OP_FTEEXEC)
413
414 #define OP_IS_NUMCOMPARE(op)    \
415         ((op) >= OP_LT && (op) <= OP_I_NCMP)
416
417 #define OP_IS_DIRHOP(op)        \
418         ((op) >= OP_READDIR && (op) <= OP_CLOSEDIR)
419
420 /* ex: set ro: */