Commit Graph
363 Commits
Author SHA1 Message Date
David Nadlinger 2d54a02295 Use null instead of undef for unneeded nested context pointers. 2012-10-06 13:07:17 +02:00
David Nadlinger 4f6ec96b27 Fixed vector initialization involving implicit conversions.
Fixes first part of GitHub #176.
2012-10-03 19:51:04 +02:00
Jernej Krempuš fd3e79b7bb Corrections. 2012-10-03 15:26:43 +02:00
Jernej Krempuš 115bc7113e Improved error messages. 2012-10-03 03:44:34 +02:00
Jernej Krempuš b798974f3a Added pragma insertelement. 2012-10-02 22:22:53 +02:00
Jernej Krempuš 2cf5d8c2a0 Added pragma extractelement 2012-10-02 21:37:27 +02:00
David Nadlinger 4b3662adfd Fixed unlisted vector handling bug.
Thanks to filwit on IRC for mentioning it.
2012-09-28 00:34:31 +02:00
David Nadlinger c6abdcf4a4 Don't set TypePointer::isunsigned to true in the frontend.
The previous solution was problematic because the change was language-
visble via the isUnsigned trait. Now, pointers are simply explicitly
checked for in the relevant places. (Note that there might be cases in
the diff where a direct isunsigned() call would have been appropriate –
I only checked for instances where the type clearly cannot be a pointer,
but chose to go the safe route in replicating existing behavior
otherwise).

Fixes DMD testcase 'traits'.
2012-09-28 00:28:49 +02:00
David Nadlinger 4a1cbc2d33 Debug log prettification: Indent toElemDtor() children. 2012-09-27 22:01:53 +02:00
David Nadlinger 9e8ec9613c Removed superfluous newline in log message. 2012-09-27 21:55:09 +02:00
David Nadlinger 8968103b8b Some verbose logging output prettification. 2012-09-21 18:54:23 +02:00
David Nadlinger bebc5cce28 Workaround for Voldemort return type handling issues.
See the comment in DtoCallFunction for an explanation of what is
going on.

The struct zero initialization code was also refactored out to
AssignExp::toElem and modified so that it is only triggered
on integer->struct assignments, not for any types where the
modifier-stripped types don't match up. This would have lead to
silently wrong code in the cases where the assert would have been
triggered otherwise.

Fixes the Phobos testsuite build.
2012-09-07 03:51:33 +02:00
David Nadlinger ee4285f934 Properly handle DMD-internal "reference variables".
Previously, we just had a hack to make ref foreach statements work.
This commit enables them to work in other cases as well, like the
implicit __result variable for functions with out-contracts (which
is such a magic ref variable for ref-returning functions).

