Commit graph

73 commits

Author SHA1 Message Date
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
Christian Kamm
86819d1cef Should only error if array initializer is too long. Too short is ok. 2008-07-26 17:33:49 +02:00
Christian Kamm
907a03a3be Give error messages for invalid casts.
This required passing Loc information to certain functions.
Fixes nocompile/b/bug_cgcs_354_A/B.
2008-07-26 17:19:16 +02:00
Christian Kamm
a278651178 Add error if array initializer has incorrect length. 2008-07-26 15:42:05 +02:00
Tomas Lindquist Olsen
86a3f53cfe [svn r386] Fixed broken DtoBoolean.
Some code cleanup.
2008-07-15 00:17:03 +02:00
Christian Kamm
25dea7a16e [svn r385] Fix lvalue cast problems with -= and friends.
Fix complex DtoBoolean.
2008-07-14 22:48:03 +02:00
Christian Kamm
0d2ca74dac [svn r381] Allow concatenating with static arrays. 2008-07-14 17:26:58 +02:00
Tomas Lindquist Olsen
ee5d84a1fa [svn r371] Fixed array init was still broken for immediate slices and complex values. 2008-07-14 01:03:53 +02:00
Tomas Lindquist Olsen
d1e41f611e [svn r361] Removed some dead code. 2008-07-13 02:04:25 +02:00
Tomas Lindquist Olsen
85c1b42b1b [svn r360] Another mostly rewrite of DtoArrayInit. Should be much more robust now, and probably faster code generated for the most common cases too!
Fixed issues with slice initialization (!!!) of multidimensional static arrays.
Attempt to fix issue with referencing nested 'this' pointers introduced in DMD 1.033 merge.
2008-07-13 01:29:49 +02:00
Christian Kamm
c67753508b [svn r359] Try to fix DtoArrayInit. Unfinished, breaks for arrays of primitive types. 2008-07-12 23:56:56 +02:00
Christian Kamm
717d52d4f0 [svn r355] Get rid of IRState::exps and topexp. 2008-07-12 15:43:13 +02:00
Tomas Lindquist Olsen
521de1a47e [svn r349] Fixed problems with static arrays of void as well as a static arrays with zero length.
Fixed issues with DMD generated assert statements when using class invariants, generally due to incomplete ASTs.
Removed some dead code.
Added a few comments.
2008-07-11 00:17:00 +02:00
Christian Kamm
37305fb47e [svn r336] Made sure calls within a landing pad area are invokes.
Nested trys still need some consideration.
2008-07-03 22:05:45 +02:00
Tomas Lindquist Olsen
ac3744a59d [svn r329] Cleaned up a bunch of array code for handling special slice cases no
longer relevant.
2008-06-28 05:57:16 +02:00
Christian Kamm
35263a7847 [svn r318] Moved the call to DtoBoolean before the not instruction.
Fixes array_initialization_17_A.
2008-06-23 19:19:37 +02:00
Christian Kamm
956f3b7c2a [svn r317] Convert result of _adEq runtime function to bool to make sure EqualExp returns i1 bool. 2008-06-23 19:08:32 +02:00
Tomas Lindquist Olsen
599f879149 [svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
There was problems with most non basic types...
Added an option to premake so we can do: premake --target gnu --no-boehm
to disable the Boehm GC.
2008-06-23 14:48:42 +02:00
Christian Kamm
c53562ee10 [svn r314] Get correct value type for newing of multidimensional dynamic arrays.
Fixes array_initialization_26_E.
2008-06-22 15:21:34 +02:00
Tomas Lindquist Olsen
33b9d4348c [svn r312] Changed assert codegen to insert an unreachable terminator after the call to the assert function, which currently calls abort().
Changed array comparison runtime support to pass the array typeinfo instead of the element typeinfo. This allows a cleaner and faster implementation.
2008-06-21 21:16:26 +02:00
Tomas Lindquist Olsen
ffd38d355d [svn r308] Really fixed multidimensional new expressions. the first length was bad in the resulting slice. 2008-06-21 05:03:42 +02:00
Tomas Lindquist Olsen
67dd564222 [svn r307] Fixed: multidimensional new expressions now work. Eg.:
auto ma = new int[][] (3,9);
2008-06-21 04:47:14 +02:00
Christian Kamm
87f6a4fa41 [svn r301] Fixed incorrect codegen with array slice assigns. 2008-06-20 23:27:59 +02:00
Tomas Lindquist Olsen
928f7d4de5 [svn r296] Removed: the 'suite' dir, it never took off!
Fixed: foreach statement, key-type checks were buggy.
Fixed: setting LLVMDC versions on the command line is now an error.
Fixed: array compare runtime had incorrect param attrs on call.
Fixed: index expressions on dynamic array slices w/o storage was broken.
Fixed: scope classes had incorrect finalization in some cases.
Fixed: when outputting !ClassInfoS !OffsetTypeInfoS, static class members were trying to be included, crashing the compiler.
Fixed: calling LLVMDC with -inline but not any -O option caused assertion failure.
Changed: the runtime now uses a single interface to "get" to !TypeInfoS, part of eliminating duplicate !TypeInfo codegen.
2008-06-19 17:30:32 +02:00
Tomas Lindquist Olsen
8b83eda2a2 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
Did a lot of smaller cleans up here and there.
Replaced more llvm::Foo with LLFoo for common stuff.
Split up tollvm.cpp.
2008-06-09 09:37:08 +02:00
Tomas Lindquist Olsen
28382e3567 [svn r250] Fixed the warning about dropping arguments to _Dmain when optimizing.
Did a few cleanups in inline asm code.
2008-06-08 08:03:19 +02:00
Tomas Lindquist Olsen
d03c3a7757 [svn r233] Added: -oq command line option for writing fully qualified object names.
Added: started support for x86 80bit floating point.
Changed: aggregates passed by value now use the llvm 'byval' parameter attribute, also lays ground work for
using other attributes.
Changed: eliminated a lot more std::vectorS, these showed up pretty much at the top when profiling!
Changed: performed other misc. cleanups.
Changed: halt expression now call the new llvm trap intrinsic instead of an assert(0).
Changed: dstress suite now passes -O0 by default, this only eliminates unreferenced globals, which speeds up
linking quite a bit.
2008-06-05 06:38:36 +02:00
Tomas Lindquist Olsen
b4bb3aaec4 [svn r229] Updated the object.d implementation to the latest Tango.
Fixed a bunch of the built-in typeinfos for arrays, they did not inherit TypeInfo_Array.
Applied patch to tango/text/convert/Layout.d by fvbommel, closes #47 .
Cleaned up some type code.
Replaced uses of llvm::Type with LLType (a typedef), same for Value and Constant.
Fixed a few cases where typeinfo for user structs could be emitted multiple times, seems to still be some cases of this :/
2008-05-30 19:32:04 +02:00
Tomas Lindquist Olsen
6b735db510 [svn r227] Fixed: crash in lifetime.d when resizing array of AAs by .length assignment. 2008-05-27 19:53:29 +02:00
Tomas Lindquist Olsen
3365b4c02f [svn r221] Update: Switched to the 2.3 LLVM svn branch, http://llvm.org/svn/llvm-project/llvm/branches/release_23 .
Fixed: Implemented volatile statements. Uses the LLVM memory barrier intrinsic, closes #21 .
2008-05-13 17:58:11 +02:00
Tomas Lindquist Olsen
c380f43929 [svn r219] Fixed: the tango/lib/gc/basic garbage collector now compiles and links into an executable (change in tango/lib/llvmdc-posix.mak), closes #5 .
Changed: removed the crappy realloc based dynamic memory runtime and started moving over to DMD style runtime support, part of moving to real GC.
Fixed: dynamic arrays now use GC runtime for allocating memory.
Fixed: new expression now use GC for allocating memory.
Changed: revamped the dynamic array support routines related to dynamic memory.
Fixed: assertions no longer create exsessive allocas.
Changed: misc. minor cleanups.
2008-05-13 14:42:09 +02:00
Tomas Lindquist Olsen
9f3be435b0 [svn r209] Fixed: exotic array to pointer casts were broken.
Changed: classes now have opaque vtables.
2008-05-12 18:44:11 +02:00
Tomas Lindquist Olsen
d6db7fc03d [svn r198] Fixed: doing a length-changing cast of a full slice segfaulted. eg:
int[] ia = [1,2,3];
	byte[] ba = cast(byte[])ia[];
2008-05-07 19:54:01 +02:00
Tomas Lindquist Olsen
50db9be203 [svn r192] Fixed: String literals as constant expression was broken for utf16/32. 2008-05-07 00:58:36 +02:00