Commit graph

331 commits

Author SHA1 Message Date
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
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
Christian Kamm
1228595e7e Cast result of ...AssignExp to type the frontend expects if necessary. Fixes #116. 2008-11-14 16:26:12 +01:00
Tomas Lindquist Olsen
582deb9827 D2 changes!
Removed druntime from the repository again.. Sorry :/
Updated the druntime port a bit, now requires druntime from trunk.
Added info in runtime/README on how to get druntime from trunk.
Added patch to add LDC support to druntime.
Removed some debug logging from D2 builds.
Fixed broken typeinfo for const/invariant in D2.
2008-11-12 07:22:05 +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
f71b7ac284 Added inreg attribute where appropriate on x86 to follow ABI docs.
Removed now unnecessary temporary variable in StringExp.
2008-10-23 00:34:46 +02:00
Tomas Lindquist Olsen
a52f0330d0 Implemented first class delegates. closes #101 2008-10-22 21:50:08 +02: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
Tomas Lindquist Olsen
379bd9c330 Fixed weird struct problem from downs, see mini/compile_structs1.d
Rewrote DtoIndexStruct/Class , the old implementation were way too complex for what we really need now - since the DotVar changes.
2008-10-14 15:35:49 +02:00
Tomas Lindquist Olsen
180487b614 Fixed issue with accessing a WithStatement context from inside a nested function. see mini/with2.d
Renamed some LLVM uses of ::create statics to ::Create , lower case ones will be deprecated soon.
2008-10-14 13:21:14 +02:00
Tomas Lindquist Olsen
202c4f7bc2 Changed premake.lua to work with mingw.
Implemented array operations, not perfect but ok for tonight. closes #89
2008-10-13 23:19:32 +02:00
Tomas Lindquist Olsen
f15b115ee9 Started changing target triple stuff, part of fixing #97 2008-10-13 17:28:39 +02:00
Christian Kamm
40f724234d Remove too strict type check for DotTypeExp. Fixes run/t/typedef_19_B. 2008-10-11 22:44:17 +02:00
Christian Kamm
9499761131 When newing a struct, make sure the initializer is available. 2008-10-08 20:41:43 +02:00
Christian Kamm
b90799a376 Add DotTypeExp 2008-10-07 20:19:19 +02:00
Christian Kamm
ae9a2901df Implement BoolExp. 2008-10-07 18:41:00 +02:00
Tomas Lindquist Olsen
1bc3aec560 Forgot a change from DMD update.
Removed old Phobos rebuild profiles.
Updated Tango rebuild profile slightly.
2008-10-06 16:22:54 +02:00
Tomas Lindquist Olsen
ecd8a2ac07 Support structs that are merely a forward reference. See mini/forwdecl1.d 2008-10-06 14:06:55 +02:00
Christian Kamm
f4da5f4a89 Fix -oq, closes #96
Add value debug output to RealExp::toConstElem.
2008-10-03 19:24:46 +02:00
Tomas Lindquist Olsen
d0ff4494ac Fixed problem with taking the delegate of a nested function of the current function. 2008-10-02 01:28:33 +02:00
Tomas Lindquist Olsen
e7ad7296d0 Fixed issue with IsExpression and potential type mismatch for classes. 2008-10-01 20:55:13 +02:00
Christian Kamm
32c4f92334 Detect a missing global before trying to const init it. 2008-10-01 20:32:12 +02:00
Christian Kamm
77b5e841dd Make invalid compile time casts an error instead of asserting. 2008-10-01 19:15:01 +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
Tomas Lindquist Olsen
7b18b7a633 Implemented constant pointer casts (like casting function pointer to void* as a constant global initializer) 2008-09-28 21:09:21 +02:00
Christian Kamm
9ce414c174 Fix NegExp not to use substraction. 2008-09-21 19:28:57 +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
1daa67ba50 Removed useless assert in ArrayLiteralExp::toConstElem
Added second verification pass after optimization
Commented an optimization pass out from lvl2, it turns the IR invalid, see llvm PR 2800
2008-09-16 16:06:39 +02:00
Christian Kamm
310cdb14bf Fix typo in ArrayLiteralExp::toConstElem. 2008-09-16 08:42:40 +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
Tomas Lindquist Olsen
be651d97b7 Fixed AddrExp might silently change the type of its value, but we weren't casting to compensate ... why doesn't DMD insert a cast? 2008-09-15 02:39:55 +02:00
Tomas Lindquist Olsen
4280a86bcf Fixed .funcptr property of delegates, no longer uses the infamous DMD rewrites to pointer arithmetic, instead a GEPExp has been introduced. 2008-09-15 02:04:26 +02:00
Christian Kamm
857b89e3f4 Fix #88 : pragma(lib, "str") is now converted to -lstr in the linker command line. 2008-09-14 14:36:11 +02:00
Christian Kamm
d6e4f659e2 Allocate dynamic array literals on the heap. 2008-09-14 10:56:01 +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
bba1994b05 Fixed a few mini tests issues.
Added 'darwin' and 'Posix' as versions user can't set.
Fixed #80 .
2008-09-11 21:10:15 +02: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
Tomas Lindquist Olsen
3a8125b7c8 Pointer comparisons were being treated as signed integers. Now they are handled as unsigned integers. 2008-09-04 17:24:10 +02:00
Tomas Lindquist Olsen
ee29f29659 Fixed pointer comparisons with differing types. 2008-09-04 17:17:40 +02:00
Christian Kamm
b2b013d929 Always call finalizer for stack classes. Checking for the number of
destructors of the class type is not sufficient: we may be holding a derived
class with a destructor.

Fixes: run/auto_07
2008-08-28 20:17:21 +02:00
Christian Kamm
0f92afc5b9 Do not assert on non-existing supposed globals. (see nocompile/union_12,14) 2008-08-28 20:15:36 +02:00
Christian Kamm
ef80c904dc Make class invariants work. 2008-08-21 15:19:45 +02:00
Christian Kamm
9caf74c59b Fix binops change for OpAssign. 2008-08-17 13:16:35 +02:00
Christian Kamm
521a988e43 Binary ops had the wrong result type for real op imaginary.
Fixes:
run/creal_03
2008-08-17 12:21:53 +02:00
Christian Kamm
6a81f7e66f Do not need to allocate temporary for function literal. 2008-08-16 14:01:23 +02:00
Christian Kamm
7a535a1798 Fix function literals. They never carry a context.
Fixes:
run/f/foreach_36_A
2008-08-16 13:33:37 +02:00
Christian Kamm
60617d5444 Add interface comparison to EqualExp: just do pointer comparison.
Fixes run/b/bug_e2ir_1786_B,C.
2008-08-15 22:41:47 +02:00
Christian Kamm
646679fd44 Make struct literals work with typedefs.
Fixes run/s/struct_initialization_13_A and run/t/typedef_20_A
2008-08-10 10:40:26 +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