Mercurial > projects > ddmd
annotate main.d @ 157:b7b61140701d
* added all missing default cases in switch statements
+ Lexer.getDocComment
+ Lexer.combineComments
author | trass3r |
---|---|
date | Thu, 16 Sep 2010 01:34:10 +0200 |
parents | 60bb0fe4563e |
children | 4092a614a9f3 8bf07a566fdf |
rev | line source |
---|---|
0 | 1 module main; |
2 | |
99 | 3 import dmd.Macro; |
0 | 4 import dmd.Array; |
5 import dmd.Module; | |
6 import dmd.Global; | |
7 import dmd.VersionCondition; | |
8 import dmd.DebugCondition; | |
9 import dmd.Loc; | |
10 import dmd.Lexer; | |
11 import dmd.OutBuffer; | |
12 import dmd.FileName; | |
13 import dmd.Type; | |
14 import dmd.File; | |
15 import dmd.Id; | |
16 import dmd.Identifier; | |
79 | 17 import dmd.Json; |
0 | 18 import dmd.Library; |
19 import dmd.TOK; | |
20 import dmd.String; | |
21 import dmd.backend.glue; | |
22 | |
23 import std.stdarg; | |
24 import std.string : toStringz; | |
34 | 25 import std.exception; |
0 | 26 |
27 import core.stdc.string; | |
28 import core.stdc.stdio; | |
29 import core.stdc.ctype; | |
30 import core.stdc.errno; | |
31 import core.stdc.stdlib; | |
32 import core.stdc.limits; | |
33 | |
34 import core.memory; | |
35 | |
70 | 36 import dbg.CallStackInfo; |
0 | 37 |
38 import dmd.Util; | |
39 | |
40 enum ExitCode | |
41 { | |
42 EXIT_SUCCESS = 0, | |
43 } | |
44 | |
74
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
45 version(Linux) |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
46 { |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
47 extern (C) extern __gshared bool rt_trapExceptions; |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
48 |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
49 static this() { |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
50 rt_trapExceptions = false; |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
51 } |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
52 |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
53 } |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
54 |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
55 version(Windows) |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
56 { |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
57 |
70 | 58 version (Windows) |
59 { | |
60 private import core.stdc.wchar_; | |
61 | |
62 extern (Windows) alias int function() FARPROC; | |
63 extern (Windows) FARPROC GetProcAddress(void*, in char*); | |
64 extern (Windows) void* LoadLibraryA(in char*); | |
65 extern (Windows) int FreeLibrary(void*); | |
66 extern (Windows) void* LocalFree(void*); | |
67 extern (Windows) wchar_t* GetCommandLineW(); | |
68 extern (Windows) wchar_t** CommandLineToArgvW(wchar_t*, int*); | |
69 extern (Windows) export int WideCharToMultiByte(uint, uint, wchar_t*, int, char*, int, char*, int); | |
70 pragma(lib, "shell32.lib"); // needed for CommandLineToArgvW | |
71 } | |
72 | |
73 shared bool _d_isHalting = false; | |
74 __gshared string[] _d_args = null; | |
75 | |
74
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
76 version(Posix) |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
77 { |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
78 extern (C) void _STI_monitor_staticctor(); |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
79 extern (C) void _STD_monitor_staticdtor(); |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
80 extern (C) void _STI_critical_init(); |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
81 extern (C) void _STD_critical_term(); |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
82 } |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
83 |
70 | 84 extern (C) void gc_init(); |
85 extern (C) void gc_term(); | |
86 extern (C) void _minit(); | |
87 extern (C) void _moduleCtor(); | |
88 extern (C) void _moduleDtor(); | |
89 extern (C) bool runModuleUnitTests(); | |
90 extern (C) void thread_joinAll(); | |
91 | |
92 import rt.memory; | |
93 | |
94 extern (C) int main(int argc, char** argv) | |
95 { | |
96 char[][] args; | |
97 int result; | |
98 | |
99 version (OSX) | |
100 { /* OSX does not provide a way to get at the top of the | |
101 * stack, except for the magic value 0xC0000000. | |
102 * But as far as the gc is concerned, argv is at the top | |
103 * of the main thread's stack, so save the address of that. | |
104 */ | |
105 __osx_stack_end = cast(void*)&argv; | |
106 } | |
107 | |
108 version (FreeBSD) version (D_InlineAsm_X86) | |
109 { | |
110 /* | |
111 * FreeBSD/i386 sets the FPU precision mode to 53 bit double. | |
112 * Make it 64 bit extended. | |
113 */ | |
114 ushort fpucw; | |
115 asm | |
116 { | |
117 fstsw fpucw; | |
118 or fpucw, 0b11_00_111111; // 11: use 64 bit extended-precision | |
119 // 111111: mask all FP exceptions | |
120 fldcw fpucw; | |
121 } | |
122 } | |
123 | |
124 version (Posix) | |
125 { | |
126 _STI_monitor_staticctor(); | |
127 _STI_critical_init(); | |
128 } | |
0 | 129 |
70 | 130 version (Windows) |
131 { | |
132 wchar_t* wcbuf = GetCommandLineW(); | |
133 size_t wclen = wcslen(wcbuf); | |
134 int wargc = 0; | |
135 wchar_t** wargs = CommandLineToArgvW(wcbuf, &wargc); | |
136 assert(wargc == argc); | |
137 | |
138 char* cargp = null; | |
139 size_t cargl = WideCharToMultiByte(65001, 0, wcbuf, wclen, null, 0, null, 0); | |
140 | |
141 cargp = cast(char*) alloca(cargl); | |
142 args = ((cast(char[]*) alloca(wargc * (char[]).sizeof)))[0 .. wargc]; | |
143 | |
144 for (size_t i = 0, p = 0; i < wargc; i++) | |
145 { | |
146 int wlen = wcslen(wargs[i]); | |
147 int clen = WideCharToMultiByte(65001, 0, &wargs[i][0], wlen, null, 0, null, 0); | |
148 args[i] = cargp[p .. p+clen]; | |
149 p += clen; assert(p <= cargl); | |
150 WideCharToMultiByte(65001, 0, &wargs[i][0], wlen, &args[i][0], clen, null, 0); | |
151 } | |
152 LocalFree(wargs); | |
153 wargs = null; | |
154 wargc = 0; | |
155 } | |
156 else version (Posix) | |
157 { | |
158 char[]* am = cast(char[]*) malloc(argc * (char[]).sizeof); | |
159 scope(exit) free(am); | |
160 | |
161 for (size_t i = 0; i < argc; i++) | |
162 { | |
163 auto len = strlen(argv[i]); | |
164 am[i] = argv[i][0 .. len]; | |
165 } | |
166 args = am[0 .. argc]; | |
167 } | |
168 _d_args = cast(string[]) args; | |
169 | |
170 void runMain() | |
171 { | |
172 result = main(_d_args); | |
173 } | |
174 | |
175 void runAll() | |
176 { | |
177 gc_init(); | |
178 initStaticDataGC(); | |
179 version (Windows) | |
180 _minit(); | |
181 _moduleCtor(); | |
182 _moduleTlsCtor(); | |
183 if (runModuleUnitTests()) | |
184 runMain(); | |
185 else | |
186 result = EXIT_FAILURE; | |
187 _moduleTlsDtor(); | |
188 thread_joinAll(); | |
189 _d_isHalting = true; | |
190 _moduleDtor(); | |
191 gc_term(); | |
192 } | |
193 | |
194 runAll(); | |
195 | |
196 version (Posix) | |
197 { | |
198 _STD_critical_term(); | |
199 _STD_monitor_staticdtor(); | |
200 } | |
201 return result; | |
0 | 202 } |
25 | 203 |
74
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
204 } |
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
70
diff
changeset
|
205 |
0 | 206 int main(string[] args) |
207 { | |
22
fd4acc376c45
Implemented object file output and linking on linux.
Robert Clipsham <robert@octarineparrot.com>
parents:
14
diff
changeset
|
208 GC.disable(); |
34 | 209 CrashHandlerInit(); |
210 | |
0 | 211 Array files = new Array(); |
212 Array libmodules = new Array(); | |
213 Module m; | |
214 int status = ExitCode.EXIT_SUCCESS; | |
215 int argcstart = args.length; | |
216 int setdebuglib = 0; | |
130
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
217 byte noboundscheck = 0; |
0 | 218 |
219 global = new Global(); | |
220 | |
221 /// if (response_expand(&argc,&argv)) // expand response files | |
222 /// error("can't open response file"); | |
223 | |
224 files.reserve(args.length - 1); | |
225 | |
226 // Set default values | |
227 global.params.argv0 = args[0]; | |
228 global.params.link = 1; | |
229 global.params.useAssert = 1; | |
230 global.params.useInvariants = 1; | |
231 global.params.useIn = 1; | |
232 global.params.useOut = 1; | |
130
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
233 global.params.useArrayBounds = 2; // default to all functions |
0 | 234 global.params.useSwitchError = 1; |
235 global.params.useInline = 0; | |
236 global.params.obj = 1; | |
237 global.params.Dversion = 2; | |
238 global.params.quiet = 1; | |
239 | |
240 global.params.linkswitches = new Array(); | |
241 global.params.libfiles = new Array(); | |
242 global.params.objfiles = new Array(); | |
243 global.params.ddocfiles = new Array(); | |
244 | |
245 version (TARGET_WINDOS) { | |
246 global.params.defaultlibname = "phobos"; | |
14
2cc604139636
Implemented Linux support for ddmd. Some parts are a bit hacky to just "get it working", that said, druntime and phobos compile, and unittests pass.
Robert Clipsham <robert@octarineparrot.com>
parents:
4
diff
changeset
|
247 } else version (POSIX) { //#elif TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS |
0 | 248 global.params.defaultlibname = "phobos2"; |
249 } else version (TARGET_NET) { | |
250 } else { | |
251 static assert(false, "fix this"); | |
252 } | |
253 | |
254 // Predefine version identifiers | |
255 VersionCondition.addPredefinedGlobalIdent("DigitalMars"); | |
256 | |
257 version (TARGET_WINDOS) { | |
258 VersionCondition.addPredefinedGlobalIdent("Windows"); | |
259 global.params.isWindows = 1; | |
260 version (TARGET_NET) { | |
261 // TARGET_NET macro is NOT mutually-exclusive with TARGET_WINDOS | |
262 VersionCondition.addPredefinedGlobalIdent("D_NET"); | |
263 } | |
264 } else version (TARGET_LINUX) { | |
265 VersionCondition.addPredefinedGlobalIdent("Posix"); | |
266 VersionCondition.addPredefinedGlobalIdent("linux"); | |
267 global.params.isLinux = 1; | |
268 } else version (TARGET_OSX) { | |
269 VersionCondition.addPredefinedGlobalIdent("Posix"); | |
270 VersionCondition.addPredefinedGlobalIdent("OSX"); | |
271 global.params.isOSX = 1; | |
272 | |
273 // For legacy compatibility | |
274 VersionCondition.addPredefinedGlobalIdent("darwin"); | |
275 } else version (TARGET_FREEBSD) { | |
276 VersionCondition.addPredefinedGlobalIdent("Posix"); | |
277 VersionCondition.addPredefinedGlobalIdent("FreeBSD"); | |
278 global.params.isFreeBSD = 1; | |
279 } else version (TARGET_SOLARIS) { | |
280 VersionCondition.addPredefinedGlobalIdent("Posix"); | |
281 VersionCondition.addPredefinedGlobalIdent("Solaris"); | |
282 global.params.isSolaris = 1; | |
283 } else { | |
284 static assert (false, "fix this"); | |
285 } | |
286 | |
287 VersionCondition.addPredefinedGlobalIdent("LittleEndian"); | |
288 //VersionCondition.addPredefinedGlobalIdent("D_Bits"); | |
289 version (DMDV2) { | |
290 VersionCondition.addPredefinedGlobalIdent("D_Version2"); | |
291 } | |
292 VersionCondition.addPredefinedGlobalIdent("all"); | |
293 | |
114 | 294 version (Windows) |
295 { | |
296 inifile(args[0], "sc.ini"); | |
297 } | |
298 else version (Posix) ///linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 | |
299 { | |
300 inifile(args[0], "dmd.conf"); | |
301 } | |
302 else | |
303 { | |
304 static assert (false, "fix this"); | |
0 | 305 } |
306 args = getenv_setargv("DFLAGS", args); | |
307 | |
308 version (disabled) { | |
309 for (i = 0; i < argc; i++) | |
310 { | |
311 writef("argv[%d] = '%s'\n", i, argv[i]); | |
312 } | |
313 } | |
314 | |
315 foreach(i; 1..args.length) | |
316 { | |
317 auto arg = args[i]; | |
318 auto p = arg.ptr; | |
319 if (*p == '-') | |
320 { | |
321 arg = arg[1..$]; | |
322 if (arg == "d") | |
323 global.params.useDeprecated = 1; | |
324 else if (arg == "c") | |
325 global.params.link = 0; | |
326 else if (arg == "cov") | |
327 global.params.cov = 1; | |
328 ///version (XXX) {// TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS | |
329 /// else if (arg == "fPIC") | |
330 /// global.params.pic = 1; | |
331 ///} | |
332 else if (arg == "multiobj") | |
333 global.params.multiobj = 1; | |
334 else if (arg == "g") | |
335 global.params.symdebug = 1; | |
336 else if (arg == "gc") | |
337 global.params.symdebug = 2; | |
338 else if (arg == "gt") | |
339 { error("use -profile instead of -gt\n"); | |
340 global.params.trace = 1; | |
341 } | |
342 else if (arg == "m64") | |
343 global.params.isX86_64 = 1; | |
344 else if (arg == "profile") | |
345 global.params.trace = 1; | |
346 else if (arg == "v") | |
347 global.params.verbose = 1; | |
348 ///version (DMDV2) { | |
349 else if (arg == "vtls") | |
350 global.params.vtls = 1; | |
351 ///} | |
352 else if (arg == "v1") | |
353 { | |
354 version (DMDV1) { | |
355 global.params.Dversion = 1; | |
356 } else { | |
357 error("use DMD 1.0 series compilers for -v1 switch"); | |
358 break; | |
359 } | |
360 } | |
361 else if (arg == "w") | |
362 global.params.warnings = 1; | |
363 else if (arg == "O") | |
364 global.params.optimize = 1; | |
365 else if (p[1] == 'o') | |
366 { | |
367 switch (p[2]) | |
368 { | |
369 case '-': | |
370 global.params.obj = 0; | |
371 break; | |
372 | |
373 case 'd': | |
374 if (!p[3]) | |
375 goto Lnoarg; | |
376 global.params.objdir = arg[(p - arg.ptr) + 3..$]; | |
377 break; | |
378 | |
379 case 'f': | |
380 { | |
381 if (!p[3]) | |
382 goto Lnoarg; | |
383 | |
384 global.params.objname = arg[(p - arg.ptr) + 3..$]; | |
385 break; | |
386 } | |
387 | |
388 case 'p': | |
389 if (p[3]) | |
390 goto Lerror; | |
391 global.params.preservePaths = 1; | |
392 break; | |
393 | |
394 case 0: | |
395 error("-o no longer supported, use -of or -od"); | |
396 break; | |
397 | |
398 default: | |
399 goto Lerror; | |
400 } | |
401 } | |
402 else if (p[1] == 'D') | |
403 { global.params.doDocComments = 1; | |
404 switch (p[2]) | |
405 { | |
406 case 'd': | |
407 if (!p[3]) | |
408 goto Lnoarg; | |
409 global.params.docdir = arg[(p - arg.ptr) + 3..$]; | |
410 break; | |
411 case 'f': | |
412 if (!p[3]) | |
413 goto Lnoarg; | |
414 global.params.docname = arg[(p - arg.ptr) + 3..$]; | |
415 break; | |
416 | |
417 case 0: | |
418 break; | |
419 | |
420 default: | |
421 goto Lerror; | |
422 } | |
423 } | |
424 ///version (_DH) { | |
425 else if (p[1] == 'H') | |
426 { global.params.doHdrGeneration = 1; | |
427 switch (p[2]) | |
428 { | |
429 case 'd': | |
430 if (!p[3]) | |
431 goto Lnoarg; | |
432 global.params.hdrdir = arg[(p - arg.ptr) + 3..$]; | |
433 break; | |
434 | |
435 case 'f': | |
436 if (!p[3]) | |
437 goto Lnoarg; | |
438 global.params.hdrname = arg[(p - arg.ptr) + 3..$]; | |
439 break; | |
440 | |
441 case 0: | |
442 break; | |
443 | |
444 default: | |
445 goto Lerror; | |
446 } | |
447 } | |
448 ///} | |
79 | 449 else if (p[1] == 'X') |
450 { | |
451 global.params.doXGeneration = 1; | |
452 switch (p[2]) | |
453 { | |
454 case 'f': | |
455 if (!p[3]) | |
456 goto Lnoarg; | |
457 global.params.xfilename = arg[(p - arg.ptr) + 3..$]; | |
458 break; | |
459 | |
460 case 0: | |
461 break; | |
462 | |
463 default: | |
464 goto Lerror; | |
465 } | |
466 } | |
467 | |
0 | 468 else if (arg == "ignore") |
469 global.params.ignoreUnsupportedPragmas = 1; | |
470 else if (arg == "inline") | |
471 global.params.useInline = 1; | |
472 else if (arg == "lib") | |
473 global.params.lib = 1; | |
474 else if (arg == "nofloat") | |
475 global.params.nofloat = 1; | |
476 else if (arg == "quiet") | |
477 global.params.quiet = 1; | |
478 else if (arg == "release") | |
479 global.params.release = 1; | |
480 ///version (DMDV2) { | |
130
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
481 else if (arg == "noboundscheck") |
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
482 noboundscheck = 1; |
0 | 483 ///} |
484 else if (arg == "unittest") | |
485 global.params.useUnitTests = 1; | |
486 else if (p[1] == 'I') | |
487 { | |
488 if (!global.params.imppath) | |
489 global.params.imppath = new Array(); | |
490 global.params.imppath.push(cast(void*)new String(arg[(p - arg.ptr) + 2..$])); /// | |
491 } | |
492 else if (p[1] == 'J') | |
493 { | |
494 if (!global.params.fileImppath) | |
495 global.params.fileImppath = new Array(); | |
496 global.params.fileImppath.push(cast(void*)new String(arg[(p - arg.ptr) + 2..$])); | |
497 } | |
498 else if (memcmp(p + 1, "debug".ptr, 5) == 0 && p[6] != 'l') | |
499 { | |
500 // Parse: | |
501 // -debug | |
502 // -debug=number | |
503 // -debug=identifier | |
504 if (p[6] == '=') | |
505 { | |
506 if (isdigit(p[7])) | |
507 { long level; | |
508 | |
509 errno = 0; | |
510 level = strtol(p + 7, cast(char**)&p, 10); | |
511 if (*p || errno || level > INT_MAX) | |
512 goto Lerror; | |
513 DebugCondition.setGlobalLevel(cast(int)level); | |
514 } | |
515 else if (Lexer.isValidIdentifier(arg[(p - arg.ptr) + 7..$])) /// | |
516 DebugCondition.addGlobalIdent(p + 7); | |
517 else | |
518 goto Lerror; | |
519 } | |
520 else if (p[6]) | |
521 goto Lerror; | |
522 else | |
523 global.params.debuglevel = 1; | |
524 } | |
525 else if (memcmp(p + 1, "version".ptr, 5) == 0) | |
526 { | |
527 // Parse: | |
528 // -version=number | |
529 // -version=identifier | |
530 if (p[8] == '=') | |
531 { | |
532 if (isdigit(p[9])) | |
533 { long level; | |
534 | |
535 errno = 0; | |
536 level = strtol(p + 9, cast(char**)&p, 10); /// | |
537 if (*p || errno || level > INT_MAX) | |
538 goto Lerror; | |
539 VersionCondition.setGlobalLevel(cast(int)level); | |
540 } | |
541 else if (Lexer.isValidIdentifier(arg[(p - arg.ptr) + 9..$])) /// | |
542 VersionCondition.addGlobalIdent(arg[(p - arg.ptr) + 9..$]); | |
543 else | |
544 goto Lerror; | |
545 } | |
546 else | |
547 goto Lerror; | |
548 } | |
549 else if (arg == "-b") | |
550 global.params.debugb = 1; | |
551 else if (arg == "-c") | |
552 global.params.debugc = 1; | |
553 else if (arg == "-f") | |
554 global.params.debugf = 1; | |
555 else if (arg == "-help") | |
556 { usage(); | |
557 exit(EXIT_SUCCESS); | |
558 } | |
559 else if (arg == "-r") | |
560 global.params.debugr = 1; | |
561 else if (arg == "-x") | |
562 global.params.debugx = 1; | |
563 else if (arg == "-y") | |
564 global.params.debugy = 1; | |
565 else if (p[1] == 'L') | |
566 { | |
567 global.params.linkswitches.push(cast(void*)p + 2); | |
568 } | |
569 else if (memcmp(p + 1, "defaultlib=".ptr, 11) == 0) | |
570 { | |
571 global.params.defaultlibname = p + 1 + 11; | |
572 } | |
573 else if (memcmp(p + 1, "debuglib=".ptr, 9) == 0) | |
574 { | |
575 setdebuglib = 1; | |
576 global.params.debuglibname = p + 1 + 9; | |
577 } | |
578 else if (memcmp(p + 1, "deps=".ptr, 5) == 0) | |
579 { | |
580 global.params.moduleDepsFile = arg[(p - arg.ptr) + 1 + 5..$]; | |
581 if (!global.params.moduleDepsFile[0]) | |
582 goto Lnoarg; | |
583 global.params.moduleDeps = new OutBuffer; | |
584 } | |
585 else if (memcmp(p + 1, "man".ptr, 3) == 0) | |
586 { | |
114 | 587 version (Windows) { |
0 | 588 version (DMDV1) { |
589 browse("http://www.digitalmars.com/d/1.0/dmd-windows.html"); | |
590 } else { | |
591 browse("http://www.digitalmars.com/d/2.0/dmd-windows.html"); | |
592 } | |
593 } | |
594 version (linux) { | |
595 version (DMDV1) { | |
596 browse("http://www.digitalmars.com/d/1.0/dmd-linux.html"); | |
597 } else { | |
598 browse("http://www.digitalmars.com/d/2.0/dmd-linux.html"); | |
599 } | |
600 } | |
601 version (__APPLE__) { | |
602 version (DMDV1) { | |
603 browse("http://www.digitalmars.com/d/1.0/dmd-osx.html"); | |
604 } else { | |
605 browse("http://www.digitalmars.com/d/2.0/dmd-osx.html"); | |
606 } | |
607 } | |
608 version (__FreeBSD__) { | |
609 version (DMDV1) { | |
610 browse("http://www.digitalmars.com/d/1.0/dmd-freebsd.html"); | |
611 } else { | |
612 browse("http://www.digitalmars.com/d/2.0/dmd-freebsd.html"); | |
613 } | |
614 } | |
615 exit(EXIT_SUCCESS); | |
616 } | |
617 else if (arg == "run") | |
618 { global.params.run = 1; | |
619 global.params.runargs_length = ((i >= argcstart) ? args.length : argcstart) - i - 1; | |
620 if (global.params.runargs_length) | |
621 { | |
622 files.push(cast(void*)args[i + 1].ptr); | |
623 global.params.runargs = args[i + 2..$]; | |
624 i += global.params.runargs_length; | |
625 global.params.runargs_length--; | |
626 } | |
627 else | |
628 { global.params.run = 0; | |
629 goto Lnoarg; | |
630 } | |
631 } | |
632 else | |
633 { | |
634 Lerror: | |
635 error("unrecognized switch '%s'", args[i]); | |
636 continue; | |
637 | |
638 Lnoarg: | |
639 error("argument expected for switch '%s'", args[i]); | |
640 continue; | |
641 } | |
642 } | |
643 else | |
644 { | |
645 version (TARGET_WINDOS) { | |
646 string ext = FileName.ext(p[0..arg.length]); | |
647 if (ext != null && FileName.compare(ext, "exe") == 0) | |
648 { | |
649 global.params.objname = arg[(p - arg.ptr)..$]; | |
650 continue; | |
651 } | |
652 } | |
653 files.push(cast(void*)new String(arg[(p - arg.ptr)..$])); | |
654 } | |
655 } | |
656 if (global.errors) | |
657 { | |
658 fatal(); | |
659 } | |
660 if (files.dim == 0) | |
661 { usage(); | |
662 return EXIT_FAILURE; | |
663 } | |
664 | |
665 if (!setdebuglib) | |
666 global.params.debuglibname = global.params.defaultlibname; | |
667 | |
668 version (TARGET_OSX) { | |
669 global.params.pic = 1; | |
670 } | |
671 | |
672 if (global.params.release) | |
130
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
673 { |
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
674 global.params.useInvariants = 0; |
0 | 675 global.params.useIn = 0; |
676 global.params.useOut = 0; | |
677 global.params.useAssert = 0; | |
678 global.params.useArrayBounds = 0; | |
679 global.params.useSwitchError = 0; | |
680 } | |
130
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
681 |
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
682 if (noboundscheck) |
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
683 global.params.useArrayBounds = 0; |
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
684 |
0 | 685 if (global.params.run) |
686 global.params.quiet = 1; | |
687 | |
688 if (global.params.useUnitTests) | |
689 global.params.useAssert = 1; | |
690 | |
691 if (!global.params.obj || global.params.lib) | |
692 global.params.link = 0; | |
693 | |
694 if (global.params.link) | |
695 { | |
696 global.params.exefile = global.params.objname; | |
697 global.params.oneobj = 1; | |
698 if (global.params.objname) | |
699 { | |
700 /* Use this to name the one object file with the same | |
701 * name as the exe file. | |
702 */ | |
703 global.params.objname = FileName.forceExt(global.params.objname, global.obj_ext).toChars(); | |
704 | |
705 /* If output directory is given, use that path rather than | |
706 * the exe file path. | |
707 */ | |
708 if (global.params.objdir) | |
709 { | |
710 string name = FileName.name(global.params.objname); | |
711 global.params.objname = FileName.combine(global.params.objdir, name); | |
712 } | |
713 } | |
714 } | |
715 else if (global.params.lib) | |
716 { | |
717 global.params.libname = global.params.objname; | |
718 global.params.objname = null; | |
719 | |
720 // Haven't investigated handling these options with multiobj | |
721 if (!global.params.cov && !global.params.trace) | |
722 global.params.multiobj = 1; | |
723 } | |
724 else if (global.params.run) | |
725 { | |
726 error("flags conflict with -run"); | |
727 fatal(); | |
728 } | |
729 else | |
730 { | |
731 if (global.params.objname && files.dim > 1) | |
732 { | |
733 global.params.oneobj = 1; | |
734 //error("multiple source files, but only one .obj name"); | |
735 //fatal(); | |
736 } | |
737 } | |
738 if (global.params.isX86_64) | |
739 { | |
740 VersionCondition.addPredefinedGlobalIdent("D_InlineAsm_X86_64"); | |
741 VersionCondition.addPredefinedGlobalIdent("X86_64"); | |
742 VersionCondition.addPredefinedGlobalIdent("D_LP64"); | |
743 version (TARGET_WINDOS) { | |
744 VersionCondition.addPredefinedGlobalIdent("Win64"); | |
745 } | |
746 } | |
747 else | |
748 { | |
749 VersionCondition.addPredefinedGlobalIdent("D_InlineAsm"); | |
750 VersionCondition.addPredefinedGlobalIdent("D_InlineAsm_X86"); | |
751 VersionCondition.addPredefinedGlobalIdent("X86"); | |
752 version (TARGET_WINDOS) { | |
753 VersionCondition.addPredefinedGlobalIdent("Win32"); | |
754 } | |
755 } | |
756 if (global.params.doDocComments) | |
757 VersionCondition.addPredefinedGlobalIdent("D_Ddoc"); | |
758 if (global.params.cov) | |
759 VersionCondition.addPredefinedGlobalIdent("D_Coverage"); | |
760 if (global.params.pic) | |
761 VersionCondition.addPredefinedGlobalIdent("D_PIC"); | |
762 version (DMDV2) { | |
763 if (global.params.useUnitTests) | |
764 VersionCondition.addPredefinedGlobalIdent("unittest"); | |
765 } | |
766 | |
767 // Initialization | |
768 Type.init(); | |
769 Id.initialize(); | |
770 Module.init(); | |
771 initPrecedence(); | |
772 | |
773 backend_init(); | |
774 | |
775 //printf("%d source files\n",files.dim); | |
776 | |
777 // Build import search path | |
778 if (global.params.imppath) | |
779 { | |
780 for (int i = 0; i < global.params.imppath.dim; i++) | |
781 { | |
782 string path = (cast(String)global.params.imppath.data[i]).str; | |
783 string[] a = FileName.splitPath(path); | |
784 | |
785 global.path ~= a; | |
786 } | |
787 } | |
788 | |
789 // Build string import search path | |
790 if (global.params.fileImppath) | |
791 { | |
792 for (int i = 0; i < global.params.fileImppath.dim; i++) | |
793 { | |
794 string path = (cast(String)global.params.fileImppath.data[i]).str; | |
795 string[] a = FileName.splitPath(path); | |
796 | |
797 global.filePath ~= a; | |
798 } | |
799 } | |
800 | |
801 // Create Modules | |
802 Array modules = new Array(); | |
803 modules.reserve(files.dim); | |
804 int firstmodule = 1; | |
805 for (int i = 0; i < files.dim; i++) | |
806 { | |
807 string ext; | |
808 string name; | |
809 | |
810 String s = cast(String) files.data[i]; | |
811 string mp = s.str; | |
812 | |
114 | 813 version (Windows) { |
0 | 814 char[] copy = null; |
815 // Convert / to \ so linker will work | |
816 foreach (j, c; mp) | |
817 { | |
818 if (c == '/') { | |
819 if (copy is null) copy = mp.dup; | |
820 copy[j] = '\\'; | |
821 } | |
822 } | |
823 | |
824 if (copy !is null) mp = assumeUnique(copy); | |
825 } | |
826 string p = mp; | |
827 | |
828 p = FileName.name(p); // strip path | |
829 ext = FileName.ext(p); | |
830 | |
831 if (ext.length != 0) | |
832 { /* Deduce what to do with a file based on its extension | |
833 */ | |
834 if (FileName.equals(ext, global.obj_ext)) | |
835 { | |
836 global.params.objfiles.push(files.data[i]); | |
837 libmodules.push(files.data[i]); | |
838 continue; | |
839 } | |
840 | |
841 if (FileName.equals(ext, global.lib_ext)) | |
842 { | |
843 global.params.libfiles.push(files.data[i]); | |
844 libmodules.push(files.data[i]); | |
845 continue; | |
846 } | |
847 | |
848 if (ext == global.ddoc_ext) | |
849 { | |
850 global.params.ddocfiles.push(files.data[i]); | |
851 continue; | |
852 } | |
79 | 853 |
854 if (FileName.equals(ext, global.json_ext)) | |
855 { | |
856 global.params.doXGeneration = 1; | |
857 global.params.xfilename = (cast(immutable(char)*)files.data[i])[0..0]; | |
858 continue; | |
859 } | |
0 | 860 |
79 | 861 version (TARGET_WINDOS) |
862 { | |
0 | 863 if (FileName.equals(ext, "res")) |
864 { | |
865 global.params.resfile = (cast(immutable(char)*)files.data[i])[0..0]; /// !!! | |
866 continue; | |
867 } | |
868 | |
869 if (FileName.equals(ext, "def")) | |
870 { | |
871 global.params.deffile = (cast(immutable(char)*)files.data[i])[0..0]; | |
872 continue; | |
873 } | |
874 | |
875 if (FileName.equals(ext, "exe")) | |
876 { | |
877 assert(0); // should have already been handled | |
878 } | |
879 } | |
880 | |
881 /* Examine extension to see if it is a valid | |
882 * D source file extension | |
883 */ | |
884 if (FileName.equals(ext, global.mars_ext) || | |
885 FileName.equals(ext, global.hdr_ext) || | |
886 FileName.equals(ext, "dd") || | |
887 FileName.equals(ext, "htm") || | |
888 FileName.equals(ext, "html") || | |
889 FileName.equals(ext, "xhtml")) | |
890 { | |
891 immutable(char)* e = ext.ptr; | |
892 e--; // skip onto '.' | |
893 assert(*e == '.'); | |
894 | |
895 immutable(char)* n = p.ptr; | |
896 | |
897 name = n[0..(e-n)]; // strip extension | |
898 | |
899 if (name.length == 0 || name == ".." || name == ".") | |
900 { | |
901 Linvalid: | |
902 error("invalid file name '%s'", (cast(String)files.data[i]).str); | |
903 fatal(); | |
904 } | |
905 } | |
906 else | |
907 { error("unrecognized file extension %s\n", ext); | |
908 fatal(); | |
909 } | |
910 } | |
911 else | |
912 { | |
913 name = p; | |
914 if (!*name) | |
915 goto Linvalid; | |
916 } | |
917 | |
918 /* At this point, name is the D source file name stripped of | |
919 * its path and extension. | |
920 */ | |
921 | |
922 Identifier id = new Identifier(name, TOK.TOKreserved); | |
923 m = new Module((cast(String) files.data[i]).str, id, global.params.doDocComments, global.params.doHdrGeneration); | |
924 modules.push(cast(void*)m); | |
925 | |
926 if (firstmodule) | |
927 { | |
928 global.params.objfiles.push(cast(void*)m.objfile.name); | |
929 firstmodule = 0; | |
930 } | |
931 } | |
932 | |
933 // Read files | |
934 //version = ASYNCREAD; | |
935 version (ASYNCREAD) { | |
936 // Multi threaded | |
937 AsyncRead *aw = AsyncRead.create(modules.dim); | |
938 for (i = 0; i < modules.dim; i++) | |
939 { | |
940 m = cast(Module *)modules.data[i]; | |
941 aw.addFile(m.srcfile); | |
942 } | |
943 aw.start(); | |
944 } else { | |
945 // Single threaded | |
946 for (int i = 0; i < modules.dim; i++) | |
947 { | |
948 m = cast(Module)modules.data[i]; | |
949 m.read(Loc(0)); | |
950 } | |
951 } | |
952 | |
953 // Parse files | |
954 int anydocfiles = 0; | |
955 for (int i = 0; i < modules.dim; i++) | |
956 { | |
957 m = cast(Module)modules.data[i]; | |
958 if (global.params.verbose) | |
959 writef("parse %s\n", m.toChars()); | |
960 if (!Module.rootModule) | |
961 Module.rootModule = m; | |
962 m.importedFrom = m; | |
963 if (!global.params.oneobj || i == 0 || m.isDocFile) | |
964 m.deleteObjFile(); | |
965 version (ASYNCREAD) { | |
966 if (aw.read(i)) | |
967 { | |
968 error("cannot read file %s", m.srcfile.name.toChars()); | |
969 } | |
970 } | |
971 | |
972 //while (loop) {} | |
973 m.parse(); | |
974 if (m.isDocFile) | |
975 { | |
976 anydocfiles = 1; | |
977 m.gendocfile(); | |
978 | |
979 // Remove m from list of modules | |
980 modules.remove(i); | |
981 i--; | |
982 | |
983 // Remove m's object file from list of object files | |
984 for (int j = 0; j < global.params.objfiles.dim; j++) | |
985 { | |
986 if (m.objfile.name.str == (cast(FileName)global.params.objfiles.data[j]).str) | |
987 { | |
988 global.params.objfiles.remove(j); | |
989 break; | |
990 } | |
991 } | |
992 | |
993 if (global.params.objfiles.dim == 0) | |
994 global.params.link = 0; | |
995 } | |
996 } | |
997 version (ASYNCREAD) { | |
998 AsyncRead.dispose(aw); | |
999 } | |
1000 | |
1001 if (anydocfiles && modules.dim && | |
1002 (global.params.oneobj || global.params.objname)) | |
1003 { | |
1004 error("conflicting Ddoc and obj generation options"); | |
1005 fatal(); | |
1006 } | |
1007 if (global.errors) | |
1008 fatal(); | |
79 | 1009 version (_DH) |
1010 { | |
0 | 1011 if (global.params.doHdrGeneration) |
1012 { | |
1013 /* Generate 'header' import files. | |
1014 * Since 'header' import files must be independent of command | |
1015 * line switches and what else is imported, they are generated | |
1016 * before any semantic analysis. | |
1017 */ | |
1018 for (i = 0; i < modules.dim; i++) | |
1019 { | |
79 | 1020 m = cast(Module)modules.data[i]; |
0 | 1021 if (global.params.verbose) |
1022 writef("import %s\n", m.toChars()); | |
1023 m.genhdrfile(); | |
1024 } | |
1025 } | |
1026 if (global.errors) | |
1027 fatal(); | |
1028 } | |
79 | 1029 //load all unconditional imports for better symbol resolving |
1030 for (int i = 0; i < modules.dim; i++) | |
1031 { | |
1032 m = cast(Module)modules.data[i]; | |
1033 if (global.params.verbose) | |
1034 writef("importall %s\n", m.toChars()); | |
1035 m.importAll(null); | |
1036 } | |
1037 if (global.errors) | |
1038 fatal(); | |
0 | 1039 |
1040 // Do semantic analysis | |
1041 for (int i = 0; i < modules.dim; i++) | |
1042 { | |
1043 m = cast(Module)modules.data[i]; | |
1044 if (global.params.verbose) | |
1045 writef("semantic %s\n", m.toChars()); | |
1046 m.semantic(); | |
1047 } | |
1048 if (global.errors) | |
1049 fatal(); | |
1050 | |
1051 // Do pass 2 semantic analysis | |
1052 for (int i = 0; i < modules.dim; i++) | |
1053 { | |
1054 m = cast(Module)modules.data[i]; | |
1055 if (global.params.verbose) | |
1056 writef("semantic2 %s\n", m.toChars()); | |
1057 m.semantic2(); | |
1058 } | |
1059 if (global.errors) | |
1060 fatal(); | |
1061 | |
1062 // Do pass 3 semantic analysis | |
1063 for (int i = 0; i < modules.dim; i++) | |
1064 { | |
1065 m = cast(Module)modules.data[i]; | |
1066 if (global.params.verbose) | |
1067 writef("semantic3 %s\n", m.toChars()); | |
1068 m.semantic3(); | |
1069 } | |
1070 if (global.errors) | |
1071 fatal(); | |
1072 | |
1073 if (global.params.moduleDeps !is null) | |
1074 { | |
1075 assert(global.params.moduleDepsFile !is null); | |
1076 | |
1077 File deps = new File(global.params.moduleDepsFile); | |
1078 OutBuffer ob = global.params.moduleDeps; | |
1079 deps.setbuffer(cast(void*)ob.data, ob.offset); | |
1080 deps.writev(); | |
1081 } | |
1082 | |
1083 | |
1084 // Scan for functions to inline | |
1085 if (global.params.useInline) | |
1086 { | |
1087 /* The problem with useArrayBounds and useAssert is that the | |
1088 * module being linked to may not have generated them, so if | |
1089 * we inline functions from those modules, the symbols for them will | |
1090 * not be found at link time. | |
1091 */ | |
1092 if (!global.params.useArrayBounds && !global.params.useAssert) | |
1093 { | |
1094 // Do pass 3 semantic analysis on all imported modules, | |
1095 // since otherwise functions in them cannot be inlined | |
1096 for (int i = 0; i < Module.amodules.dim; i++) | |
1097 { | |
1098 m = cast(Module)Module.amodules.data[i]; | |
1099 if (global.params.verbose) | |
1100 writef("semantic3 %s\n", m.toChars()); | |
1101 m.semantic3(); | |
1102 } | |
1103 if (global.errors) | |
1104 fatal(); | |
1105 } | |
1106 | |
1107 for (int i = 0; i < modules.dim; i++) | |
1108 { | |
1109 m = cast(Module)modules.data[i]; | |
1110 if (global.params.verbose) | |
1111 writef("inline scan %s\n", m.toChars()); | |
1112 | |
1113 m.inlineScan(); | |
1114 } | |
1115 } | |
1116 if (global.errors) | |
1117 fatal(); | |
1118 | |
1119 Library library = null; | |
1120 if (global.params.lib) | |
1121 { | |
1122 library = new Library(); | |
1123 library.setFilename(global.params.objdir, global.params.libname); | |
1124 | |
1125 // Add input object and input library files to output library | |
1126 for (int i = 0; i < libmodules.dim; i++) | |
1127 { | |
1128 string p = (cast(String)libmodules.data[i]).str; | |
1129 library.addObject(p, null, 0); | |
1130 } | |
1131 } | |
1132 | |
1133 // Generate output files | |
79 | 1134 if (global.params.doXGeneration) |
1135 json_generate(modules); | |
1136 | |
0 | 1137 if (global.params.oneobj) |
1138 { | |
1139 for (int i = 0; i < modules.dim; i++) | |
1140 { | |
1141 m = cast(Module)modules.data[i]; | |
1142 if (global.params.verbose) | |
1143 writef("code %s\n", m.toChars()); | |
1144 if (i == 0) | |
1145 obj_start(cast(char*)toStringz(m.srcfile.toChars())); | |
1146 m.genobjfile(0); | |
1147 if (!global.errors && global.params.doDocComments) | |
1148 m.gendocfile(); | |
1149 } | |
1150 if (!global.errors && modules.dim) | |
1151 { | |
1152 obj_end(library, (cast(Module)modules.data[0]).objfile); | |
1153 } | |
1154 } | |
1155 else | |
1156 { | |
1157 for (int i = 0; i < modules.dim; i++) | |
1158 { | |
1159 m = cast(Module)modules.data[i]; | |
1160 if (global.params.verbose) | |
1161 writef("code %s\n", m.toChars()); | |
1162 if (global.params.obj) | |
1163 { | |
1164 obj_start(cast(char*)toStringz(m.srcfile.toChars())); | |
1165 m.genobjfile(global.params.multiobj); | |
1166 obj_end(library, m.objfile); | |
1167 obj_write_deferred(library); | |
1168 } | |
1169 if (global.errors) | |
1170 { | |
1171 if (!global.params.lib) | |
1172 m.deleteObjFile(); | |
1173 } | |
1174 else | |
1175 { | |
1176 if (global.params.doDocComments) | |
1177 m.gendocfile(); | |
1178 } | |
1179 } | |
1180 } | |
1181 | |
1182 if (global.params.lib && !global.errors) | |
1183 library.write(); | |
1184 | |
1185 backend_term(); | |
1186 if (global.errors) | |
1187 fatal(); | |
1188 | |
1189 if (!global.params.objfiles.dim) | |
1190 { | |
1191 if (global.params.link) | |
1192 error("no object files to link"); | |
1193 } | |
1194 else | |
1195 { | |
1196 if (global.params.link) | |
1197 status = runLINK(); | |
1198 | |
1199 if (global.params.run) | |
1200 { | |
1201 if (!status) | |
1202 { | |
1203 status = runProgram(); | |
1204 | |
1205 /* Delete .obj files and .exe file | |
1206 */ | |
1207 for (int i = 0; i < modules.dim; i++) | |
1208 { | |
1209 m = cast(Module)modules.data[i]; | |
1210 m.deleteObjFile(); | |
1211 if (global.params.oneobj) | |
1212 break; | |
1213 } | |
1214 deleteExeFile(); | |
1215 } | |
1216 } | |
1217 } | |
1218 | |
1219 return status; | |
14
2cc604139636
Implemented Linux support for ddmd. Some parts are a bit hacky to just "get it working", that said, druntime and phobos compile, and unittests pass.
Robert Clipsham <robert@octarineparrot.com>
parents:
4
diff
changeset
|
1220 } |