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
Tomas Lindquist Olsen
ec986231e5
Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
2009-03-27 21:50:32 +01:00
Frits van Bommel
dd41366a99
Use llvm::CallSite instead of custom CallOrInvoke class.
2009-02-28 22:16:52 +01:00
Tomas Lindquist Olsen
fc480b7fd8
SWITCHED TO LLVM 2.5 !
...
Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel.
Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple.
Fixed return calling convention for complex numbers, ST and ST(1) were switched around.
Added some testcases.
I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
2009-02-08 05:26:54 +01:00
Tomas Lindquist Olsen
280be5ef8e
Fixed dstress/run/a/array_initialization_17_A.d regression. default initialized static array elements in a constant static array initializer was getting incorrect values.
...
Fixed minor version problem in mini/naked_asm4.d test case.
2009-02-03 23:48:47 +01:00
Tomas Lindquist Olsen
e6ef3ecf15
Fixed bug #191 by rewriting DtoConstArrayInitializer, patch unfortunately caused regressions, hopefully this doesn't :P
2009-02-01 23:30:36 +01:00
Tomas Lindquist Olsen
2532856f1c
Commented some logging that could be '''very''' long, cuts -vv output size of a gtkd gl sample down 1.2GB by 3/4.
...
Fixed wrong pointer type for multidimension "deep" slicing.
2008-12-04 16:11:09 +01:00
Tomas Lindquist Olsen
f46f865375
Removed KDevelop3 project files, CMake can generate them just fine!
...
Fixed function literals in static initializers.
Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE.
Changed errors to go to stderr instead of stdout.
Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
2008-11-29 21:25:43 +01:00
Christian Kamm
049e24cef8
Error instead of assert when trying to build a default initializer for void[n].
2008-11-29 12:28:10 +01:00
Christian Kamm
cdbc4f84d2
Fix warnings on x86-64. By fvbommel.
2008-11-28 21:24:08 +01:00
Christian Kamm
6efc9a3324
Get rid of DtoBoolean - use DtoCast(... Type::tbool) instead.
...
Fixed some casts to bool that were using truncation.
2008-11-22 18:35:52 +01:00
Tomas Lindquist Olsen
c4c1c1d72e
Added initial D2 support, D2 frontend and changes to codegen to make things compile.
2008-11-11 01:38:48 +01:00
Tomas Lindquist Olsen
f7ea1da010
Removed TypeOpaque from DMD.
...
Changed runtime functions taking opaque[] to void[].
Implemented proper type painting, to avoid "resizing" array casts in runtime calls that previously took opaque[].
Implemented dynamic arrays as first class types, this implements proper ABI for these types on x86.
Added dwarf region end after call to assert function, fixes some problems with llvm not allowing this to be missing.
Reverted change to WithStatement from rev [704] it breaks MiniD, mini/with2.d needs to be fixed some other way...
Fixed tango bug 1339 in runtime, problem with _adReverseChar on invalid UTF-8.
Disabled .bc generation in the compiler runtime part, genobj.d triggers some llvm bug when using debug info. the .o seems to work fine.
2008-10-22 14:55:33 +02:00
Christian Kamm
6cb213badf
Only allocate the module file name once. Fixes #90 .
2008-10-12 10:35:16 +02:00
Tomas Lindquist Olsen
f706098c56
Added -version=Tango in default llvmdc.conf
...
Fixed problem with array casts, all DWT modules needed for HelloWorld1 samples now compile. Still some linking issues.
2008-10-06 12:46:57 +02:00
Tomas Lindquist Olsen
bce9368514
Updated to latest LLVM trunk, function notes have been removed and merged with parameter attributes, which have been renamed to just attributes. Nothing seems to have broke!
2008-10-01 23:17:14 +02:00
Tomas Lindquist Olsen
bcafbe169d
Wrapped all the most potentially expensive logging calls in a conditional to only do work when actually requested.
...
Commented some logging calls that could potentially write out many megabytes of type dumps.
2008-10-01 18:32:31 +02:00
Christian Kamm
bb47b7c4ce
Backed out changeset 1b62222581fb
...
Do not use i8 for bool. Instead rely on the target to store i1 as i8.
2008-09-21 14:45:41 +02:00
Christian Kamm
4b02533745
Change bool type to i8
2008-09-20 10:13:15 +02:00
Tomas Lindquist Olsen
56fed01c88
Fixed ArrayLiteralExp::toConstElem for dynamic arrays, tango-user library should now be possible to build. It seems to be related to DMD bug 2356, which must have been introduced recently, as we already handled this fine for ArrayInitializers, just not ArrayLiterals... Kinda annoying to have to do this work due to DMD bugs ...
2008-09-15 15:48:59 +02:00
Christian Kamm
9c514a7afe
Undid some of the previous changes: DtoArrayInit has issues with arrays
...
similar to T[n][].
2008-09-14 13:47:38 +02:00
Christian Kamm
30c9af1945
Add _d_newarrayvT and _d_newarraymvT to create arrays without initialization.
...
Adjust DtoNewDynArray to use DtoArrayInit for initialization of new arrays.
Make Type::tvoid->defaultInit() not error.
2008-09-14 10:13:50 +02:00
Tomas Lindquist Olsen
d474fa027a
Fixed most regressions from last commit.
2008-09-10 12:33:33 -07:00
Tomas Lindquist Olsen
8e9b957bce
Complex number should now follow the D ABI on x86. They're also treated as first class values now. Big change.
2008-09-09 16:49:47 -07:00
Christian Kamm
53f8542719
Got rid of improper static array compile time index check.
...
It had caused tango.core.Variant to fail to compile.
2008-08-13 22:31:46 +02:00
Tomas Lindquist Olsen
9d7f16b967
Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
...
Reimplemented support for nested functions/class using a new approach.
Added error on taking address of intrinsic.
Fixed problems with the ->syntaxCopy of TypeFunction delegate exp.
Removed DtoDType and replaced all uses with ->toBasetype() instead.
Removed unused inplace stuff.
Fixed a bunch of issues in the runtime unittests, not complete yet.
Added mini tests.
2008-08-10 08:37:38 +02:00
Christian Kamm
8362b86c5a
Move AllocaInst creation into DtoAlloca helper. Will enable special zero-init of fp80 reals' padding.
2008-08-05 19:28:19 +02:00
Christian Kamm
8f14ece3af
Move DtoArrayBoundsCheck from llvmhelpers to arrays.
2008-07-31 19:14:49 +02:00
Christian Kamm
c6e0dd9be3
Fix the static array cast size check.
2008-07-29 12:44:28 +02:00
Christian Kamm
caa61a5523
Error if static array is cast to an array such that oldarraysize % newelemsize != 0.
2008-07-29 12:32:01 +02:00