Mercurial > projects > ddmd
comparison dmd/Id.d @ 99:903b95002d4e
Id and Macro are quite experimental currently
author | Trass3r |
---|---|
date | Tue, 31 Aug 2010 04:04:33 +0200 |
parents | ef02e2e203c2 |
children | e6090d1aea7c |
comparison
equal
deleted
inserted
replaced
98:5c859d5fbe27 | 99:903b95002d4e |
---|---|
1 module dmd.Id; | 1 module dmd.Id; |
2 | 2 |
3 import dmd.Identifier; | 3 import dmd.Identifier; |
4 import dmd.Lexer; | 4 import dmd.Lexer; |
5 | 5 |
6 struct Id | 6 struct Msgtable |
7 { | 7 { |
8 static Identifier IUnknown; | 8 string ident; // name to use in DMD source |
9 static Identifier Object_; | 9 string name_; // name in D executable |
10 static Identifier object; | 10 } |
11 static Identifier max; | 11 |
12 static Identifier min; | 12 immutable Msgtable[100] msgtable = |
13 static Identifier This; | 13 [ |
14 static Identifier ctor; | 14 { "IUnknown" }, |
15 static Identifier dtor; | 15 { "Object_", "Object" }, |
16 static Identifier cpctor; | 16 { "object" }, |
17 static Identifier _postblit; | 17 { "max" }, |
18 static Identifier classInvariant; | 18 { "min" }, |
19 static Identifier unitTest; | 19 { "This", "this" }, |
20 static Identifier require; | 20 { "ctor", "__ctor" }, |
21 static Identifier ensure; | 21 { "dtor", "__dtor" }, |
22 static Identifier init_; | 22 { "cpctor", "__cpctor" }, |
23 static Identifier size; | 23 { "_postblit", "__postblit" }, |
24 static Identifier __sizeof; | 24 { "classInvariant", "__invariant" }, |
25 static Identifier alignof_; | 25 { "unitTest", "__unitTest" }, |
26 static Identifier mangleof_; | 26 { "require", "__require" }, |
27 static Identifier stringof_; | 27 { "ensure", "__ensure" }, |
28 static Identifier tupleof_; | 28 { "init_", "init" }, |
29 static Identifier length; | 29 { "size" }, |
30 static Identifier remove; | 30 { "__sizeof", "sizeof" }, |
31 static Identifier ptr; | 31 { "alignof_", "alignof" }, |
32 static Identifier funcptr; | 32 { "mangleof_", "mangleof" }, |
33 static Identifier dollar; | 33 { "stringof_", "stringof" }, |
34 static Identifier offset; | 34 { "tupleof_", "tupleof" }, |
35 static Identifier offsetof; | 35 { "length" }, |
36 static Identifier ModuleInfo; | 36 { "remove" }, |
37 static Identifier ClassInfo; | 37 { "ptr" }, |
38 static Identifier classinfo_; | 38 { "funcptr" }, |
39 static Identifier typeinfo_; | 39 { "dollar", "__dollar" }, |
40 static Identifier outer; | 40 { "offset" }, |
41 static Identifier Exception; | 41 { "offsetof" }, |
42 static Identifier Throwable; | 42 { "ModuleInfo" }, |
43 static Identifier withSym; | 43 { "ClassInfo" }, |
44 static Identifier result; | 44 { "classinfo_", "classinfo" }, |
45 static Identifier returnLabel; | 45 { "typeinfo_", "typeinfo" }, |
46 static Identifier delegate_; | 46 { "outer" }, |
47 static Identifier line; | 47 { "Exception" }, |
48 static Identifier empty; | 48 { "AssociativeArray" }, |
49 static Identifier p; | 49 { "Throwable" }, |
50 static Identifier coverage; | 50 { "withSym", "__withSym" }, |
51 static Identifier __vptr; | 51 { "result", "__result" }, |
52 static Identifier __monitor; | 52 { "returnLabel", "__returnLabel" }, |
53 static Identifier system; | 53 { "delegate_", "delegate" }, |
54 static Identifier TypeInfo; | 54 { "line" }, |
55 static Identifier TypeInfo_Class; | 55 { "empty", "" }, |
56 static Identifier TypeInfo_Interface; | 56 { "p" }, |
57 static Identifier TypeInfo_Struct; | 57 { "coverage", "__coverage" }, |
58 static Identifier TypeInfo_Enum; | 58 { "__vptr" }, |
59 static Identifier TypeInfo_Typedef; | 59 { "__monitor" }, |
60 static Identifier TypeInfo_Pointer; | 60 { "system" }, |
61 static Identifier TypeInfo_Array; | 61 |
62 static Identifier TypeInfo_StaticArray; | 62 { "TypeInfo" }, |
63 static Identifier TypeInfo_AssociativeArray; | 63 { "TypeInfo_Class" }, |
64 static Identifier TypeInfo_Function; | 64 { "TypeInfo_Interface" }, |
65 static Identifier TypeInfo_Delegate; | 65 { "TypeInfo_Struct" }, |
66 static Identifier TypeInfo_Tuple; | 66 { "TypeInfo_Enum" }, |
67 static Identifier TypeInfo_Const; | 67 { "TypeInfo_Typedef" }, |
68 static Identifier TypeInfo_Invariant; | 68 { "TypeInfo_Pointer" }, |
69 static Identifier TypeInfo_Shared; | 69 { "TypeInfo_Array" }, |
70 static Identifier elements; | 70 { "TypeInfo_StaticArray" }, |
71 static Identifier _arguments_typeinfo; | 71 { "TypeInfo_AssociativeArray" }, |
72 static Identifier _arguments; | 72 { "TypeInfo_Function" }, |
73 static Identifier _argptr; | 73 { "TypeInfo_Delegate" }, |
74 static Identifier _match; | 74 { "TypeInfo_Tuple" }, |
75 static Identifier destroy; | 75 { "TypeInfo_Const" }, |
76 static Identifier postblit; | 76 { "TypeInfo_Invariant" }, |
77 static Identifier LINE; | 77 { "TypeInfo_Shared" }, |
78 static Identifier FILE; | 78 { "elements" }, |
79 static Identifier DATE; | 79 { "_arguments_typeinfo" }, |
80 static Identifier TIME; | 80 { "_arguments" }, |
81 static Identifier TIMESTAMP; | 81 { "_argptr" }, |
82 static Identifier VENDOR; | 82 { "_match" }, |
83 static Identifier VERSIONX; | 83 { "destroy" }, |
84 static Identifier EOFX; | 84 { "_postblit", "__postblit" }, |
85 static Identifier nan; | 85 |
86 static Identifier infinity; | 86 { "LINE", "__LINE__" }, |
87 static Identifier dig; | 87 { "FILE", "__FILE__" }, |
88 static Identifier epsilon; | 88 { "DATE", "__DATE__" }, |
89 static Identifier mant_dig; | 89 { "TIME", "__TIME__" }, |
90 static Identifier max_10_exp; | 90 { "TIMESTAMP", "__TIMESTAMP__" }, |
91 static Identifier max_exp; | 91 { "VENDOR", "__VENDOR__" }, |
92 static Identifier min_10_exp; | 92 { "VERSIONX", "__VERSION__" }, |
93 static Identifier min_exp; | 93 { "EOFX", "__EOF__" }, |
94 static Identifier re; | 94 |
95 static Identifier im; | 95 { "nan" }, |
96 static Identifier C; | 96 { "infinity" }, |
97 static Identifier D; | 97 { "dig" }, |
98 static Identifier Windows; | 98 { "epsilon" }, |
99 static Identifier Pascal; | 99 { "mant_dig" }, |
100 static Identifier System; | 100 { "max_10_exp" }, |
101 static Identifier exit; | 101 { "max_exp" }, |
102 static Identifier success; | 102 { "min_10_exp" }, |
103 static Identifier failure; | 103 { "min_exp" }, |
104 static Identifier keys; | 104 { "min_normal" }, |
105 static Identifier values; | 105 { "re" }, |
106 static Identifier rehash; | 106 { "im" }, |
107 static Identifier sort; | 107 |
108 static Identifier reverse; | 108 { "C" }, |
109 static Identifier dup; | 109 { "D" }, |
110 static Identifier idup; | 110 { "Windows" }, |
111 static Identifier property; | 111 { "Pascal" }, |
112 static Identifier ___out; | 112 { "System" }, |
113 static Identifier ___in; | 113 |
114 static Identifier __int; | 114 { "exit" }, |
115 static Identifier __dollar; | 115 { "success" }, |
116 static Identifier __LOCAL_SIZE; | 116 { "failure" }, |
117 static Identifier uadd; | 117 |
118 static Identifier neg; | 118 { "keys" }, |
119 static Identifier com; | 119 { "values" }, |
120 static Identifier add; | 120 { "rehash" }, |
121 static Identifier add_r; | 121 |
122 static Identifier sub; | 122 { "sort" }, |
123 static Identifier sub_r; | 123 { "reverse" }, |
124 static Identifier mul; | 124 { "dup" }, |
125 static Identifier mul_r; | 125 { "idup" }, |
126 static Identifier div; | 126 |
127 static Identifier div_r; | 127 { "property" }, |
128 static Identifier mod; | 128 |
129 static Identifier mod_r; | 129 // For inline assembler |
130 static Identifier eq; | 130 { "___out", "out" }, |
131 static Identifier cmp; | 131 { "___in", "in" }, |
132 static Identifier iand; | 132 { "__int", "int" }, |
133 static Identifier iand_r; | 133 { "__dollar", "$" }, |
134 static Identifier ior; | 134 { "__LOCAL_SIZE" }, |
135 static Identifier ior_r; | 135 |
136 static Identifier ixor; | 136 // For operator overloads |
137 static Identifier ixor_r; | 137 { "uadd", "opPos" }, |
138 static Identifier shl; | 138 { "neg", "opNeg" }, |
139 static Identifier shl_r; | 139 { "com", "opCom" }, |
140 static Identifier shr; | 140 { "add", "opAdd" }, |
141 static Identifier shr_r; | 141 { "add_r", "opAdd_r" }, |
142 static Identifier ushr; | 142 { "sub", "opSub" }, |
143 static Identifier ushr_r; | 143 { "sub_r", "opSub_r" }, |
144 static Identifier cat; | 144 { "mul", "opMul" }, |
145 static Identifier cat_r; | 145 { "mul_r", "opMul_r" }, |
146 static Identifier assign; | 146 { "div", "opDiv" }, |
147 static Identifier addass; | 147 { "div_r", "opDiv_r" }, |
148 static Identifier subass; | 148 { "mod", "opMod" }, |
149 static Identifier mulass; | 149 { "mod_r", "opMod_r" }, |
150 static Identifier divass; | 150 { "eq", "opEquals" }, |
151 static Identifier modass; | 151 { "cmp", "opCmp" }, |
152 static Identifier andass; | 152 { "iand", "opAnd" }, |
153 static Identifier orass; | 153 { "iand_r", "opAnd_r" }, |
154 static Identifier xorass; | 154 { "ior", "opOr" }, |
155 static Identifier shlass; | 155 { "ior_r", "opOr_r" }, |
156 static Identifier shrass; | 156 { "ixor", "opXor" }, |
157 static Identifier ushrass; | 157 { "ixor_r", "opXor_r" }, |
158 static Identifier catass; | 158 { "shl", "opShl" }, |
159 static Identifier postinc; | 159 { "shl_r", "opShl_r" }, |
160 static Identifier postdec; | 160 { "shr", "opShr" }, |
161 static Identifier index; | 161 { "shr_r", "opShr_r" }, |
162 static Identifier indexass; | 162 { "ushr", "opUShr" }, |
163 static Identifier slice; | 163 { "ushr_r", "opUShr_r" }, |
164 static Identifier sliceass; | 164 { "cat", "opCat" }, |
165 static Identifier call; | 165 { "cat_r", "opCat_r" }, |
166 static Identifier cast_; | 166 { "assign", "opAssign" }, |
167 static Identifier match; | 167 { "addass", "opAddAssign" }, |
168 static Identifier next; | 168 { "subass", "opSubAssign" }, |
169 static Identifier opIn; | 169 { "mulass", "opMulAssign" }, |
170 static Identifier opIn_r; | 170 { "divass", "opDivAssign" }, |
171 static Identifier opStar; | 171 { "modass", "opModAssign" }, |
172 static Identifier opDot; | 172 { "andass", "opAndAssign" }, |
173 static Identifier opImplicitCast; | 173 { "orass", "opOrAssign" }, |
174 static Identifier classNew; | 174 { "xorass", "opXorAssign" }, |
175 static Identifier classDelete; | 175 { "shlass", "opShlAssign" }, |
176 static Identifier apply; | 176 { "shrass", "opShrAssign" }, |
177 static Identifier applyReverse; | 177 { "ushrass", "opUShrAssign" }, |
178 static Identifier Fempty; | 178 { "catass", "opCatAssign" }, |
179 static Identifier Fhead; | 179 { "postinc", "opPostInc" }, |
180 static Identifier Ftoe; | 180 { "postdec", "opPostDec" }, |
181 static Identifier Fnext; | 181 { "index", "opIndex" }, |
182 static Identifier Fretreat; | 182 { "indexass", "opIndexAssign" }, |
183 static Identifier adDup; | 183 { "slice", "opSlice" }, |
184 static Identifier adReverse; | 184 { "sliceass", "opSliceAssign" }, |
185 static Identifier aaLen; | 185 { "call", "opCall" }, |
186 static Identifier aaKeys; | 186 { "cast", "opCast" }, |
187 static Identifier aaValues; | 187 { "match", "opMatch" }, |
188 static Identifier aaRehash; | 188 { "next", "opNext" }, |
189 static Identifier monitorenter; | 189 { "opIn" }, |
190 static Identifier monitorexit; | 190 { "opIn_r" }, |
191 static Identifier criticalenter; | 191 { "opStar" }, |
192 static Identifier criticalexit; | 192 { "opDot" }, |
193 static Identifier GNU_asm; | 193 { "opImplicitCast" }, |
194 static Identifier lib; | 194 |
195 static Identifier msg; | 195 { "classNew", "new" }, |
196 static Identifier startaddress; | 196 { "classDelete", "delete" }, |
197 static Identifier tohash; | 197 |
198 static Identifier tostring; | 198 // For foreach |
199 static Identifier getmembers; | 199 { "apply", "opApply" }, |
200 static Identifier alloca; | 200 { "applyReverse", "opApplyReverse" }, |
201 static Identifier main; | 201 |
202 static Identifier WinMain; | 202 // #if 1 |
203 static Identifier DllMain; | 203 { "Fempty", "empty" }, |
204 static Identifier tls_get_addr; | 204 { "Fhead", "front" }, |
205 static Identifier std; | 205 { "Ftoe", "back" }, |
206 static Identifier math; | 206 { "Fnext", "popFront" }, |
207 static Identifier sin; | 207 { "Fretreat", "popBack" }, |
208 static Identifier cos; | 208 /*#else |
209 static Identifier tan; | 209 { "Fempty", "empty" }, |
210 static Identifier _sqrt; | 210 { "Fhead", "head" }, |
211 static Identifier fabs; | 211 { "Ftoe", "toe" }, |
212 static Identifier isAbstractClass; | 212 { "Fnext", "next" }, |
213 static Identifier isArithmetic; | 213 { "Fretreat", "retreat" }, |
214 static Identifier isAssociativeArray; | 214 #endif*/ |
215 static Identifier isFinalClass; | 215 |
216 static Identifier isFloating; | 216 { "adDup", "_adDupT" }, |
217 static Identifier isIntegral; | 217 { "adReverse", "_adReverse" }, |
218 static Identifier isScalar; | 218 |
219 static Identifier isStaticArray; | 219 // For internal functions |
220 static Identifier isUnsigned; | 220 { "aaLen", "_aaLen" }, |
221 static Identifier isVirtualFunction; | 221 { "aaKeys", "_aaKeys" }, |
222 static Identifier isAbstractFunction; | 222 { "aaValues", "_aaValues" }, |
223 static Identifier isFinalFunction; | 223 { "aaRehash", "_aaRehash" }, |
224 static Identifier hasMember; | 224 { "monitorenter", "_d_monitorenter" }, |
225 static Identifier getMember; | 225 { "monitorexit", "_d_monitorexit" }, |
226 static Identifier getVirtualFunctions; | 226 { "criticalenter", "_d_criticalenter" }, |
227 static Identifier classInstanceSize; | 227 { "criticalexit", "_d_criticalexit" }, |
228 static Identifier allMembers; | 228 |
229 static Identifier derivedMembers; | 229 // For pragma's |
230 static Identifier isSame; | 230 { "GNU_asm" }, |
231 static Identifier compiles; | 231 { "lib" }, |
232 | 232 { "msg" }, |
233 static void initialize() | 233 { "startaddress" }, |
234 | |
235 // For special functions | |
236 { "tohash", "toHash" }, | |
237 { "tostring", "toString" }, | |
238 { "getmembers", "getMembers" }, | |
239 | |
240 // Special functions | |
241 { "alloca" }, | |
242 { "main" }, | |
243 { "WinMain" }, | |
244 { "DllMain" }, | |
245 { "tls_get_addr", "___tls_get_addr" }, | |
246 | |
247 // Builtin functions | |
248 { "std" }, | |
249 { "math" }, | |
250 { "sin" }, | |
251 { "cos" }, | |
252 { "tan" }, | |
253 { "_sqrt", "sqrt" }, | |
254 { "fabs" }, | |
255 | |
256 // Traits | |
257 { "isAbstractClass" }, | |
258 { "isArithmetic" }, | |
259 { "isAssociativeArray" }, | |
260 { "isFinalClass" }, | |
261 { "isFloating" }, | |
262 { "isIntegral" }, | |
263 { "isScalar" }, | |
264 { "isStaticArray" }, | |
265 { "isUnsigned" }, | |
266 { "isVirtualFunction" }, | |
267 { "isAbstractFunction" }, | |
268 { "isFinalFunction" }, | |
269 { "hasMember" }, | |
270 { "getMember" }, | |
271 { "getVirtualFunctions" }, | |
272 { "classInstanceSize" }, | |
273 { "allMembers" }, | |
274 { "derivedMembers" }, | |
275 { "isSame" }, | |
276 { "compiles" }, | |
277 ]; | |
278 private string idgen() | |
279 { | |
280 string res = "struct Id\n{"; | |
281 | |
282 foreach(entry; msgtable) | |
283 res ~= "\tstatic Identifier " ~ entry.ident ~ ";\n"; | |
284 | |
285 res ~= "\tstatic void initialize()\n\t{\n"; | |
286 string tmp; | |
287 foreach (entry; msgtable) | |
234 { | 288 { |
235 IUnknown = Lexer.idPool("IUnknown"); | 289 if (entry.name_ is null) |
236 Object_ = Lexer.idPool("Object"); | 290 tmp = entry.ident; |
237 object = Lexer.idPool("object"); | 291 else |
238 max = Lexer.idPool("max"); | 292 tmp = entry.name_; |
239 min = Lexer.idPool("min"); | 293 res ~= "\t\t" ~ entry.ident ~ ` = Lexer.idPool("` ~ tmp ~ "\");\n"; |
240 This = Lexer.idPool("this"); | |
241 ctor = Lexer.idPool("__ctor"); | |
242 dtor = Lexer.idPool("__dtor"); | |
243 cpctor = Lexer.idPool("__cpctor"); | |
244 _postblit = Lexer.idPool("__postblit"); | |
245 classInvariant = Lexer.idPool("__invariant"); | |
246 unitTest = Lexer.idPool("__unitTest"); | |
247 require = Lexer.idPool("__require"); | |
248 ensure = Lexer.idPool("__ensure"); | |
249 init_ = Lexer.idPool("init"); | |
250 size = Lexer.idPool("size"); | |
251 __sizeof = Lexer.idPool("sizeof"); | |
252 alignof_ = Lexer.idPool("alignof"); | |
253 mangleof_ = Lexer.idPool("mangleof"); | |
254 stringof_ = Lexer.idPool("stringof"); | |
255 tupleof_ = Lexer.idPool("tupleof"); | |
256 length = Lexer.idPool("length"); | |
257 remove = Lexer.idPool("remove"); | |
258 ptr = Lexer.idPool("ptr"); | |
259 funcptr = Lexer.idPool("funcptr"); | |
260 dollar = Lexer.idPool("__dollar"); | |
261 offset = Lexer.idPool("offset"); | |
262 offsetof = Lexer.idPool("offsetof"); | |
263 ModuleInfo = Lexer.idPool("ModuleInfo"); | |
264 ClassInfo = Lexer.idPool("ClassInfo"); | |
265 classinfo_ = Lexer.idPool("classinfo"); | |
266 typeinfo_ = Lexer.idPool("typeinfo"); | |
267 outer = Lexer.idPool("outer"); | |
268 Exception = Lexer.idPool("Exception"); | |
269 Throwable = Lexer.idPool("Throwable"); | |
270 withSym = Lexer.idPool("__withSym"); | |
271 result = Lexer.idPool("__result"); | |
272 returnLabel = Lexer.idPool("__returnLabel"); | |
273 delegate_ = Lexer.idPool("delegate"); | |
274 line = Lexer.idPool("line"); | |
275 empty = Lexer.idPool(""); | |
276 p = Lexer.idPool("p"); | |
277 coverage = Lexer.idPool("__coverage"); | |
278 __vptr = Lexer.idPool("__vptr"); | |
279 __monitor = Lexer.idPool("__monitor"); | |
280 system = Lexer.idPool("system"); | |
281 TypeInfo = Lexer.idPool("TypeInfo"); | |
282 TypeInfo_Class = Lexer.idPool("TypeInfo_Class"); | |
283 TypeInfo_Interface = Lexer.idPool("TypeInfo_Interface"); | |
284 TypeInfo_Struct = Lexer.idPool("TypeInfo_Struct"); | |
285 TypeInfo_Enum = Lexer.idPool("TypeInfo_Enum"); | |
286 TypeInfo_Typedef = Lexer.idPool("TypeInfo_Typedef"); | |
287 TypeInfo_Pointer = Lexer.idPool("TypeInfo_Pointer"); | |
288 TypeInfo_Array = Lexer.idPool("TypeInfo_Array"); | |
289 TypeInfo_StaticArray = Lexer.idPool("TypeInfo_StaticArray"); | |
290 TypeInfo_AssociativeArray = Lexer.idPool("TypeInfo_AssociativeArray"); | |
291 TypeInfo_Function = Lexer.idPool("TypeInfo_Function"); | |
292 TypeInfo_Delegate = Lexer.idPool("TypeInfo_Delegate"); | |
293 TypeInfo_Tuple = Lexer.idPool("TypeInfo_Tuple"); | |
294 TypeInfo_Const = Lexer.idPool("TypeInfo_Const"); | |
295 TypeInfo_Invariant = Lexer.idPool("TypeInfo_Invariant"); | |
296 TypeInfo_Shared = Lexer.idPool("TypeInfo_Shared"); | |
297 elements = Lexer.idPool("elements"); | |
298 _arguments_typeinfo = Lexer.idPool("_arguments_typeinfo"); | |
299 _arguments = Lexer.idPool("_arguments"); | |
300 _argptr = Lexer.idPool("_argptr"); | |
301 _match = Lexer.idPool("_match"); | |
302 destroy = Lexer.idPool("destroy"); | |
303 postblit = Lexer.idPool("postblit"); | |
304 LINE = Lexer.idPool("__LINE__"); | |
305 FILE = Lexer.idPool("__FILE__"); | |
306 DATE = Lexer.idPool("__DATE__"); | |
307 TIME = Lexer.idPool("__TIME__"); | |
308 TIMESTAMP = Lexer.idPool("__TIMESTAMP__"); | |
309 VENDOR = Lexer.idPool("__VENDOR__"); | |
310 VERSIONX = Lexer.idPool("__VERSION__"); | |
311 EOFX = Lexer.idPool("__EOF__"); | |
312 nan = Lexer.idPool("nan"); | |
313 infinity = Lexer.idPool("infinity"); | |
314 dig = Lexer.idPool("dig"); | |
315 epsilon = Lexer.idPool("epsilon"); | |
316 mant_dig = Lexer.idPool("mant_dig"); | |
317 max_10_exp = Lexer.idPool("max_10_exp"); | |
318 max_exp = Lexer.idPool("max_exp"); | |
319 min_10_exp = Lexer.idPool("min_10_exp"); | |
320 min_exp = Lexer.idPool("min_exp"); | |
321 re = Lexer.idPool("re"); | |
322 im = Lexer.idPool("im"); | |
323 C = Lexer.idPool("C"); | |
324 D = Lexer.idPool("D"); | |
325 Windows = Lexer.idPool("Windows"); | |
326 Pascal = Lexer.idPool("Pascal"); | |
327 System = Lexer.idPool("System"); | |
328 exit = Lexer.idPool("exit"); | |
329 success = Lexer.idPool("success"); | |
330 failure = Lexer.idPool("failure"); | |
331 keys = Lexer.idPool("keys"); | |
332 values = Lexer.idPool("values"); | |
333 rehash = Lexer.idPool("rehash"); | |
334 sort = Lexer.idPool("sort"); | |
335 reverse = Lexer.idPool("reverse"); | |
336 dup = Lexer.idPool("dup"); | |
337 idup = Lexer.idPool("idup"); | |
338 property = Lexer.idPool("property"); | |
339 ___out = Lexer.idPool("out"); | |
340 ___in = Lexer.idPool("in"); | |
341 __int = Lexer.idPool("int"); | |
342 __dollar = Lexer.idPool("$"); | |
343 __LOCAL_SIZE = Lexer.idPool("__LOCAL_SIZE"); | |
344 uadd = Lexer.idPool("opPos"); | |
345 neg = Lexer.idPool("opNeg"); | |
346 com = Lexer.idPool("opCom"); | |
347 add = Lexer.idPool("opAdd"); | |
348 add_r = Lexer.idPool("opAdd_r"); | |
349 sub = Lexer.idPool("opSub"); | |
350 sub_r = Lexer.idPool("opSub_r"); | |
351 mul = Lexer.idPool("opMul"); | |
352 mul_r = Lexer.idPool("opMul_r"); | |
353 div = Lexer.idPool("opDiv"); | |
354 div_r = Lexer.idPool("opDiv_r"); | |
355 mod = Lexer.idPool("opMod"); | |
356 mod_r = Lexer.idPool("opMod_r"); | |
357 eq = Lexer.idPool("opEquals"); | |
358 cmp = Lexer.idPool("opCmp"); | |
359 iand = Lexer.idPool("opAnd"); | |
360 iand_r = Lexer.idPool("opAnd_r"); | |
361 ior = Lexer.idPool("opOr"); | |
362 ior_r = Lexer.idPool("opOr_r"); | |
363 ixor = Lexer.idPool("opXor"); | |
364 ixor_r = Lexer.idPool("opXor_r"); | |
365 shl = Lexer.idPool("opShl"); | |
366 shl_r = Lexer.idPool("opShl_r"); | |
367 shr = Lexer.idPool("opShr"); | |
368 shr_r = Lexer.idPool("opShr_r"); | |
369 ushr = Lexer.idPool("opUShr"); | |
370 ushr_r = Lexer.idPool("opUShr_r"); | |
371 cat = Lexer.idPool("opCat"); | |
372 cat_r = Lexer.idPool("opCat_r"); | |
373 assign = Lexer.idPool("opAssign"); | |
374 addass = Lexer.idPool("opAddAssign"); | |
375 subass = Lexer.idPool("opSubAssign"); | |
376 mulass = Lexer.idPool("opMulAssign"); | |
377 divass = Lexer.idPool("opDivAssign"); | |
378 modass = Lexer.idPool("opModAssign"); | |
379 andass = Lexer.idPool("opAndAssign"); | |
380 orass = Lexer.idPool("opOrAssign"); | |
381 xorass = Lexer.idPool("opXorAssign"); | |
382 shlass = Lexer.idPool("opShlAssign"); | |
383 shrass = Lexer.idPool("opShrAssign"); | |
384 ushrass = Lexer.idPool("opUShrAssign"); | |
385 catass = Lexer.idPool("opCatAssign"); | |
386 postinc = Lexer.idPool("opPostInc"); | |
387 postdec = Lexer.idPool("opPostDec"); | |
388 index = Lexer.idPool("opIndex"); | |
389 indexass = Lexer.idPool("opIndexAssign"); | |
390 slice = Lexer.idPool("opSlice"); | |
391 sliceass = Lexer.idPool("opSliceAssign"); | |
392 call = Lexer.idPool("opCall"); | |
393 cast_ = Lexer.idPool("opCast"); | |
394 match = Lexer.idPool("opMatch"); | |
395 next = Lexer.idPool("opNext"); | |
396 opIn = Lexer.idPool("opIn"); | |
397 opIn_r = Lexer.idPool("opIn_r"); | |
398 opStar = Lexer.idPool("opStar"); | |
399 opDot = Lexer.idPool("opDot"); | |
400 opImplicitCast = Lexer.idPool("opImplicitCast"); | |
401 classNew = Lexer.idPool("new"); | |
402 classDelete = Lexer.idPool("delete"); | |
403 apply = Lexer.idPool("opApply"); | |
404 applyReverse = Lexer.idPool("opApplyReverse"); | |
405 Fempty = Lexer.idPool("empty"); | |
406 Fhead = Lexer.idPool("front"); | |
407 Ftoe = Lexer.idPool("back"); | |
408 Fnext = Lexer.idPool("popFront"); | |
409 Fretreat = Lexer.idPool("popBack"); | |
410 adDup = Lexer.idPool("_adDupT"); | |
411 adReverse = Lexer.idPool("_adReverse"); | |
412 aaLen = Lexer.idPool("_aaLen"); | |
413 aaKeys = Lexer.idPool("_aaKeys"); | |
414 aaValues = Lexer.idPool("_aaValues"); | |
415 aaRehash = Lexer.idPool("_aaRehash"); | |
416 monitorenter = Lexer.idPool("_d_monitorenter"); | |
417 monitorexit = Lexer.idPool("_d_monitorexit"); | |
418 criticalenter = Lexer.idPool("_d_criticalenter"); | |
419 criticalexit = Lexer.idPool("_d_criticalexit"); | |
420 GNU_asm = Lexer.idPool("GNU_asm"); | |
421 lib = Lexer.idPool("lib"); | |
422 msg = Lexer.idPool("msg"); | |
423 startaddress = Lexer.idPool("startaddress"); | |
424 tohash = Lexer.idPool("toHash"); | |
425 tostring = Lexer.idPool("toString"); | |
426 getmembers = Lexer.idPool("getMembers"); | |
427 alloca = Lexer.idPool("alloca"); | |
428 main = Lexer.idPool("main"); | |
429 WinMain = Lexer.idPool("WinMain"); | |
430 DllMain = Lexer.idPool("DllMain"); | |
431 tls_get_addr = Lexer.idPool("___tls_get_addr"); | |
432 std = Lexer.idPool("std"); | |
433 math = Lexer.idPool("math"); | |
434 sin = Lexer.idPool("sin"); | |
435 cos = Lexer.idPool("cos"); | |
436 tan = Lexer.idPool("tan"); | |
437 _sqrt = Lexer.idPool("sqrt"); | |
438 fabs = Lexer.idPool("fabs"); | |
439 isAbstractClass = Lexer.idPool("isAbstractClass"); | |
440 isArithmetic = Lexer.idPool("isArithmetic"); | |
441 isAssociativeArray = Lexer.idPool("isAssociativeArray"); | |
442 isFinalClass = Lexer.idPool("isFinalClass"); | |
443 isFloating = Lexer.idPool("isFloating"); | |
444 isIntegral = Lexer.idPool("isIntegral"); | |
445 isScalar = Lexer.idPool("isScalar"); | |
446 isStaticArray = Lexer.idPool("isStaticArray"); | |
447 isUnsigned = Lexer.idPool("isUnsigned"); | |
448 isVirtualFunction = Lexer.idPool("isVirtualFunction"); | |
449 isAbstractFunction = Lexer.idPool("isAbstractFunction"); | |
450 isFinalFunction = Lexer.idPool("isFinalFunction"); | |
451 hasMember = Lexer.idPool("hasMember"); | |
452 getMember = Lexer.idPool("getMember"); | |
453 getVirtualFunctions = Lexer.idPool("getVirtualFunctions"); | |
454 classInstanceSize = Lexer.idPool("classInstanceSize"); | |
455 allMembers = Lexer.idPool("allMembers"); | |
456 derivedMembers = Lexer.idPool("derivedMembers"); | |
457 isSame = Lexer.idPool("isSame"); | |
458 compiles = Lexer.idPool("compiles"); | |
459 } | 294 } |
295 | |
296 res ~= "\t}\n}"; | |
297 return res; | |
460 } | 298 } |
299 | |
300 mixin(idgen()); |