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