Commit graph

200 commits

Author SHA1 Message Date
David Nadlinger
364cfb6714 Improved initializer ICE error message. 2012-09-07 03:51:32 +02:00
David Nadlinger
508652fd8b Initialization of vector types with single value.
Fixes DMD testcase 'testargtypes'.
2012-09-07 03:51:32 +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
f4d8021e5a Merge branch 'master' of github.com:ldc-developers/ldc 2012-04-22 12:17:01 +04:00
Alexey Prokhin
d739588d4a Fix dmd bug 7504: Cannot assign an object of type 'typeof(null)' to an array 2012-04-21 22:37:36 +04:00
Eldar Insafutdinov
feefad412c Move cl_options out of LDCShared 2012-04-02 14:53:52 +01:00
kai
53f9964b95 Fix LDC1 compile error. 2012-02-18 18:08:26 +01:00
Alexey Prokhin
ae7f0ca7e7 Preliminary vector support 2012-02-16 14:42:23 +04:00
Alexey Prokhin
adebe4c732 DMD Issue 4269 - Regression(2.031): invalid type accepted if evaluated while errors are gagged 2012-02-15 13:23:23 +04:00
Alexey Prokhin
f2ed2e96b0 Use optimized array operators implemented in druntime 2012-02-15 13:16:34 +04:00
Alexey Prokhin
dbb6528c95 Fixed #54 — Error: invalid cast from 'typeof(null)' to 'void*' 2012-01-09 15:14:05 +04:00
Alexey Prokhin
eb6809a530 Fixed #41 — Casting Associative Arrays To Immutable 2011-12-09 12:22:12 +04:00
Alexey Prokhin
bb3908f290 Fixed #36 — ICE: DValue::getLVal(): Assertion '0' failed 2011-12-05 13:19:33 +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
784e3f1542 Fixed cases when debug info of a variable was emitted several times 2011-12-04 15:34:41 +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
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
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