Alexey Prokhin
2f60c4dcda
Codegen the try block before the catches and finally
2012-04-21 22:37:32 +04:00
Alexey Prokhin
52c5c03495
Fixed segfault when compiling a non-constant case expression
2012-02-15 13:23:23 +04:00
Alexey Prokhin
b3ed8724b7
Fixed codegen of SwitchErrorStatement
2012-02-15 13:23:23 +04:00
kai
f9201e8352
Merge 1.072
2012-02-02 03:13:27 +01:00
Alexey Prokhin
edc4a5f003
DMD Issue 5416 - null should have a type of its own
2011-12-16 20:15:10 +04:00
David Nadlinger
3916835380
Merge remote-tracking branch 'AlexeyProkhin/master' into merge-3.0
...
Conflicts:
CMakeLists.txt
druntime
runtime/CMakeLists.txt
2011-12-04 18:38:09 +01:00
David Nadlinger
fe19ee84f5
Merge branch 'llvm3.0' into merge-3.0
...
Conflicts:
gen/configfile.cpp
2011-12-04 18:16:36 +01:00
David Nadlinger
d0ea856024
Emit all D inline asm labels as local labels.
...
On OS X, there is an actual significance to the distinction, which before lead e.g. to exception throwing in the below example being broken:
---
import core.exception;
void main() {
asm {
jmp Lfoo;
Lfoo:
;
}
throw cast(OutOfMemoryError)cast(void*)OutOfMemoryError.classinfo.init;
assert(0);
}
---
2011-12-04 18:13:33 +01: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
kai
a5b3dd29b5
Fixes 2 kinds of warnings.
...
1) The last parameter of getGetElementPtr() has type bool. In some instances, a 2 is used as parameter. This is converted to true.
2) Several loops use int instead of unsigned. This causes warning about signed/unsigned mismatch.
Curiously, only Visual C++ complains about this. Nevertheless I think that the warnings should be fixed.
2011-11-23 19:01:04 +01: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
0e754b5acd
Merge dmd v2.055
2011-09-13 21:01:32 +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
71a0a968ef
Fixed #6
2011-07-26 09:48:10 +04:00
Alexey Prokhin
a41b822420
Fixed ldc1 compilation
2011-07-26 09:30:36 +04:00
Alexey Prokhin
6576b68dfd
Added empty ImportStatement::toIR(). That fixes import from a function
2011-07-19 20:02:39 +04:00
Alexey Prokhin
ce799e9974
Fixed postblit call
2011-07-19 19:20:43 +04:00
Alexey Prokhin
2cc34c4005
Call desctructors on temporary variables
2011-07-19 19:20:42 +04:00
Alexey Prokhin
805fb5cfc1
D2: pass static arrays into functions by value
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
Alexey Prokhin
a684dd2df9
ldc1 compiles again
2011-02-27 21:00:01 +03:00
Alexey Prokhin
063020fae6
Don't run postblit on references
2011-02-27 12:27:38 +03:00
Alexey Prokhin
70aee84c70
Fix passing of a padded struct to a function
2011-02-26 20:16:01 +03:00
Alexey Prokhin
28aa0e2bf3
Add missing postblit call
2011-02-25 22:29:28 +03:00
Alexey Prokhin
c5e9784863
Updated to dmdfe 2.051
2011-01-05 18:21:40 +03:00
Alexey Prokhin
89375729cf
Work on switch statements.
2011-01-03 16:50:08 +03:00
Alexey Prokhin
a86f414bc1
Fixed calling of _d_array_bounds and _d_switch_error.
2011-01-02 17:43:02 +03:00
Alexey Prokhin
57866a8359
Fixed a crash in WithStatement::toIR.
2010-12-31 13:45:11 +03:00
Alexey Prokhin
20b2b4b7f5
Added missing calls of postBlit
2010-11-04 12:50:19 +03:00
Alexey Prokhin
b1e5993873
Started work on phobos
2010-10-27 18:13:46 +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
dd6a54d442
Strange workaround for returning from within 'void main()'. The new dmdfe sets the ReturnStatement->exp to null. Fixed bug #391 .
2010-03-10 19:35:14 -07:00
Christian Kamm
ae32163f34
Fix #398 .
...
Tested by Deewiant.
2010-03-08 17:44:38 +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
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
Christian Kamm
987618fcd1
Always emit a stop point for return statements - even for void returns.
2009-07-26 18:32:25 +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
756a2cb2a1
Adjust LDC to work with the LLVMContext LLVM changes.
...
This means we now require a fairly new LLVM revision. I use 75234.
2009-07-10 21:30:02 +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
Christian Kamm
52329f071e
Fix regression dstress.nocompile.finally_07. The EnclosingTryFinally handler
...
should not be set when emitting the landing pad's finally code.
2009-05-23 09:02:36 +02:00
Christian Kamm
5b799deeb4
Fix #308 by giving finally code emitted by EnclosingTryFinally a different landing pad.
2009-05-23 00:23:39 +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
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
Frits van Bommel
3f49ddb6d5
Fix nested references to 'ref' foreach variables.
...
These "walk around" the array being iterated over, so they're a bit trickier
than other variables to get right.
2009-04-01 00:01:44 +02:00
Christian Kamm
0ef57dcfbe
Reenable error for gotos into or out of finally blocks.
2009-03-28 19:16:53 +01:00