Frits van Bommel
e37c82d1ec
Use LLVM OStream wrapper instead of <iostream> in the logger.
...
llvm::OStream provides all std::ostream functionality (by holding a
std::ostream* internally), but
* doesn't include <iostream>, avoiding per-file overhead.
* allows the stream pointer to be null, and the (inlined) operators do nothing
when that's the case. (This also allows removal of the ofstream("/dev/null")
hack Logger used when disabled, which presumably wasn't very portable)
2009-02-26 14:51:02 +01:00
Frits van Bommel
f61733cb57
Call llvm_shutdown when shutting down the backend.
2009-02-25 19:30:06 +01:00
Christian Kamm
d6a264e74b
Fix #216 by implementing TypeExp::toElem. It just provides the appropriate
...
error message.
2009-02-17 18:25:34 +01:00
Tomas Lindquist Olsen
7d2a0a84a7
Removed some dead code.
...
Fixed assertion filenames for imported template instances. Fixes #152 .
2009-02-04 02:10:23 +01:00
Tomas Lindquist Olsen
280be5ef8e
Fixed dstress/run/a/array_initialization_17_A.d regression. default initialized static array elements in a constant static array initializer was getting incorrect values.
...
Fixed minor version problem in mini/naked_asm4.d test case.
2009-02-03 23:48:47 +01:00
Tomas Lindquist Olsen
dc5944df99
Implemented proper support for naked asm using llvm module level asm. Still not 100% complete, but already 1000 times better that what we had before. Don's BignumX86 implementation from Tango (when turned into a standalone unittest) seems to fully work with no changes, and great performance :)
...
Fixed align N; in asm blocks.
Fixed inreg parameter passing on x86 for ref/out params.
Removed support for lazy initialization of function local static variables, I have no idea why I ever implemented this, it's not in the D spec, and DMD doesn't support it :P
Some of the global variable related changes might cause minor regressions, but they should be easily fixable.
2009-02-03 08:54:57 +01:00
Tomas Lindquist Olsen
75591b3c16
Changed templates and typeinfo to use linkonce linkage instead of weak linkage, this should fix inlining problems, fixing bug #197 . If problems show up, it's easy to change it back by changing the define in mars.h . I'm 95% sure this is safe, given how we handle templates.
2009-02-02 01:44:51 +01:00
Tomas Lindquist Olsen
98974b02c0
Fix bug #199
2009-02-02 00:26:32 +01:00
Christian Kamm
01f19c466c
Fix #198 and #199 by making CTFE on static struct initializers work.
...
Renamed SymbolDeclaration to StaticStructInitDeclaration to make its usage clearer.
2009-02-01 20:20:56 +01:00
Christian Kamm
9081e55746
Fix #163 .
2009-01-17 14:53:32 +01:00
Christian Kamm
12a21b1397
Fix #153 . Factor out common code in StructLiteralExp::to(Const)Elem.
2008-12-30 11:42:01 +01:00
Christian Kamm
61a5a08135
Adjust error message for missing toConstExp to include 'is not a const exp'.
2008-12-20 09:13:44 +01:00
Christian Kamm
8f62c080e2
Add more toConstElem stubs to get better error messages.
2008-12-18 07:59:03 +01:00
Christian Kamm
7069073f75
Applied modification of wilsonk's patch for AndAnd and OrOrExp for void rhs funcs.
2008-12-17 21:24:17 +01:00
Christian Kamm
0e1b27db3c
Remove some dead code.
2008-12-17 21:03:06 +01:00
Christian Kamm
cb0201960c
Apply wilsonk's patch to AddrExp::toConstElem for struct literals.
2008-12-17 20:40:27 +01:00
Tomas Lindquist Olsen
3c400ff21c
Removed error on naked, not fully complete, but I'll be doing more work on it during this Christmas, and some things do work.
...
Fixed taking delegate of final class method. see mini/delegate3.d.
2008-12-09 14:07:30 +01:00
Tomas Lindquist Olsen
417aa57501
This ''should'' fix #139 , I failed to produce a testcase, but I would imagine this to be correct, and it removes '''that''' error when building Hybrid.
2008-12-09 03:01:19 +01:00
Tomas Lindquist Olsen
b6781a8eae
Added proper "need 'this' to access member foo" errors instead of "variable foo not resolved" for some cases, added FIXME for the old error!
...
Added a bit more information to the runtime's cyclic dependency detection exception.
2008-12-09 01:56:39 +01:00
Tomas Lindquist Olsen
2532856f1c
Commented some logging that could be '''very''' long, cuts -vv output size of a gtkd gl sample down 1.2GB by 3/4.
...
Fixed wrong pointer type for multidimension "deep" slicing.
2008-12-04 16:11:09 +01:00
Tomas Lindquist Olsen
3111ff1fc4
Fixed non-static struct initializers.
2008-12-03 01:40:28 +01:00
Tomas Lindquist Olsen
91a2c257b0
Implemented allocating storage for a slice if its address is taken, fixes #115
2008-12-02 01:20:22 +01:00
Tomas Lindquist Olsen
c62b31a357
Fixed taking address of global static array element as constant expression.
2008-12-02 01:07:22 +01:00
Tomas Lindquist Olsen
577237e073
Changed some hardcoded offset/alignment for classes in DMD, broke offsets for 64bits.
...
Changed ClassInfo generation to no longer access the default initializer of ClassInfo, fixes problems with index mismatch.
2008-11-30 20:22:09 +01:00
Tomas Lindquist Olsen
4da2cf066e
Fixed some problems with the addZeros forward declarations having type mismatches.
2008-11-29 20:57:52 +01:00
Tomas Lindquist Olsen
f46f865375
Removed KDevelop3 project files, CMake can generate them just fine!
...
Fixed function literals in static initializers.
Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE.
Changed errors to go to stderr instead of stdout.
Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
2008-11-29 21:25:43 +01:00
Christian Kamm
6efc9a3324
Get rid of DtoBoolean - use DtoCast(... Type::tbool) instead.
...
Fixed some casts to bool that were using truncation.
2008-11-22 18:35:52 +01:00
Christian Kamm
1228595e7e
Cast result of ...AssignExp to type the frontend expects if necessary. Fixes #116 .
2008-11-14 16:26:12 +01:00
Tomas Lindquist Olsen
582deb9827
D2 changes!
...
Removed druntime from the repository again.. Sorry :/
Updated the druntime port a bit, now requires druntime from trunk.
Added info in runtime/README on how to get druntime from trunk.
Added patch to add LDC support to druntime.
Removed some debug logging from D2 builds.
Fixed broken typeinfo for const/invariant in D2.
2008-11-12 07:22:05 +01:00
Tomas Lindquist Olsen
c4c1c1d72e
Added initial D2 support, D2 frontend and changes to codegen to make things compile.
2008-11-11 01:38:48 +01:00
Tomas Lindquist Olsen
f71b7ac284
Added inreg attribute where appropriate on x86 to follow ABI docs.
...
Removed now unnecessary temporary variable in StringExp.
2008-10-23 00:34:46 +02:00
Tomas Lindquist Olsen
a52f0330d0
Implemented first class delegates. closes #101
2008-10-22 21:50:08 +02:00
Tomas Lindquist Olsen
f7ea1da010
Removed TypeOpaque from DMD.
...
Changed runtime functions taking opaque[] to void[].
Implemented proper type painting, to avoid "resizing" array casts in runtime calls that previously took opaque[].
Implemented dynamic arrays as first class types, this implements proper ABI for these types on x86.
Added dwarf region end after call to assert function, fixes some problems with llvm not allowing this to be missing.
Reverted change to WithStatement from rev [704] it breaks MiniD, mini/with2.d needs to be fixed some other way...
Fixed tango bug 1339 in runtime, problem with _adReverseChar on invalid UTF-8.
Disabled .bc generation in the compiler runtime part, genobj.d triggers some llvm bug when using debug info. the .o seems to work fine.
2008-10-22 14:55:33 +02:00
Tomas Lindquist Olsen
379bd9c330
Fixed weird struct problem from downs, see mini/compile_structs1.d
...
Rewrote DtoIndexStruct/Class , the old implementation were way too complex for what we really need now - since the DotVar changes.
2008-10-14 15:35:49 +02:00
Tomas Lindquist Olsen
180487b614
Fixed issue with accessing a WithStatement context from inside a nested function. see mini/with2.d
...
Renamed some LLVM uses of ::create statics to ::Create , lower case ones will be deprecated soon.
2008-10-14 13:21:14 +02:00
Tomas Lindquist Olsen
202c4f7bc2
Changed premake.lua to work with mingw.
...
Implemented array operations, not perfect but ok for tonight. closes #89
2008-10-13 23:19:32 +02:00
Tomas Lindquist Olsen
f15b115ee9
Started changing target triple stuff, part of fixing #97
2008-10-13 17:28:39 +02:00
Christian Kamm
40f724234d
Remove too strict type check for DotTypeExp. Fixes run/t/typedef_19_B.
2008-10-11 22:44:17 +02:00
Christian Kamm
9499761131
When newing a struct, make sure the initializer is available.
2008-10-08 20:41:43 +02:00
Christian Kamm
b90799a376
Add DotTypeExp
2008-10-07 20:19:19 +02:00
Christian Kamm
ae9a2901df
Implement BoolExp.
2008-10-07 18:41:00 +02:00
Tomas Lindquist Olsen
1bc3aec560
Forgot a change from DMD update.
...
Removed old Phobos rebuild profiles.
Updated Tango rebuild profile slightly.
2008-10-06 16:22:54 +02:00
Tomas Lindquist Olsen
ecd8a2ac07
Support structs that are merely a forward reference. See mini/forwdecl1.d
2008-10-06 14:06:55 +02:00
Christian Kamm
f4da5f4a89
Fix -oq, closes #96
...
Add value debug output to RealExp::toConstElem.
2008-10-03 19:24:46 +02:00
Tomas Lindquist Olsen
d0ff4494ac
Fixed problem with taking the delegate of a nested function of the current function.
2008-10-02 01:28:33 +02:00
Tomas Lindquist Olsen
e7ad7296d0
Fixed issue with IsExpression and potential type mismatch for classes.
2008-10-01 20:55:13 +02:00
Christian Kamm
32c4f92334
Detect a missing global before trying to const init it.
2008-10-01 20:32:12 +02:00
Christian Kamm
77b5e841dd
Make invalid compile time casts an error instead of asserting.
2008-10-01 19:15:01 +02:00
Tomas Lindquist Olsen
bcafbe169d
Wrapped all the most potentially expensive logging calls in a conditional to only do work when actually requested.
...
Commented some logging calls that could potentially write out many megabytes of type dumps.
2008-10-01 18:32:31 +02:00
Tomas Lindquist Olsen
7b18b7a633
Implemented constant pointer casts (like casting function pointer to void* as a constant global initializer)
2008-09-28 21:09:21 +02:00