Tomas Lindquist Olsen
e8780d50e8
Merged DMD 1.045 !!!
2009-05-16 22:21:31 +02:00
Tomas Lindquist Olsen
b147ecc66d
Initial (but disabled) fix for ticket #294 , the actual part that fixes the bug is in a #if 0 block as I'm afraid it will cause regressions. I'm most likely not going to be around tonight, and maybe not tomorrow as well, so I'm pushing it in case someone wants to run some serious testing/investigate the problem noted in llvmhelpers.cpp : realignOffset .
2009-05-14 17:20:17 +02:00
Tomas Lindquist Olsen
f5d635dfc7
Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 .
2009-05-14 13:26:40 +02:00
Tomas Lindquist Olsen
ecc106d7b7
Fixed dmdfe generated class invariant calls. Also insert proper "this !is null" check before it. Fixed invariant* dstress regressions and generally seems like a good idea. Hope I didn't break anything.. minitests run fine!
2009-05-10 00:46:09 +02:00
Christian Kamm
77100f890c
Make static int[] a = [1, 2]; a[0] = 4; not segfault
...
by making the array data ptr a non-const global variable.
2009-05-03 11:16:54 +02:00
Tomas Lindquist Olsen
f290ff0530
Forgot the special case part in last !ThisExp change.
2009-04-27 13:59:15 +02:00
Tomas Lindquist Olsen
95b94935ee
Moved special casing of 'assert(this, "null this");' generated statements from !ThisExp into !AssertExp.
...
Fixed filenames for array bounds errors and probably others, fixes #271 .
2009-04-27 13:30:48 +02:00
Tomas Lindquist Olsen
ba38e15f0d
Fixed class default initializers and type generation. Bug #260 is fixed.
2009-04-27 03:40:40 +02:00
Tomas Lindquist Olsen
687395cda6
Rewrote runtime struct literal codegen.
2009-04-22 03:08:28 +02:00
Tomas Lindquist Olsen
b3db60cbda
Merge.
2009-04-21 17:54:43 +02:00
Frits van Bommel
e05b960bbe
No need for temporary alloca's here, use a phi node instead.
2009-04-19 19:28:10 +02:00
Tomas Lindquist Olsen
1c79df3817
Fixed all issues preventing Tango 0.99.8 to compile with `sh build-tango.sh --verbose ldc'.
2009-04-17 14:38:29 +02:00
Tomas Lindquist Olsen
9a86f9c0b5
Fixed some minitest regressions.
2009-04-16 19:21:30 +02:00
Tomas Lindquist Olsen
37cf5a5789
Added Doxygen file.
...
Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
2009-04-15 20:06:25 +02:00
Frits van Bommel
cc492ecc82
Merge
2009-04-12 22:22:15 +02:00
Christian Kamm
b8b9c41827
Introduce checks to fix #173 .
2009-04-12 14:58:18 +02:00
Frits van Bommel
b5af30636e
Isolate all knowledge of what a function's nested context looks like in a
...
single place. No functional change.
2009-04-12 13:08:24 +02:00
Frits van Bommel
7e99e31b91
Clean up some suspicious code.
...
There's no guarantee a constant of integer type is a ConstantInt, so it's not
safe to just cast<> these to ConstantInt. (It could be a constant expression,
for example)
The code is shorter this way too :).
2009-03-29 03:27:04 +02:00
Christian Kamm
c5a09c9deb
Force initialize the runtime module in Module::genLLVMModule. It is required
...
for all non-trivial D modules anyway, so why load it lazily? This fixes
run/typeid_83.d (DtoDeclareTypeInfo expects runtime to be initialized)
2009-03-28 20:01:37 +01:00
Tomas Lindquist Olsen
99b863e2b1
Added initial support for raw LLVM inline asm.
2009-03-28 06:32:06 +01:00
Tomas Lindquist Olsen
36f6ebc77f
- Versioned Expresssion::toElem with #if IN_DMD/IN_LLVM.
...
- Eliminated the DLRValue DValue.
- Implemented proactive handling of l-value CastExpS.
- Minor tweak in runtime memory.d .
2009-03-28 05:00:43 +01:00
Tomas Lindquist Olsen
be3bfbff5d
Fixed problems introduced by previous commits that prevented Tango from compiling.
2009-03-27 23:17:04 +01:00
Tomas Lindquist Olsen
ec986231e5
Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
2009-03-27 21:50:32 +01:00
Tomas Lindquist Olsen
daef67acc3
Changed use of toObjFile to a new codegen method.
...
More versioning of DMD specific codegen code.
2009-03-27 17:54:27 +01:00
Tomas Lindquist Olsen
c42c90ea80
* Moved ir/irsymbol.cpp/h into ir/irdsymbol.cpp/h.
...
* Added #if IN_DMD versioning around DMD backend specific code in the D1 frontend, D2 is currently broken.
* All part of a greater cleanup scheme.
2009-03-26 20:45:53 +01:00
Christian Kamm
671c7791e3
Reorganize EnclosingHandlers to require less changes to the frontend and allow us to
...
implement the synchronized storage class for functions.
2009-03-24 21:18:18 +01:00
Christian Kamm
eb1deec50d
Fix #239 .
2009-03-24 14:33:57 +01:00
Tomas Lindquist Olsen
8b751cce0e
- Updated to DMD frontend 1.041.
...
- Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
2009-03-12 20:37:27 +01:00
Tomas Lindquist Olsen
ae214b18e7
Added ~{memory} clobber when a jump_target is generated in inline asm (branch out of inline asm)
2009-03-03 19:18:47 +01:00
Tomas Lindquist Olsen
8ce5a07fc0
Fixed potential assertion failure in taking address of function as a constant expression.
2009-03-03 17:27:14 +01:00
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