Mercurial > projects > ddmd
annotate dmd/Global.d @ 167:50a6d232176c
rewrite GlobalExpressions, moved DsymbolTable to Global, some cleanup
author | korDen |
---|---|
date | Thu, 30 Sep 2010 12:13:49 +0400 |
parents | d8565fbd755c |
children | ceed63f310fb |
rev | line source |
---|---|
0 | 1 module dmd.Global; |
2 | |
114 | 3 import dmd.common; |
0 | 4 import dmd.Array; |
5 import dmd.Param; | |
166
d8565fbd755c
Moved object and classinfo from ClassDeclaration to Global (as part of getting rid of the global state)
korDen
parents:
138
diff
changeset
|
6 import dmd.ClassDeclaration; |
167
50a6d232176c
rewrite GlobalExpressions, moved DsymbolTable to Global, some cleanup
korDen
parents:
166
diff
changeset
|
7 import dmd.DsymbolTable; |
0 | 8 |
9 class Global | |
10 { | |
11 string mars_ext = "d"; | |
12 string sym_ext = "d"; | |
13 | |
14 version (TARGET_WINDOS) { | |
15 string obj_ext = "obj"; | |
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:
0
diff
changeset
|
16 } else version (POSIX) { // TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS |
0 | 17 string obj_ext = "o"; |
18 } else version (TARGET_NET) { | |
19 } else { | |
20 static assert (false); | |
21 } | |
22 | |
23 version (TARGET_WINDOS) { | |
24 string lib_ext = "lib"; | |
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:
0
diff
changeset
|
25 } else version (POSIX) { // TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS |
0 | 26 string lib_ext = "a"; |
27 } else version (TARGET_NET) { | |
28 } else { | |
29 static assert (false); | |
30 } | |
79 | 31 string doc_ext = "html"; // for Ddoc generated files |
32 string ddoc_ext = "ddoc"; // for Ddoc macro include files | |
33 string json_ext = "json"; | |
0 | 34 string hdr_ext = "di"; // for D 'header' import files |
35 string copyright= "Copyright (c) 1999-2009 by Digital Mars"; | |
75
cfa3747ebe4c
Changed dmd to ddmd in the "usage" message and added "ported to D by community" to desription to distinguish from pure dmd build
korDen
parents:
73
diff
changeset
|
36 string written = "written by Walter Bright, ported to D by community"; |
0 | 37 ///version (TARGET_NET) { |
38 /// "\nMSIL back-end (alpha release) by Cristian L. Vlasceanu and associates."; | |
39 ///} | |
40 | |
41 string[] path; // Array of char*'s which form the import lookup path | |
42 string[] filePath; // Array of char*'s which form the file import lookup path | |
43 int structalign = 8; | |
138 | 44 string version_ = "v2.039"; |
0 | 45 |
46 Param params; | |
47 uint errors; // number of errors reported so far | |
48 uint gag; // !=0 means gag reporting of errors | |
49 | |
166
d8565fbd755c
Moved object and classinfo from ClassDeclaration to Global (as part of getting rid of the global state)
korDen
parents:
138
diff
changeset
|
50 ClassDeclaration object; |
d8565fbd755c
Moved object and classinfo from ClassDeclaration to Global (as part of getting rid of the global state)
korDen
parents:
138
diff
changeset
|
51 ClassDeclaration classinfo; |
d8565fbd755c
Moved object and classinfo from ClassDeclaration to Global (as part of getting rid of the global state)
korDen
parents:
138
diff
changeset
|
52 |
167
50a6d232176c
rewrite GlobalExpressions, moved DsymbolTable to Global, some cleanup
korDen
parents:
166
diff
changeset
|
53 // Used in FuncDeclaration.genCfunc() |
50a6d232176c
rewrite GlobalExpressions, moved DsymbolTable to Global, some cleanup
korDen
parents:
166
diff
changeset
|
54 DsymbolTable st; |
50a6d232176c
rewrite GlobalExpressions, moved DsymbolTable to Global, some cleanup
korDen
parents:
166
diff
changeset
|
55 |
0 | 56 this() |
57 { | |
58 params.versionids = new Array(); | |
167
50a6d232176c
rewrite GlobalExpressions, moved DsymbolTable to Global, some cleanup
korDen
parents:
166
diff
changeset
|
59 st = new DsymbolTable(); |
0 | 60 } |
61 } | |
62 | |
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:
0
diff
changeset
|
63 Global global; |