Commit Graph
135 Commits
Author SHA1 Message Date
Alexey Prokhin 375dcb095c Fix array comparison 2011-03-26 17:58:08 +03:00
Alexey Prokhin 6d89bfa961 Use _d_assocarrayliteralTX to initialize associative arrays. Replace depricated _d_arrayappendcT() by _d_arrayappendcTX(). Make sure that a l-value of a binassign expressions is only evaluated once (reapllied 1784 but only for D2) 2011-02-20 19:00:45 +03:00
Alexey Prokhin 34987f71e2 Fixed some issues with phobos. 2011-01-06 13:00:06 +03:00
Alexey Prokhin c5e9784863 Updated to dmdfe 2.051 2011-01-05 18:21:40 +03:00
Alexey Prokhin 1c59eed83a Check for lower slice bound when bounds checking is enabled 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 3c4db7bc87 Fixed initialization of the static arrays 2011-01-02 17:43:02 +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 eccd26ac93 Fixed crashes when compiling interpret test. 2010-12-17 12:55:28 +03:00
Alexey Prokhin de15f4adbb That should be in rev. 1744... 2010-12-15 22:24:23 +03:00
Alexey Prokhin 7cf80b3541 Fixed ldc2 crash when compiling static array concatenation. 2010-12-15 18:55:56 +03:00
Alexey Prokhin 88d7b955c8 Reverted rev.1710 and rev.1711 2010-11-04 17:58:27 +03:00
Alexey Prokhin fbb36404d9 Removed unnecessary temporary variables from getSlice() and DtoCatArrays(). 2010-11-04 14:14:08 +03:00
Alexey Prokhin 6b1243cec2 Fixed creating of arrays of immutable types 2010-11-02 16:38:13 +03:00
Alexey Prokhin dc50773333 Fixed D1 regression. Thanks to mwarning 2010-10-31 15:22:24 +03: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 eb68fc3d8c Fixed building of LDC1. Work on arrays 2010-10-08 15:58:10 +04:00
Alexey Prokhin 41a66cf437 Use druntime functions for array operations 2010-10-08 15:10:56 +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
Kelly Wilson b38845e88e Apply patch from klickverbot. This is his 'proper fix' patch for bug #395. 2010-03-08 23:37:40 -07:00
Christian Kamm 532af253a9 Apply workaround for #395 by klickverbot. 2010-03-08 20:06:08 +01:00
Christian Kamm 9cd32549c4 Improve array append performance.
Actually use the appropriate runtime function, instead of just
growing the array by one!
2010-02-14 10:11:05 +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 0a1d467ac7 getTrue/getFalse were moved back to ConstantInt
Requires LLVM >= r77685
2009-07-31 19:11:07 +02:00
Benjamin Kramer 66101517d7 LLVMContext changes up to r77366 2009-07-30 15:25:10 +02:00
Benjamin Kramer a398cd39b3 ConstantInt::get{True,False} moved to LLVMContext
Non-breaking build fix for LLVM r76533. Also fixes a context related
bug in GarbageCollect2Stack.
2009-07-21 13:11:39 +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
Frits van Bommel 8e8837737a Be a little less overzealous with arrays of void-initialized typedefs;
initialize `new VoidTD[][](2)` and `new VoidTD[][][](2, 3)` (but not
`new VoidTD[2][3]`, which is a dynamic array of static arrays of
void-initialized typedefs).
2009-06-24 18:01:02 +02:00
Frits van Bommel c6750b34b7 Don't initialize arrays of (arrays of...) void-initialized typedefs. 2009-06-24 17:14:50 +02:00
Christian Kamm 1563c14e7a The llvm element type of void arrays should be i8 and not void.
This caused DtoArrayCopyToSlice to fail when trying to get the size of
llvm-void for something like void[3] s = "abc"; inside a function.
2009-06-12 20:39:01 +02:00
Frits van Bommel f79e40a491 Use llvm.memset instead of _d_array_init_i1 and _d_array_init_i8.
This exposes what's happening to LLVM, and memset is probably faster than the
runtime functions we were using anyway.
2009-06-07 13:57:59 +02:00
Tomas Lindquist Olsen f6997cb604 D2:
Applied function type from D1 frontend that got removed in D2, it's critical for member function type to be correct.

Fixed a bunch of type discrepancies in druntime object.di vs. genobj.d .

Disabled (#if 0) some potentally very large type dumps for -vv .

Updated classinfo and typeinfo generation for D2, almost complete now.

Added finer grained checks for vtbl type mismatching, aids debugging.
2009-06-03 02:28:48 +02:00
Christian Kamm 78aa98fdfb Error on invalid array cast. See DMD3041. 2009-05-31 15:07:04 +02:00
Tomas Lindquist Olsen 0414a5acbb Fixed filename in array bounds check for mixed in imported template function. Fixes ticket #295 . 2009-05-17 14:56:29 +02:00
Frits van Bommel 76ae0b0ab6 Fix format-string bugs by adding __attribute__((__format__)) in all applicable
places and fixing all warnings my gcc produced.
Among other things, this should fix several segfaults (including one I just
ran into).
2009-05-17 00:15:25 +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 041a8c4bd3 Fix DtoArrayCopyToSlice by passing length*sizeof(element) instead of just length to _d_array_slice_copy. 2009-05-10 22:26:04 +02:00
Tomas Lindquist Olsen dfea022a86 Changed array slice copying to call a runtime function when assertions or array bound checks are enabled instead of just doing a memcpy. This makes sure an exception is thrown if the copy is invalid (ie. different lengths or overlap). Fixes ticket #283 . Rebuilding the runtime is necessary. 2009-05-10 02:23:05 +02:00
Christian Kamm 77100f890c Make static int[] a = [1, 2]; a[0] = 4; not segfault
by making the array data ptr a non-const global variable.
2009-05-03 11:16:54 +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
Christian Kamm 893e17c259 Simplify array casts and implement dyn array -> static array. 2009-04-12 19:56:03 +02:00
Christian Kamm d251e5d1f4 Implement static array -> static array cast. Fixes #223.
dynamic array -> static array is still misssing!
2009-04-12 16:18:02 +02:00