comparison dmd/mars.h @ 1587:def7a1d494fd

Merge DMD 1.051
author Christian Kamm <kamm incasoftware de>
date Fri, 06 Nov 2009 23:58:01 +0100
parents 7f728c52e63c
children a413ae7329bf
comparison
equal deleted inserted replaced
1586:7f728c52e63c 1587:def7a1d494fd
46 TARGET_WINDOS Covers 32 bit windows and 64 bit windows 46 TARGET_WINDOS Covers 32 bit windows and 64 bit windows
47 TARGET_LINUX Covers 32 and 64 bit linux 47 TARGET_LINUX Covers 32 and 64 bit linux
48 TARGET_OSX Covers 32 and 64 bit Mac OSX 48 TARGET_OSX Covers 32 and 64 bit Mac OSX
49 TARGET_FREEBSD Covers 32 and 64 bit FreeBSD 49 TARGET_FREEBSD Covers 32 and 64 bit FreeBSD
50 TARGET_SOLARIS Covers 32 and 64 bit Solaris 50 TARGET_SOLARIS Covers 32 and 64 bit Solaris
51 TARGET_NET Covers .Net
51 52
52 It is expected that the compiler for each platform will be able 53 It is expected that the compiler for each platform will be able
53 to generate 32 and 64 bit code from the same compiler binary. 54 to generate 32 and 64 bit code from the same compiler binary.
54 55
55 Target object module format: 56 Target object module format:
159 #if !IN_LLVM 160 #if !IN_LLVM
160 // LDC uses a different mechanism 161 // LDC uses a different mechanism
161 bool optimize; // run optimizer 162 bool optimize; // run optimizer
162 char optimizeLevel; // optimization level 163 char optimizeLevel; // optimization level
163 #endif 164 #endif
165 char vtls; // identify thread local variables
164 ARCH cpu; // target CPU 166 ARCH cpu; // target CPU
165 OS os; // target OS 167 OS os; // target OS
166 bool is64bit; // generate 64 bit code 168 bool is64bit; // generate 64 bit code
167 bool isLE; // generate little endian code 169 bool isLE; // generate little endian code
168 bool useDeprecated; // allow use of deprecated features 170 bool useDeprecated; // allow use of deprecated features
191 193
192 bool doHdrGeneration; // process embedded documentation comments 194 bool doHdrGeneration; // process embedded documentation comments
193 char *hdrdir; // write 'header' file to docdir directory 195 char *hdrdir; // write 'header' file to docdir directory
194 char *hdrname; // write 'header' file to docname 196 char *hdrname; // write 'header' file to docname
195 197
198 char doXGeneration; // write JSON file
199 char *xfilename; // write JSON file to xfilename
200
196 unsigned debuglevel; // debug level 201 unsigned debuglevel; // debug level
197 Array *debugids; // debug identifiers 202 Array *debugids; // debug identifiers
198 203
199 unsigned versionlevel; // version level 204 unsigned versionlevel; // version level
200 Array *versionids; // version identifiers 205 Array *versionids; // version identifiers
202 bool dump_source; 207 bool dump_source;
203 208
204 Array *defaultlibnames; // default libraries for non-debug builds 209 Array *defaultlibnames; // default libraries for non-debug builds
205 Array *debuglibnames; // default libraries for debug builds 210 Array *debuglibnames; // default libraries for debug builds
206 211
207 const char *xmlname; // filename for XML output 212 char *moduleDepsFile; // filename for deps output
208 213 OutBuffer *moduleDeps; // contents to be written to deps file
209 OutBuffer *moduleDeps; // buffer and filename for emitting module deps 214
210 char *moduleDepsFile;
211
212 // Hidden debug switches 215 // Hidden debug switches
213 bool debuga; 216 bool debuga;
214 bool debugb; 217 bool debugb;
215 bool debugc; 218 bool debugc;
216 bool debugf; 219 bool debugf;
258 char *s_ext; 261 char *s_ext;
259 const char *lib_ext; 262 const char *lib_ext;
260 const char *doc_ext; // for Ddoc generated files 263 const char *doc_ext; // for Ddoc generated files
261 const char *ddoc_ext; // for Ddoc macro include files 264 const char *ddoc_ext; // for Ddoc macro include files
262 const char *hdr_ext; // for D 'header' import files 265 const char *hdr_ext; // for D 'header' import files
266 const char *json_ext; // for JSON files
263 const char *copyright; 267 const char *copyright;
264 const char *written; 268 const char *written;
265 Array *path; // Array of char*'s which form the import lookup path 269 Array *path; // Array of char*'s which form the import lookup path
266 Array *filePath; // Array of char*'s which form the file import lookup path 270 Array *filePath; // Array of char*'s which form the file import lookup path
267 int structalign; 271 int structalign;
342 struct Module; 346 struct Module;
343 347
344 //typedef unsigned Loc; // file location 348 //typedef unsigned Loc; // file location
345 struct Loc 349 struct Loc
346 { 350 {
347 char *filename; 351 const char *filename;
348 unsigned linnum; 352 unsigned linnum;
349 353
350 Loc() 354 Loc()
351 { 355 {
352 linnum = 0; 356 linnum = 0;
360 } 364 }
361 365
362 Loc(Module *mod, unsigned linnum); 366 Loc(Module *mod, unsigned linnum);
363 367
364 char *toChars() const; 368 char *toChars() const;
369 bool equals(const Loc& loc);
365 }; 370 };
366 371
367 #ifndef GCC_SAFE_DMD 372 #ifndef GCC_SAFE_DMD
368 #define TRUE 1 373 #define TRUE 1
369 #define FALSE 0 374 #define FALSE 0
424 429
425 /*** Where to send error messages ***/ 430 /*** Where to send error messages ***/
426 #if IN_GCC || IN_LLVM 431 #if IN_GCC || IN_LLVM
427 #define stdmsg stderr 432 #define stdmsg stderr
428 #else 433 #else
429 #define stdmsg stdout 434 #define stdmsg stderr
430 #endif 435 #endif
431 436
432 #endif /* DMD_MARS_H */ 437 #endif /* DMD_MARS_H */