Alexey Prokhin
caa2f15c8a
Remove VarDeclaration::aggrIndex
2014-10-05 16:08:52 +04:00
Andreas Hollandt
afcd0aad41
add a few IR names
2014-10-02 14:36:51 +02:00
Andreas Hollandt
6db62ee8a9
remove all the "tmp" IR names
2014-10-02 14:36:51 +02:00
Alexey Prokhin
32b1d4cc55
Reduce size of IrDsymbol even more
...
resolved/defined/declared/initialized are turned into flags.
2014-09-12 14:43:54 +04:00
Alexey Prokhin
18f33b1815
Make IrDsymbol to be a typesafe union to reduce memory usage
2014-09-12 14:43:49 +04:00
kai
2b6dbb03f4
Add IF_LOG to more logging statements.
...
Evaluating arguments which call toChars() or toPrettyChars() are much more expensive then checking Logger::enabled().
2014-06-26 06:54:38 +02:00
kai
6287a4d422
Replace ArrayIter<> with Array<>::iterator.
...
Just use the new iterator instead of the old Java-like class.
Also removes a dead iterator and replaces an iterator with a
pointer in some place.
2014-01-11 14:48:41 +01:00
Kai Nacke
27a9ede3fd
Fix error diagnosis for test fail91.
2014-01-04 01:57:56 +01:00
Kai Nacke
acf1ed40b0
Emit error message for struct with unknown size.
...
This fixes an ICE in test fail91.
2014-01-03 23:36:17 +01:00
David Nadlinger
68f8e38f51
Merge branch 'master' into merge-2.064.
2013-12-26 12:37:03 +01:00
David Nadlinger
27ecc11915
Remove unused prototype.
2013-12-26 07:05:21 +01:00
Kai Nacke
87965cdc19
Merge branch 'master' into merge-2.064
...
Conflicts:
runtime/druntime
2013-11-26 08:00:10 +01:00
Kai Nacke
7f017608a8
Use enum literal instead of constant
2013-11-26 07:56:50 +01:00
David Nadlinger
cb341586e3
First merge of 2.064 beta.
...
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.
Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
David Nadlinger
787c147986
Use Module::members -> Dsymbol::codegen to define symbols.
...
This commit fundamentally changes the way symbol emission in
LDC works: Previously, whenever a declaration was used in some
way, the compiler would check whether it actually needs to be
defined in the currently processed module, based only on the
symbol itself. This lack of contextual information proved to
be a major problem in correctly handling emission of templates
(see e.g. #454 ).
Now, the DtoResolve…() family of functions and similar only
ever declare the symbols, and definition is handled by doing
a single pass over Module::members for the root module. This
is the same strategy that DMD uses as well, which should
also reduce the maintainance burden down the road (which is
important as during the last few releases, there was pretty
much always a symbol emission related problem slowing us
down).
Our old approach might have been a bit better tuned w.r.t.
avoiding emission of unneeded template instances, but 2.064
will bring improvements here (DMD: FuncDeclaration::toObjFile).
Barring such issues, the change shoud also marginally improve
compile times because of declarations no longer being emitted
when they are not needed.
In the future, we should also consider refactoring the code
so that it no longer directly accesses Dsymbol::ir but uses
wrapper functions that ensure that the appropriate
DtoResolve…() function has been called.
GitHub: Fixes #454 .
2013-10-13 19:18:24 +02:00
David Nadlinger
1215ffacd3
Complete IrStruct->IrAggr rename.
2013-06-17 13:14:15 +02:00
David Nadlinger
2cebe6408c
Divided ir/irtypestruct.* in general aggregate and struct specific part.
...
This is just to improve clarity, as it was rather non-obvious
what of the code also applied to classes before.
IrTypeAggr::createInitializerConstant would currently belong in
IrTypeStruct, but this will be refactored anyway.
2013-06-12 17:17:09 +02:00
David Nadlinger
f2f3c751b3
Renamed IrStruct to IrAggr, as it is also used for classes.
...
The class-specific parts should probably be factored out.
2013-06-12 17:16:35 +02:00
David Nadlinger
848dee32d4
Store bools as i8.
...
I really hope we can refactor this to use a less leaky
abstraction later – it should at least be possible to merge
voidToI8 and i1ToI8.
2013-06-07 03:20:54 +02:00
David Nadlinger
7b435c2c87
Unify handling of struct initializers.
...
GitHub: Fixes #351 .
2013-05-18 19:51:37 +02:00
kai
7d65a311b1
More changes to std::vector usage.
...
Replace with std::vector with static array, llvm::SmallVector or
add code to reserve space.
2013-03-17 23:58:30 +01:00
kai
1e4a8fffc2
Remove DMDV1 and DMDV2.
2013-03-06 10:20:24 +01:00
Sebastian Graf
673a974260
Un-unroll static array,
...
[David Nadlinger] Note that DtoStructLiteralValues was/is used
only once across the codebase.
2013-02-11 04:20:59 +01:00
Sebastian Graf
5ae17a59e4
Fixed broken static struct member initializer
2013-02-11 04:20:59 +01:00
David Nadlinger
0a96aea868
Sort includes according to style guidelines:
...
1. Main include corresponding to .cpp file, if any.
2. DMD and LDC includes.
3. LLVM includes.
4. System includes.
Also updated a few include guards to match the default format.
2013-02-07 21:20:55 +01:00
David Nadlinger
1bb14c45d2
Removed trailing whitespace.
2012-12-16 17:19:15 +01:00
David Nadlinger
9458911839
Added LLVM-style license headers to all our files.
2012-12-16 17:19:14 +01:00
kai
a7c7b514c0
Add changes for LLVM 3.2
...
- The Attributes class was changed again
- TargetData was renamed to DataLayout
Compiles again with LLVm 3.0, 3.1 and trunk(3.2).
2012-10-13 18:54:42 +02:00
David Nadlinger
5fa1a903e8
DtoResolveStruct cleanup.
...
irField is only set in DtoResolveStruct, so the comment was misleading.
2012-10-06 19:27:55 +02:00
kai
2dbee75523
Prefer C++-style casts.
...
This is based on Item 2 of "More Effective C++". In general, the C++ cast operators are more expressive and easy to find,
e.g. by grep. Using const_cast also shuts up some compiler warnings.
2012-08-02 19:55:29 +02:00
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
e921998d75
A few fixes for 64bit
2011-02-23 12:49:57 +03:00
Alexey Prokhin
d128210f23
Fixed initialization of a struct with an array from another struct
2011-01-02 17:42:59 +03:00
Moritz Warning
ba88a9325d
fixes #416 :: LDC crashes when trying to build Tango on OS X; thanks klickverbot
2010-08-04 16:28:09 +02: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
977fa551ee
Push the context through StructType::get.
...
Requires LLVM >= 78258. Also remove old #if's.
2009-08-06 01:47:39 +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
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
Frits van Bommel
287b1278d3
Remove struct padding when passing or returning in registers on x86-64 (extern(D) only)
2009-05-14 20:36:55 +02:00
Christian Kamm
b6ad8b69ab
Add newline to get rid of warning.
2009-05-07 21:07:50 +02:00
Tomas Lindquist Olsen
ca4f588c08
Fixed deal breaker bug for more-at-once compilation when any module contained aggregates. Fixes ticket #272 .
2009-05-07 02:10:29 +02:00
Tomas Lindquist Olsen
617861ead4
Fixed file name in imported mixins containing assertions.
2009-04-29 18:39:59 +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
e01917bc0d
Make typeinfo for struct
2009-04-16 22:19:36 +02:00
Tomas Lindquist Olsen
414e58a318
Fixed forward referenced structs.
2009-04-16 20:41:27 +02:00
Tomas Lindquist Olsen
9a86f9c0b5
Fixed some minitest regressions.
2009-04-16 19:21:30 +02:00