Alexey Prokhin
7431d58702
Rewritten initialization of global variables.
2011-10-25 15:43:49 +04:00
Alexey Prokhin
629f13929e
WIP: port to llvm 3.0
2011-10-25 15:43:39 +04:00
Alexey Prokhin
9a9999854f
Named Return Value Optimization
2011-09-13 21:01:38 +04:00
Alexey Prokhin
0caba6672d
Call postblit on a struct when appending it to an array. Use _d_arraycatnT to concatenate multiple arrays.
...
Before, _d_arraycatT was used to concatenate multiple arrays. That caused an issue when postblit
was called on a struct multiple times. The next code asserted due to the issue:
void main()
{
static struct S
{
int x;
int pad;
this(this)
{
++x;
}
}
auto sarr = new S[1];
auto sarr2 = sarr ~ sarr ~ sarr;
assert(sarr2[0].x == 1);
assert(sarr2[1].x == 1);
assert(sarr2[2].x == 1);
assert(sarr[0].x == 0);
}
2011-09-10 13:22:05 +04:00
Alexey Prokhin
2cc34c4005
Call desctructors on temporary variables
2011-07-19 19:20:42 +04:00
Alexey Prokhin
4210f4285a
Fixed a few interpret regressions
2011-07-19 10:14:11 +04:00
Alexey Prokhin
462cdda4ae
Merge dmdfe 2.053beta
2011-07-19 10:14:04 +04:00
David Nadlinger
7a24e12736
Cleanup: Remove unused code in backend, silence some warnings.
...
This removed quite some clutter that has presumably piled up because LDC is seldom built with a lot of warnings enabled due to DMDFE.
2011-04-24 12:21:33 +02:00
Alexey Prokhin
12984d9cc7
Fix size of classes
2011-02-25 22:28:59 +03:00
Alexey Prokhin
e921998d75
A few fixes for 64bit
2011-02-23 12:49:57 +03:00
Alexey Prokhin
aa5dfdfd4d
Fix casting of associative arrays
2011-02-20 19:00:54 +03:00
Alexey Prokhin
c5e9784863
Updated to dmdfe 2.051
2011-01-05 18:21:40 +03:00
Alexey Prokhin
b52cedf6d2
Add another stub to DtoInitializer()
2011-01-03 20:46:23 +03:00
Alexey Prokhin
38b4b4569b
Fixed structs assign
2011-01-03 16:50:08 +03:00
Alexey Prokhin
910c589b79
Handle wild modifier in stripModifiers()
2011-01-03 16:50:08 +03:00
Alexey Prokhin
d8115713d2
Fixed initialization of multidimensional static arrays.
2010-12-30 14:04:24 +03:00
Alexey Prokhin
023b55a772
Run postblit constructors for elements of an array.
2010-12-30 14:04:24 +03:00
Alexey Prokhin
44593f6220
Call d_delarray_t() instead of _d_delarray()
2010-12-19 15:51:00 +03:00
Alexey Prokhin
8c0902ce21
Fixed assert when compiling inline test
2010-12-17 12:54:34 +03:00
Alexey Prokhin
71f653f19b
Fixes for closures
2010-12-15 17:05:16 +03:00
Alexey Prokhin
3eb6b5e8c8
Fixed a crash when compiling test runnable/A16.
2010-12-14 14:35:52 +03:00
Alexey Prokhin
c3ea7b27c6
Work on debug
2010-12-14 14:35:48 +03:00
Alexey Prokhin
0cc3dc369a
Fixed signature of _d_delarray()
2010-11-02 20:30:06 +03:00
Alexey Prokhin
360a99caa9
Resolving nested context for structs.
...
* * *
Another fix for nested structs
* * *
Yet another fix for nested structs
2010-11-02 13:21:36 +03:00
Alexey Prokhin
2fe6817294
Fixed a druntime crash in _d_delclass
2010-10-31 12:23:35 +03:00
Alexey Prokhin
d0c7a5a3cb
Ported to new debug information format introduced in llvm 2.7
2010-10-30 20:57:32 +04:00
Alexey Prokhin
e4c3179d43
Different fixes: phobos compiles now
2010-10-28 14:53:01 +04:00
Alexey Prokhin
b1e5993873
Started work on phobos
2010-10-27 18:13:46 +04:00
Alexey Prokhin
4d7a6eda23
Different fixes for d2
2010-10-07 22:35:32 +04:00
Alexey Prokhin
df87607ba2
Updated to 2.049
2010-09-30 21:54:45 +04:00
Tomas Lindquist Olsen
1fac40d2bd
Update to work with LLVM 2.7.
...
Removed use of dyn_cast, llvm no compiles
without exceptions and rtti by
default. We do need exceptions for the libconfig stuff, but rtti isn't
necessary (anymore).
Debug info needs to be rewritten, as in LLVM 2.7 the format has
completely changed. To have something to look at while rewriting, the
old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means
that you have to define this to compile at the moment.
Updated tango 0.99.9 patch to include updated EH runtime code, which is
needed for LLVM 2.7 as well.
2010-05-19 12:42:32 +02:00
Kelly Wilson
b38845e88e
Apply patch from klickverbot. This is his 'proper fix' patch for bug #395 .
2010-03-08 23:37:40 -07:00
Christian Kamm
57630ea48b
Make ref vars work with nesting.
2009-11-07 14:06:11 +01:00
Christian Kamm
4e2e4d5b3d
Fix codegen for foreach with ref value being lowered to for.
2009-11-07 13:51:05 +01:00
Benjamin Kramer
c220dcac05
IntegerType is now contextifed.
...
Requires llvm >= 78969. resistor says this will be the last context API change :)
2009-08-14 00:39:18 +02:00
Benjamin Kramer
4c5457ba61
getNullValue is in Constant again
...
Requires LLVM >= r77721
2009-07-31 23:01:29 +02:00
Benjamin Kramer
66101517d7
LLVMContext changes up to r77366
2009-07-30 15:25:10 +02:00
Benjamin Kramer
a31f3eb98f
getClosestStaticTargetForModule was replaced with lookupTarget
...
Build fix for LLVM r77111.
2009-07-28 15:26:21 +02:00
Tomas Lindquist Olsen
3cf7b6a95c
Fixed potential crash with complex recursive struct types.
2009-07-26 19:12:37 +02:00
Benjamin Kramer
d7049de966
More factory methods moved to LLVMContext
2009-07-15 18:09:41 +02:00
Benjamin Kramer
0ee2f34611
Don't use llvm::getGlobalContext() anymore
2009-07-13 20:16:15 +02:00
Benjamin Kramer
331319dab1
Build fix for the latest LLVMContext changes (LLVM r75445)
...
This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
2009-07-13 12:17:58 +02:00
Christian Kamm
8bbf6ab984
Treat ConditionalDeclarations correctly in DtoDeclarationExp.
...
Fixes #332 .
2009-06-26 17:18:36 +02:00
Christian Kamm
d7b00783d3
Automated merge with http://hg.dsource.org/projects/ldc
2009-06-20 19:12:04 +02:00
Christian Kamm
42b3da8ac7
Move function codegen data from IrFunction to new FuncGen.
...
This change reduces memory consumption significantly by releasing the
memory held by the STL containers that are now inside FuncGen.
2009-06-20 19:11:44 +02:00
Robert Clipsham
f13c5e82f5
Added a stripModifiers() function to remove shared|const|immutable storage classes in D2 (should eventually be moved to a dhelpers file rather than llvm helpers).
...
Replaced a few occurances of STCinvariant with STCimmutable.
2009-06-18 15:44:04 +01:00
Kelly Wilson
0c1b6e27d9
fix problem reported in ticket 327 - thanks d0k
2009-06-16 08:57:20 -06:00
Frits van Bommel
96fdcd6347
Run semantic3
on imported modules, and emit new symbols with
...
`available_externally` linkage. This allows the inliner to inline functions from
other modules while telling the code generator to ignore those functions (treat
them as declarations)
Still generates a few extra `TypeInfo`s and strings...
Disabled when generating debug info because I don't really understand it, and it
doesn't like this.
2009-06-07 16:00:13 +02:00
Frits van Bommel
1958e17734
Rewrite StructLiteralExp::toElem
to store individual fields instead of
...
generating a constant to fill the entire struct with a single `store`.
This is much more efficient at compile time (fixing #320 ) and vastly reduces
the size of the emitted code. Since LLVM no longer needs to keep the data for
all fields in "registers" until the store happens, it should also be more
efficient at run time in cases where the fields aren't assigned with constants.
There's also some code clean-up by removing duplicated logic.
2009-06-06 20:16:13 +02:00
Christian Kamm
b4f8bd6e52
Fix #318 by making a list of all seen template instances in a module for
...
singleobj compilation and then making sure they get emitted in their entirety.
2009-06-06 09:47:32 +02:00