Ruby  2.5.0dev(2017-10-22revision60238)
id.h
Go to the documentation of this file.
1 /* DO NOT EDIT THIS FILE DIRECTLY */
2 /**********************************************************************
3 
4  id.h -
5 
6  $Author$
7  created at: Sun Oct 19 21:12:51 2008
8 
9  Copyright (C) 2007 Koichi Sasada
10 
11 **********************************************************************/
12 
13 #ifndef RUBY_ID_H
14 #define RUBY_ID_H
15 
18  RUBY_ID_LOCAL = 0x00,
19  RUBY_ID_INSTANCE = (0x01<<1),
20  RUBY_ID_GLOBAL = (0x03<<1),
21  RUBY_ID_ATTRSET = (0x04<<1),
22  RUBY_ID_CONST = (0x05<<1),
23  RUBY_ID_CLASS = (0x06<<1),
24  RUBY_ID_JUNK = (0x07<<1),
28 };
29 
30 #define ID_STATIC_SYM RUBY_ID_STATIC_SYM
31 #define ID_SCOPE_SHIFT RUBY_ID_SCOPE_SHIFT
32 #define ID_SCOPE_MASK RUBY_ID_SCOPE_MASK
33 #define ID_LOCAL RUBY_ID_LOCAL
34 #define ID_INSTANCE RUBY_ID_INSTANCE
35 #define ID_GLOBAL RUBY_ID_GLOBAL
36 #define ID_ATTRSET RUBY_ID_ATTRSET
37 #define ID_CONST RUBY_ID_CONST
38 #define ID_CLASS RUBY_ID_CLASS
39 #define ID_JUNK RUBY_ID_JUNK
40 #define ID_INTERNAL RUBY_ID_INTERNAL
41 
42 #define symIFUNC ID2SYM(idIFUNC)
43 #define symCFUNC ID2SYM(idCFUNC)
44 
45 #define RUBY_TOKEN_DOT2 128
46 #define RUBY_TOKEN_DOT3 129
47 #define RUBY_TOKEN_UPLUS 130
48 #define RUBY_TOKEN_UMINUS 131
49 #define RUBY_TOKEN_POW 132
50 #define RUBY_TOKEN_CMP 133
51 #define RUBY_TOKEN_LSHFT 134
52 #define RUBY_TOKEN_RSHFT 135
53 #define RUBY_TOKEN_LEQ 136
54 #define RUBY_TOKEN_GEQ 137
55 #define RUBY_TOKEN_EQ 138
56 #define RUBY_TOKEN_EQQ 139
57 #define RUBY_TOKEN_NEQ 140
58 #define RUBY_TOKEN_MATCH 141
59 #define RUBY_TOKEN_NMATCH 142
60 #define RUBY_TOKEN_AREF 143
61 #define RUBY_TOKEN_ASET 144
62 #define RUBY_TOKEN_COLON2 145
63 #define RUBY_TOKEN_ANDOP 146
64 #define RUBY_TOKEN_OROP 147
65 #define RUBY_TOKEN_ANDDOT 148
66 #define RUBY_TOKEN(t) RUBY_TOKEN_##t
67 
68 #define RUBY_TOKEN2ID_TYPE(tok, type) ((tok<<RUBY_ID_SCOPE_SHIFT)|type|RUBY_ID_STATIC_SYM)
69 #define TOKEN2LOCALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_LOCAL)
70 #define TOKEN2INSTANCEID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_INSTANCE)
71 #define TOKEN2GLOBALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_GLOBAL)
72 #define TOKEN2CONSTID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CONST)
73 #define TOKEN2CLASSID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CLASS)
74 #define TOKEN2ATTRSETID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_ATTRSET)
75 
77  idDot2 = RUBY_TOKEN(DOT2),
78  idDot3 = RUBY_TOKEN(DOT3),
79  idUPlus = RUBY_TOKEN(UPLUS),
80  idUMinus = RUBY_TOKEN(UMINUS),
81  idPow = RUBY_TOKEN(POW),
82  idCmp = RUBY_TOKEN(CMP),
83  idPLUS = '+',
84  idMINUS = '-',
85  idMULT = '*',
86  idDIV = '/',
87  idMOD = '%',
88  idLTLT = RUBY_TOKEN(LSHFT),
89  idGTGT = RUBY_TOKEN(RSHFT),
90  idLT = '<',
91  idLE = RUBY_TOKEN(LEQ),
92  idGT = '>',
93  idGE = RUBY_TOKEN(GEQ),
95  idEqq = RUBY_TOKEN(EQQ),
96  idNeq = RUBY_TOKEN(NEQ),
97  idNot = '!',
98  idBackquote = '`',
103  idCOLON2 = RUBY_TOKEN(COLON2),
104  idANDOP = RUBY_TOKEN(ANDOP),
106  idANDDOT = RUBY_TOKEN(ANDDOT),
190 #define DEFINE_LOCALID_FROM_TOKEN(n) id##n = TOKEN2LOCALID(t##n)
194  DEFINE_LOCALID_FROM_TOKEN(Inspect),
196  DEFINE_LOCALID_FROM_TOKEN(Object_id),
197  DEFINE_LOCALID_FROM_TOKEN(Const_missing),
198  DEFINE_LOCALID_FROM_TOKEN(MethodMissing),
199  DEFINE_LOCALID_FROM_TOKEN(Method_added),
200  DEFINE_LOCALID_FROM_TOKEN(Singleton_method_added),
201  DEFINE_LOCALID_FROM_TOKEN(Method_removed),
202  DEFINE_LOCALID_FROM_TOKEN(Singleton_method_removed),
203  DEFINE_LOCALID_FROM_TOKEN(Method_undefined),
204  DEFINE_LOCALID_FROM_TOKEN(Singleton_method_undefined),
213  DEFINE_LOCALID_FROM_TOKEN(__send__),
214  DEFINE_LOCALID_FROM_TOKEN(__attached__),
215  DEFINE_LOCALID_FROM_TOKEN(Initialize),
216  DEFINE_LOCALID_FROM_TOKEN(Initialize_copy),
217  DEFINE_LOCALID_FROM_TOKEN(Initialize_clone),
218  DEFINE_LOCALID_FROM_TOKEN(Initialize_dup),
223  DEFINE_LOCALID_FROM_TOKEN(To_hash),
224  DEFINE_LOCALID_FROM_TOKEN(To_proc),
231  DEFINE_LOCALID_FROM_TOKEN(Bt_locations),
234  DEFINE_LOCALID_FROM_TOKEN(Exception),
239 #define DEFINE_INSTANCEID_FROM_TOKEN(n) id##n = TOKEN2INSTANCEID(t##n)
240 #define DEFINE_GLOBALID_FROM_TOKEN(n) id##n = TOKEN2GLOBALID(t##n)
243 #define DEFINE_CONSTID_FROM_TOKEN(n) id##n = TOKEN2CONSTID(t##n)
244 #define DEFINE_CLASSID_FROM_TOKEN(n) id##n = TOKEN2CLASSID(t##n)
245 #define DEFINE_ATTRSETID_FROM_TOKEN(n) id##n = TOKEN2ATTRSETID(t##n)
248 };
249 
250 #endif /* RUBY_ID_H */
Definition: id.h:173
Definition: id.h:130
Definition: id.h:157
#define Max(a, b)
Definition: bigdecimal.h:336
Definition: id.h:84
Definition: id.h:78
Definition: id.h:90
Definition: id.h:174
Definition: id.h:86
#define Min(a, b)
Definition: bigdecimal.h:337
Definition: id.h:132
Definition: id.h:129
Definition: id.h:175
Definition: id.h:142
Definition: id.h:85
Definition: id.h:108
Definition: id.h:97
Definition: id.h:88
Definition: id.h:101
Definition: id.h:91
Definition: id.h:79
Definition: id.h:96
#define MATCH(s)
#define DEFINE_LOCALID_FROM_TOKEN(n)
Definition: id.h:190
Definition: id.h:171
Definition: id.h:164
Definition: id.h:169
Definition: id.h:83
Definition: id.h:92
Definition: id.h:80
Definition: id.h:170
Definition: id.h:102
Definition: id.h:144
Definition: id.h:149
Definition: id.h:104
Definition: id.h:110
Definition: id.h:165
Definition: id.h:156
Definition: id.h:89
ruby_id_types
Definition: id.h:16
#define ID_SCOPE_SHIFT
Definition: id.h:31
Definition: id.h:133
Definition: id.h:106
Definition: util.c:841
Definition: id.h:166
Definition: id.h:82
Definition: id.h:158
Definition: id.h:128
Definition: id.h:113
Definition: id.h:114
Definition: id.h:172
Definition: id.h:146
Definition: id.h:167
Definition: id.h:87
Definition: id.h:93
Definition: id.h:162
Definition: id.h:163
Definition: id.h:98
#define AREF(s, idx)
Definition: cparse.c:93
Definition: id.h:180
Definition: id.h:145
#define DEFINE_GLOBALID_FROM_TOKEN(n)
Definition: id.h:240
Definition: id.h:77
Definition: id.h:143
Definition: id.h:150
Definition: id.h:159
Definition: id.h:109
Definition: id.h:147
Definition: id.h:161
Definition: id.h:103
Definition: id.h:95
Definition: id.h:105
#define RUBY_TOKEN(t)
Definition: id.h:66
Definition: id.h:81
Definition: id.h:100
ruby_method_ids
Definition: id.h:76
Definition: id.h:148
Definition: id.h:99
#define OR(d, d0, d1, bl)
Definition: crypt.c:125
Definition: id.h:160
Definition: id.h:131
Definition: id.h:94
Definition: id.h:189
Definition: id.h:181