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
16
enum
ruby_id_types
{
17
RUBY_ID_STATIC_SYM
= 0x01,
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),
25
RUBY_ID_INTERNAL
=
RUBY_ID_JUNK
,
26
RUBY_ID_SCOPE_SHIFT
= 4,
27
RUBY_ID_SCOPE_MASK
= (~(~0
U
<<(
RUBY_ID_SCOPE_SHIFT
-1))<<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
76
enum
ruby_method_ids
{
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),
94
idEq
=
RUBY_TOKEN
(EQ),
95
idEqq
=
RUBY_TOKEN
(EQQ),
96
idNeq
=
RUBY_TOKEN
(NEQ),
97
idNot
=
'!'
,
98
idBackquote
=
'`'
,
99
idEqTilde
=
RUBY_TOKEN
(
MATCH
),
100
idNeqTilde
=
RUBY_TOKEN
(NMATCH),
101
idAREF
=
RUBY_TOKEN
(
AREF
),
102
idASET
=
RUBY_TOKEN
(ASET),
103
idCOLON2
=
RUBY_TOKEN
(COLON2),
104
idANDOP
=
RUBY_TOKEN
(ANDOP),
105
idOROP
=
RUBY_TOKEN
(OROP),
106
idANDDOT
=
RUBY_TOKEN
(ANDDOT),
107
tPRESERVED_ID_BEGIN
= 148,
108
idNULL
,
109
idEmptyP
,
110
idEqlP
,
111
idRespond_to
,
112
idRespond_to_missing
,
113
idIFUNC
,
114
idCFUNC
,
115
id_core_set_method_alias
,
116
id_core_set_variable_alias
,
117
id_core_undef_method
,
118
id_core_define_method
,
119
id_core_define_singleton_method
,
120
id_core_set_postexe
,
121
id_core_hash_from_ary
,
122
id_core_hash_merge_ary
,
123
id_core_hash_merge_ptr
,
124
id_core_hash_merge_kwd
,
125
id_debug_created_info
,
126
tPRESERVED_ID_END
,
127
tTOKEN_LOCAL_BEGIN
=
tPRESERVED_ID_END
-1,
128
tMax
,
129
tMin
,
130
tFreeze
,
131
tInspect
,
132
tIntern
,
133
tObject_id
,
134
tConst_missing
,
135
tMethodMissing
,
136
tMethod_added
,
137
tSingleton_method_added
,
138
tMethod_removed
,
139
tSingleton_method_removed
,
140
tMethod_undefined
,
141
tSingleton_method_undefined
,
142
tLength
,
143
tSize
,
144
tGets
,
145
tSucc
,
146
tEach
,
147
tProc
,
148
tLambda
,
149
tSend
,
150
t__send__
,
151
t__attached__
,
152
tInitialize
,
153
tInitialize_copy
,
154
tInitialize_clone
,
155
tInitialize_dup
,
156
tTo_int
,
157
tTo_ary
,
158
tTo_str
,
159
tTo_sym
,
160
tTo_hash
,
161
tTo_proc
,
162
tTo_io
,
163
tTo_a
,
164
tTo_s
,
165
tTo_i
,
166
tTo_r
,
167
tBt
,
168
tBt_locations
,
169
tCall
,
170
tMesg
,
171
tException
,
172
tNOT
,
173
tAND
,
174
tOR
,
175
tUScore
,
176
tTOKEN_LOCAL_END
,
177
tTOKEN_INSTANCE_BEGIN
=
tTOKEN_LOCAL_END
-1,
178
tTOKEN_INSTANCE_END
,
179
tTOKEN_GLOBAL_BEGIN
=
tTOKEN_INSTANCE_END
-1,
180
tLASTLINE
,
181
tBACKREF
,
182
tTOKEN_GLOBAL_END
,
183
tTOKEN_CONST_BEGIN
=
tTOKEN_GLOBAL_END
-1,
184
tTOKEN_CONST_END
,
185
tTOKEN_CLASS_BEGIN
=
tTOKEN_CONST_END
-1,
186
tTOKEN_CLASS_END
,
187
tTOKEN_ATTRSET_BEGIN
=
tTOKEN_CLASS_END
-1,
188
tTOKEN_ATTRSET_END
,
189
tNEXT_ID
=
tTOKEN_ATTRSET_END
,
190
#define DEFINE_LOCALID_FROM_TOKEN(n) id##n = TOKEN2LOCALID(t##n)
191
DEFINE_LOCALID_FROM_TOKEN
(
Max
),
192
DEFINE_LOCALID_FROM_TOKEN
(
Min
),
193
DEFINE_LOCALID_FROM_TOKEN
(Freeze),
194
DEFINE_LOCALID_FROM_TOKEN
(Inspect),
195
DEFINE_LOCALID_FROM_TOKEN
(Intern),
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),
205
DEFINE_LOCALID_FROM_TOKEN
(Length),
206
DEFINE_LOCALID_FROM_TOKEN
(Size),
207
DEFINE_LOCALID_FROM_TOKEN
(Gets),
208
DEFINE_LOCALID_FROM_TOKEN
(Succ),
209
DEFINE_LOCALID_FROM_TOKEN
(Each),
210
DEFINE_LOCALID_FROM_TOKEN
(Proc),
211
DEFINE_LOCALID_FROM_TOKEN
(Lambda),
212
DEFINE_LOCALID_FROM_TOKEN
(Send),
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),
219
DEFINE_LOCALID_FROM_TOKEN
(To_int),
220
DEFINE_LOCALID_FROM_TOKEN
(To_ary),
221
DEFINE_LOCALID_FROM_TOKEN
(To_str),
222
DEFINE_LOCALID_FROM_TOKEN
(To_sym),
223
DEFINE_LOCALID_FROM_TOKEN
(To_hash),
224
DEFINE_LOCALID_FROM_TOKEN
(To_proc),
225
DEFINE_LOCALID_FROM_TOKEN
(To_io),
226
DEFINE_LOCALID_FROM_TOKEN
(To_a),
227
DEFINE_LOCALID_FROM_TOKEN
(To_s),
228
DEFINE_LOCALID_FROM_TOKEN
(To_i),
229
DEFINE_LOCALID_FROM_TOKEN
(To_r),
230
DEFINE_LOCALID_FROM_TOKEN
(Bt),
231
DEFINE_LOCALID_FROM_TOKEN
(Bt_locations),
232
DEFINE_LOCALID_FROM_TOKEN
(Call),
233
DEFINE_LOCALID_FROM_TOKEN
(Mesg),
234
DEFINE_LOCALID_FROM_TOKEN
(Exception),
235
DEFINE_LOCALID_FROM_TOKEN
(NOT),
236
DEFINE_LOCALID_FROM_TOKEN
(AND),
237
DEFINE_LOCALID_FROM_TOKEN
(
OR
),
238
DEFINE_LOCALID_FROM_TOKEN
(UScore),
239
#define DEFINE_INSTANCEID_FROM_TOKEN(n) id##n = TOKEN2INSTANCEID(t##n)
240
#define DEFINE_GLOBALID_FROM_TOKEN(n) id##n = TOKEN2GLOBALID(t##n)
241
DEFINE_GLOBALID_FROM_TOKEN
(LASTLINE),
242
DEFINE_GLOBALID_FROM_TOKEN
(BACKREF),
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)
246
tLAST_OP_ID
=
tPRESERVED_ID_END
-1,
247
idLAST_OP_ID
=
tLAST_OP_ID
>>
ID_SCOPE_SHIFT
248
};
249
250
#endif
/* RUBY_ID_H */
tAND
Definition:
id.h:173
tPRESERVED_ID_END
Definition:
id.h:126
tSingleton_method_undefined
Definition:
id.h:141
tSingleton_method_removed
Definition:
id.h:139
idLAST_OP_ID
Definition:
id.h:247
tFreeze
Definition:
id.h:130
tTo_ary
Definition:
id.h:157
Max
#define Max(a, b)
Definition:
bigdecimal.h:336
idMINUS
Definition:
id.h:84
idDot3
Definition:
id.h:78
idLT
Definition:
id.h:90
tMethod_undefined
Definition:
id.h:140
tOR
Definition:
id.h:174
id_core_set_variable_alias
Definition:
id.h:116
idDIV
Definition:
id.h:86
Min
#define Min(a, b)
Definition:
bigdecimal.h:337
tTOKEN_LOCAL_BEGIN
Definition:
id.h:127
tIntern
Definition:
id.h:132
tMin
Definition:
id.h:129
tUScore
Definition:
id.h:175
tLength
Definition:
id.h:142
idMULT
Definition:
id.h:85
idNULL
Definition:
id.h:108
idNot
Definition:
id.h:97
idLTLT
Definition:
id.h:88
idAREF
Definition:
id.h:101
tTOKEN_ATTRSET_END
Definition:
id.h:188
idLE
Definition:
id.h:91
idUPlus
Definition:
id.h:79
idNeq
Definition:
id.h:96
MATCH
#define MATCH(s)
DEFINE_LOCALID_FROM_TOKEN
#define DEFINE_LOCALID_FROM_TOKEN(n)
Definition:
id.h:190
RUBY_ID_LOCAL
Definition:
id.h:18
id_core_undef_method
Definition:
id.h:117
tException
Definition:
id.h:171
tTo_s
Definition:
id.h:164
tCall
Definition:
id.h:169
idPLUS
Definition:
id.h:83
tMethod_added
Definition:
id.h:136
tPRESERVED_ID_BEGIN
Definition:
id.h:107
RUBY_ID_GLOBAL
Definition:
id.h:20
id_core_hash_merge_ary
Definition:
id.h:122
idGT
Definition:
id.h:92
id_debug_created_info
Definition:
id.h:125
idUMinus
Definition:
id.h:80
tMesg
Definition:
id.h:170
RUBY_ID_INTERNAL
Definition:
id.h:25
idASET
Definition:
id.h:102
RUBY_ID_ATTRSET
Definition:
id.h:21
tGets
Definition:
id.h:144
tSend
Definition:
id.h:149
tTOKEN_CLASS_BEGIN
Definition:
id.h:185
idANDOP
Definition:
id.h:104
idEqlP
Definition:
id.h:110
tSingleton_method_added
Definition:
id.h:137
tTo_i
Definition:
id.h:165
tMethodMissing
Definition:
id.h:135
tTo_int
Definition:
id.h:156
idRespond_to_missing
Definition:
id.h:112
tTOKEN_LOCAL_END
Definition:
id.h:176
idGTGT
Definition:
id.h:89
ruby_id_types
ruby_id_types
Definition:
id.h:16
ID_SCOPE_SHIFT
#define ID_SCOPE_SHIFT
Definition:
id.h:31
id_core_hash_merge_ptr
Definition:
id.h:123
tConst_missing
Definition:
id.h:134
RUBY_ID_CONST
Definition:
id.h:22
tObject_id
Definition:
id.h:133
idANDDOT
Definition:
id.h:106
tInitialize_clone
Definition:
id.h:154
id_core_define_method
Definition:
id.h:118
U
Definition:
util.c:841
tInitialize_dup
Definition:
id.h:155
tTo_r
Definition:
id.h:166
idCmp
Definition:
id.h:82
tTOKEN_GLOBAL_END
Definition:
id.h:182
tTo_str
Definition:
id.h:158
tLAST_OP_ID
Definition:
id.h:246
tMax
Definition:
id.h:128
idIFUNC
Definition:
id.h:113
idCFUNC
Definition:
id.h:114
t__attached__
Definition:
id.h:151
tNOT
Definition:
id.h:172
tEach
Definition:
id.h:146
tBt_locations
Definition:
id.h:168
tBt
Definition:
id.h:167
tInitialize_copy
Definition:
id.h:153
id_core_hash_merge_kwd
Definition:
id.h:124
idMOD
Definition:
id.h:87
idGE
Definition:
id.h:93
tTo_io
Definition:
id.h:162
tTo_a
Definition:
id.h:163
idBackquote
Definition:
id.h:98
AREF
#define AREF(s, idx)
Definition:
cparse.c:93
tTOKEN_CONST_BEGIN
Definition:
id.h:183
RUBY_ID_SCOPE_MASK
Definition:
id.h:27
tTOKEN_CLASS_END
Definition:
id.h:186
tLASTLINE
Definition:
id.h:180
tSucc
Definition:
id.h:145
id_core_set_method_alias
Definition:
id.h:115
tTOKEN_INSTANCE_END
Definition:
id.h:178
DEFINE_GLOBALID_FROM_TOKEN
#define DEFINE_GLOBALID_FROM_TOKEN(n)
Definition:
id.h:240
idDot2
Definition:
id.h:77
tSize
Definition:
id.h:143
tInitialize
Definition:
id.h:152
t__send__
Definition:
id.h:150
tTOKEN_INSTANCE_BEGIN
Definition:
id.h:177
idRespond_to
Definition:
id.h:111
id_core_define_singleton_method
Definition:
id.h:119
RUBY_ID_CLASS
Definition:
id.h:23
tMethod_removed
Definition:
id.h:138
tTo_sym
Definition:
id.h:159
tTOKEN_CONST_END
Definition:
id.h:184
idEmptyP
Definition:
id.h:109
tProc
Definition:
id.h:147
tTo_proc
Definition:
id.h:161
idCOLON2
Definition:
id.h:103
idEqq
Definition:
id.h:95
idOROP
Definition:
id.h:105
RUBY_TOKEN
#define RUBY_TOKEN(t)
Definition:
id.h:66
tTOKEN_ATTRSET_BEGIN
Definition:
id.h:187
idPow
Definition:
id.h:81
idNeqTilde
Definition:
id.h:100
RUBY_ID_STATIC_SYM
Definition:
id.h:17
ruby_method_ids
ruby_method_ids
Definition:
id.h:76
tLambda
Definition:
id.h:148
idEqTilde
Definition:
id.h:99
OR
#define OR(d, d0, d1, bl)
Definition:
crypt.c:125
tTo_hash
Definition:
id.h:160
RUBY_ID_SCOPE_SHIFT
Definition:
id.h:26
id_core_set_postexe
Definition:
id.h:120
tInspect
Definition:
id.h:131
RUBY_ID_INSTANCE
Definition:
id.h:19
idEq
Definition:
id.h:94
tTOKEN_GLOBAL_BEGIN
Definition:
id.h:179
id_core_hash_from_ary
Definition:
id.h:121
tNEXT_ID
Definition:
id.h:189
tBACKREF
Definition:
id.h:181
RUBY_ID_JUNK
Definition:
id.h:24
Generated by
1.8.13