Fixes DMD testcase 'testcontracts'.
2012-09-07 03:51:33 +02:00
David Nadlinger 7a162b6f6d Fixed rvalue delegate property access.
Covered by DMD testcase 'test42'.
2012-09-07 03:51:32 +02:00
David Nadlinger 31e732911a Fixed templated interface member call codegen.
Fixes DMD testcase 'test7618'.
2012-09-07 03:51:31 +02:00
kai 692d624db4 Make LDC1 compile again. 2012-08-17 15:34:17 +02:00
Jernej Krempuš 100907ffa2 Added pragma shufflevector. 2012-08-06 20:50:33 +02:00
kai 5216fa48d8 Remove conditional compiled code by favouring the 3.1 solution. 2012-08-03 22:57:01 +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
kai bf2aaaca84 More unification work. 2012-07-29 16:13:52 +02:00
David Nadlinger d24592b3e7 Fix #77 - LDC1 fails to compile tango.io.vfs.ZipFolder.
I think the same rewrite for contract this should be valid in D1 - if I missed something crucial, feel free to revert.
2012-06-02 19:21:36 +02:00
kai 48f8ffeb0b Further changes to compile using MSVC. 2012-05-23 17:36:26 +02:00
Alexey Prokhin 8c5cf40bb5 Fixed compilation of ldc1 2012-04-22 12:26:25 +04:00
Alexey Prokhin 67df422667 Fixed a segfault when using opDollar for struct and class indexing operations 2012-04-22 12:11:02 +04:00
Alexey Prokhin 07bf68afa3 DMD Issue 5590 - Regression(2.036) ICE(e2ir.c): when using .values on enum which is associative array 2012-04-21 22:37:36 +04:00
Alexey Prokhin 8364ad4675 Fixed a crash when calling a function by an alias 2012-04-21 22:37:36 +04:00
Alexey Prokhin 1bd4e725e8 Fixed appending function literals to an array 2012-04-21 22:37:36 +04:00
Alexey Prokhin f6111f23f2 Fixed #85 — ICE with a non-POD local struct literal in a class method 2012-03-06 10:47:24 +04:00
Alexey Prokhin ae7f0ca7e7 Preliminary vector support 2012-02-16 14:42:23 +04:00
Alexey Prokhin 9ace3fae3e DMD Issue 796 - Asserting a null object reference throws AssertError Failure internal\invariant.d(14) or Access Violation 2012-02-15 13:23:23 +04:00
Alexey Prokhin fa361ed598 DMD Issue 4523 - [tdpl] .remove method for Associative Arrays returns void in all cases 2012-02-15 13:23:23 +04:00
Alexey Prokhin eba8aac824 Fixed lambda inference 2012-02-15 13:23:22 +04:00
Alexey Prokhin e74e55df89 Merge 2.058beta 2012-02-15 13:23:16 +04:00
Alexey Prokhin e0dc95052b Check count of arguments passed to ldc specific intrinsics 2012-02-15 13:16:34 +04:00
Alexey Prokhin f237d85af0 Implemented bt/btc/btr/bts intrinsics 2012-02-15 13:16:34 +04:00
Alexey Prokhin 4d3ba3594c Refactoring: moved ldc specific code from dmd/attrib.c and dmd2/attrib.c into gen/pragma.cpp 2012-02-15 13:16:06 +04:00
Alexey Prokhin 81082996e1 Fixed issue #68 — ICE on Associative Array Of Delegate Literals 2012-01-29 14:06:58 +04:00
Alexey Prokhin b41688a0b8 DMD Issue 6859 - Segfault when abstract method uses with contract. 2011-12-16 20:15:31 +04:00
Alexey Prokhin edc4a5f003 DMD Issue 5416 - null should have a type of its own 2011-12-16 20:15:10 +04:00
Alexey Prokhin 2980f703b1 Fixed #35 — ICE: postfix operation on typedef'd value 2011-12-05 13:09:10 +04:00
Alexey Prokhin 4b22221eb9 Fixed #34 - StructType::setBody assert isOpaque() failed 2011-12-05 13:07:13 +04:00
Alexey Prokhin cd732537e8 Fixed atomic_store and atomic_load instrinsics 2011-12-04 16:05:48 +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 1f3d9b98d0 Removed old hack for llvm 2.8, it is not required anymore 2011-12-03 14:20:54 +04:00
Alexey Prokhin 014d6bdd4d Merged 2.056 2011-12-02 21:50:52 +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 6ef7ee6d32 Unimplemented toConstElem is not a fatal error if errors are gagged.
Because ldc uses gagging to check whether an expression is constant.
2011-11-01 14:35:28 +04:00
Alexey Prokhin b52c224d57 Merge v2.056 2011-11-01 11:44:03 +04:00
Alexey Prokhin 7431d58702 Rewritten initialization of global variables. 2011-10-25 15:43:49 +04:00
Alexey Prokhin 45426ca60d Implemented atomic intrinsics for llvm 3.0
Unline older versions, llvm 3.0 provides atomic instructions, not intrinsics.
The patch wraps the instructions into intrinsics, so they will be accessible
from d code.
2011-10-25 15:43:49 +04:00