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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.Global;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
114
e28b18c23469 added a module dmd.common for commonly used stuff
Trass3r
parents: 96
diff changeset
3 import dmd.common;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 import dmd.Array;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
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
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9 class Global
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 string mars_ext = "d";
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 string sym_ext = "d";
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 version (TARGET_WINDOS) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
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
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 string obj_ext = "o";
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 } else version (TARGET_NET) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 } else {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 static assert (false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
22
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 version (TARGET_WINDOS) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
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
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26 string lib_ext = "a";
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 } else version (TARGET_NET) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 } else {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 static assert (false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30 }
79
43073c7c7769 updated to 2.035
Trass3r
parents: 75
diff changeset
31 string doc_ext = "html"; // for Ddoc generated files
43073c7c7769 updated to 2.035
Trass3r
parents: 75
diff changeset
32 string ddoc_ext = "ddoc"; // for Ddoc macro include files
43073c7c7769 updated to 2.035
Trass3r
parents: 75
diff changeset
33 string json_ext = "json";
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
34 string hdr_ext = "di"; // for D 'header' import files
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
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
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37 ///version (TARGET_NET) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
38 /// "\nMSIL back-end (alpha release) by Cristian L. Vlasceanu and associates.";
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
39 ///}
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
40
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
41 string[] path; // Array of char*'s which form the import lookup path
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
42 string[] filePath; // Array of char*'s which form the file import lookup path
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
43 int structalign = 8;
138
Trass3r
parents: 135
diff changeset
44 string version_ = "v2.039";
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
45
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
46 Param params;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
47 uint errors; // number of errors reported so far
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
48 uint gag; // !=0 means gag reporting of errors
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
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
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
56 this()
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
57 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
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
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
60 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
61 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
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;