Commit graph

99 commits

Author SHA1 Message Date
Tomas Lindquist Olsen
dbd640a3dc [svn r368] Fixed custom class allocators with arbitrary user arguments. Closes #25
Removed some dead code.
Started on a more generalised approach to call misc. D functions.
2008-07-13 20:49:10 +02:00
Tomas Lindquist Olsen
c4982165ba [svn r366] Fixed identity exprs for structs was comparing addresses, not content! 2008-07-13 04:27:02 +02:00
Tomas Lindquist Olsen
a4e4f34a34 [svn r365] Implemented raw struct equality comparison, uses C memcmp.
Renamed DtoDelegateCompare to DtoDelegateEquals, for consistency with the other equality helpers.
2008-07-13 04:11:08 +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
Tomas Lindquist Olsen
832504e5d7 [svn r357] Merged DMD 1.033 2008-07-12 19:38:31 +02:00
Tomas Lindquist Olsen
fc6e0cfc65 [svn r356] Fixed problem with array length assignment introduced in [355] 2008-07-12 17:04:36 +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
d16ddb524f [svn r342] Fix DMD bug 2206.
Implement mixin declarations in LLVMDC.
2008-07-09 17:01:08 +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
Christian Kamm
9f0b3fb062 [svn r335] The basics of exception handling are in place.
Still need to make sure calls are turned into invokes everywhere. (NewExpression for instance)
Still some rough edges and corner cases to figure out.
Needs testing!
2008-07-02 22:20:18 +02:00
Christian Kamm
7d4ea30633 [svn r334] Produce an error for zero-size types instead of segfaulting. 2008-06-29 22:22:37 +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
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
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
67dd564222 [svn r307] Fixed: multidimensional new expressions now work. Eg.:
auto ma = new int[][] (3,9);
2008-06-21 04:47:14 +02:00
Tomas Lindquist Olsen
f8b421d4ac [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
Removed the LLVM stacktrace code from mars.c.
Moved the LLVM based default target detection code from mars.c to llvmhelpers.cpp.
2008-06-21 02:48:53 +02:00
Christian Kamm
ddfa41938f [svn r304] Fix associative array literals by always reserving a zero inited temporary for them. 2008-06-21 00:54:55 +02:00
Christian Kamm
02caaff23e [svn r303] Start a new basicblock behind a HaltExp to prevent compiler errors. 2008-06-21 00:00:56 +02:00
Christian Kamm
a99d70f7bc [svn r302] Make HaltExps and assert(0) generate an assert message again instead of using llvm's trap intrinsic. 2008-06-20 23:38:51 +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
e1aa043a81 [svn r289] Fixed: right shift >> was broken for unsigned types.
Fixed: debug info for classes now started.
2008-06-15 18:52:27 +02:00
Tomas Lindquist Olsen
c2430c713b [svn r285] Fixed D -> bool LLVM helper for floating point values.
Changed the way D-style varargs are passed, now each param should be aligned to size_t.sizeof.
2008-06-14 17:28:13 +02:00
Tomas Lindquist Olsen
de89b4bc6f [svn r280] Fixed a bunch of issues with switch statements. Ended up a bit far reaching... 2008-06-14 05:13:49 +02:00
Tomas Lindquist Olsen
b13a5646ca [svn r277] Fixed a nasty bug in delegate expressions. Context pointers to nested functions of the parent, from inside a nested function were
invalid.
2008-06-13 05:47:28 +02:00
Tomas Lindquist Olsen
9a28d083f8 [svn r276] Fixed debug info for 'this' arg seemed to be broken. 2008-06-12 19:59:19 +02:00
Tomas Lindquist Olsen
1e87ae15ef [svn r262] Fixed debug info for normal function parameters.
Fixed debug info for pointers to basic types.
2008-06-09 12:43:16 +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
e23169d5d8 [svn r260] Changed some of the LLVMDC specific code in the Tango core and did some minor cleanups. 2008-06-09 03:02:14 +02:00
Tomas Lindquist Olsen
4a2d8494a6 [svn r257] Fixed: array .sort and .reverse runtime code was incorrect.
Fixed: most runtime calls did not get correct param attrs.
2008-06-09 00:01:10 +02:00
Christian Kamm
68d5150c1b [svn r235] rough port of GDC's inline assembler code, unfinished 2008-06-05 19:22:37 +02:00
Tomas Lindquist Olsen
d72ed8f5eb [svn r234] Fixed: missed a few bogus #ifs in last revision. 2008-06-05 06:43:34 +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
590d44d302 [svn r231] Changed: warnings are no longer treated as an error.
Added some comments and cleaned up CallExp::toElem a tiny bit.
Fixed: struct literals always reported inplace assignment even if they allocated a temporary.
Fixed: passing stuff to a D-style vararg which did inplace assignment was generated suboptimal code.
2008-06-03 13:51:09 +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
0b479b5749 [svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
Fixed: the tango/lib/compiler/llvmdc/llvmdc.mak makefile was a bit incorrect.
Changed: the basic gc is now the default.
Changed: renamed a few temporary names in the LLVM IR output.
2008-05-27 22:14:24 +02:00
Tomas Lindquist Olsen
a954f06e90 [svn r226] Fixed: deleting interface.
Removed: unused util function for calling class destructors.
2008-05-14 02:00:23 +02:00
Tomas Lindquist Olsen
19748f09ec [svn r225] Fixed: delete expressions no longer use llvm's free instruction, which crashes on a GC provided pointer. 2008-05-14 01:22:40 +02:00
Tomas Lindquist Olsen
1eb35898c6 [svn r223] Fixed: assert with message could be broken.
Fixed: array length exp could fail on slice.
2008-05-13 21:40:39 +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
c571bf0f70 [svn r217] Updated: the rebuild profiles.
Fixed: way to find class data fields was too strict type wise.
Fixed: foreach resulting in an implicit delegate could fail.
2008-05-12 22:44:25 +02:00
Tomas Lindquist Olsen
941e36fa47 [svn r213] Fixed: foreach on an object seems to have been broken, the issue was that DMD generates an implicit delegate with conflicting types for 'this'.
Fixed: string switch runtime support had wrong param types.
Fixed: string switch on a temporary slice was broken.
2008-05-12 20:02:52 +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
3678dabfd9 [svn r199] Fixed: still some small issues with string literals implicitly converting to different pointer types. Should be fixed now! 2008-05-07 20:22:42 +02:00
Tomas Lindquist Olsen
44f53bc164 [svn r194] Fixed: string literal constant expressions with static array type was broken. 2008-05-07 05:02:48 +02:00
Tomas Lindquist Olsen
24bd9034c3 [svn r193] Fixed: abstract classes implementing interfaces now output proper Interface info arrays. (null vtables).
Did a little renaming of delegate utils.
2008-05-07 04:45:51 +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
Tomas Lindquist Olsen
c31af3dc2d [svn r191] Fixed: array literals did not support all type/storage combinations.
Fixed: with expression had broke somewhere along the way.
2008-05-07 00:01:13 +02:00