Commit Graph
222 Commits
Author SHA1 Message Date
Alexey Prokhin b41688a0b8 DMD Issue 6859 - Segfault when abstract method uses with contract. 2011-12-16 20:15:31 +04:00
Alexey Prokhin 88cff99bd4 Merge dmdfe 2.057 2011-12-16 19:44:56 +04:00
Alexey Prokhin 91f4e5d015 Added emission of dwarf lexical blocks.
Also, dropped support for DISABLE_DEBUG_INFO definition.
2011-12-04 15:34:35 +04:00
Alexey Prokhin b8721a8515 Emit debug info for variables that are used in nested functions 2011-12-03 23:45:58 +04:00
Alexey Prokhin 629f13929e WIP: port to llvm 3.0 2011-10-25 15:43:39 +04:00
Alexey Prokhin a75b08bc00 Fixed accessing struct members via alias this 2011-09-13 21:01:39 +04:00
David Nadlinger 21a05aa971 Merge branch 'default' into 'merge'. 2011-07-29 00:37:30 +02:00
David Nadlinger 15c5316e26 Prevent two function with same mangled name but different types from being declared.
Previously, LDC would crash in the backend due to the fact that the IR is typed in such cases (we recently had such an instance with Tango, where an extern( C ) function was declared once with int and once with size_t).
2011-07-27 23:01:22 +02:00
Alexey Prokhin 79edefdc37 Fixed compilation of functions that does not have return statement but contain inline asm 2011-07-19 22:22:49 +04:00
Alexey Prokhin 4cc10019ee Fixed an assertion in DtoType() 2011-07-19 19:58:38 +04:00
Alexey Prokhin 805fb5cfc1 D2: pass static arrays into functions by value 2011-04-30 15:30:57 +04:00
Alexey Prokhin 6bc2431b6b Skip unittests in imported modules 2011-04-30 15:30:57 +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
Moritz Warning fbb32c24cb another merge 2011-02-27 20:11:13 +01:00
Moritz Warning b752882184 merge from alexeys branch 2011-02-24 13:22:17 +01:00
Moritz Warning fb418bf2e6 Added -disable-red-zone flag.
This will disable the usage of the 'red-zone' in ABIs that make use of it (like x86). This mimics the exact flag used by clang. It is comparable to the -mno-red-zone flag in gcc. - thanks to wilkie
2011-02-23 23:50:53 +01:00
Alexey Prokhin e921998d75 A few fixes for 64bit 2011-02-23 12:49:57 +03:00
Alexey Prokhin b0d97b139a It is probably wrong, but it fixes compilation of phobos with -g flag 2011-02-20 19:00:48 +03:00
Alexey Prokhin e01aed4327 Fixed passing of static arrays into functions.
This patch finally do what commit 99ee6091cc5e supposed to do...
2011-01-07 09:46:46 +03:00
Alexey Prokhin 54e3121ad9 Reverted "Fixed passing of structs and static arrays into functions." 2011-01-06 20:06:27 +03:00
Alexey Prokhin e9dacd97e2 Fixed passing of structs and static arrays into functions.
Not sure if it is correct, though.
2011-01-06 17:07:44 +03:00
Alexey Prokhin c5e9784863 Updated to dmdfe 2.051 2011-01-05 18:21:40 +03:00
Alexey Prokhin 67daf2fe0a Fix for variadic functions 2011-01-04 14:18:50 +03:00
Alexey Prokhin 8a49067776 Increment vgates in static constructors. That fixes static destructors of templates. 2011-01-02 17:43:02 +03:00
Alexey Prokhin 16b0fe136e Fixed a crash in DtoDefineFunction. 2010-12-31 14:07:33 +03:00
Alexey Prokhin 8d7ff66019 Fixed the order of static destructors 2010-12-30 14:04:24 +03:00
Alexey Prokhin 6c2ccaf945 Fix for shared static constructors and destructors 2010-12-30 14:04:24 +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
Eldar Insafutdinov 410cb0dc4e fix building of ldc1 2010-11-05 22:40:36 +00:00
Alexey Prokhin 14c6dfb895 Added pointers to shared constructors and destructors to ModuleInfo. 2010-11-05 17:40:29 +03: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
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
Leandro Lucarella 357dc9c1a9 Merge DMD r253: refactor: Argument => Parameter
---
 dmd/arrayop.c     |   30 ++++----
 dmd/arraytypes.h  |    2 +-
 dmd/class.c       |    8 +-
 dmd/declaration.c |   10 ++--
 dmd/declaration.h |   16 ++--
 dmd/doc.c         |   12 ++--
 dmd/dsymbol.c     |    4 +-
 dmd/expression.c  |   48 +++++++-------
 dmd/expression.h  |   32 +++++-----
 dmd/func.c        |   78 +++++++++++-----------
 dmd/init.c        |    2 +-
 dmd/interpret.c   |    8 +-
 dmd/mtype.c       |  190 ++++++++++++++++++++++++++--------------------------
 dmd/mtype.h       |   32 +++++-----
 dmd/opover.c      |   34 +++++-----
 dmd/parse.c       |   40 ++++++------
 dmd/parse.h       |    2 +-
 dmd/statement.c   |   90 +++++++++++++-------------
 dmd/statement.h   |   14 ++--
 dmd/struct.c      |    8 +-
 dmd/template.c    |   30 ++++----
 gen/functions.cpp |   10 ++--
 gen/functions.h   |    2 +-
 gen/tocall.cpp    |   10 ++--
 gen/typinf.cpp    |    6 +-
 25 files changed, 359 insertions(+), 359 deletions(-)
2010-01-06 15:18:20 -03: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 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 c261c03752 Put scope-limited data on the stack instead of using 'new' and 'delete'. 2009-06-20 19:44:54 +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
Frits van Bommel 4158fb474a Add an llvm::OStream workalike class for use with Logger::cout(), with the
crucial difference being special handling of `llvm::Type`s so they get printed
by name rather than printing their full representation (which can be positively
*huge*).

This allows re-enabling some logger calls that were disabled due to extreme
verbosity.
2009-06-16 19:31:10 +02:00
Frits van Bommel 25ebb3dbcd Generate less dead code by deleting unreachable blocks at the end of functions
(which would otherwise appear if a function ends with a return, for example).
2009-06-12 16:41:38 +02:00
Tomas Lindquist Olsen 092381577f Some minor changes to handling of variables referenced from nested functions in D2 .
Added generation of new 'void*[4] reserved;' !ModuleInfo member .
2009-06-03 03:04:47 +02:00
Frits van Bommel 2739cd108c Let TargetABI::passByValue() know when a parameter is byref (either explicitly
or because it's a static array) by giving it the pointer type instead of the
type itself.
This fixes Derelict compilation on x86-64, where the ABI wasn't expecting a
static array to be passed in at all.
2009-05-22 00:19:54 +02:00
Tomas Lindquist Olsen c0f2af5afd Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P
Added -v-cg switch, which right now just prints "codegen: module.name (module/name.d)" to stdout, this can really help figuring out where, in some complex build command, things go wrong.
2009-05-16 18:19:52 +02:00
Frits van Bommel 541f3723cd Intrinsics shouldn't see struct padding, so use a special TargetABI for them
that removes it.
This unbreaks the `llvm_*_with_overflow` intrinsics.
2009-05-16 13:06:49 +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
Christian Kamm 8916f783b7 Revert change to treat bodyless functions in abstract classes as abstract.
See DMD bug 2894.
2009-04-25 09:11:32 +02:00
Christian Kamm f6772bd600 Add forgotten null check. 2009-04-21 19:17:29 +02:00