Christian Kamm
3b21ae25be
Move DeclarationExp code into a helper function so it can call itself for template mixin members.
2008-07-30 09:21:06 +02:00
Christian Kamm
dd8982db1f
Disallow delegates to static functions.
2008-07-29 12:49:14 +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
3db56c7a17
Error message for calling a function with a missing 'this' arg.
2008-07-29 10:29:52 +02:00
Tomas Lindquist Olsen
8c98499193
Fixed issue with internal real representation, incorrect for non x86-32 architectures.
...
Cleaned up CallExp::toElem, moved implementation to tocall.cpp providing a single procedure to call arbitrary D functions fairly easily.
2008-07-28 02:11:34 +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
0c9674e952
Make an unresolved global into an error instead of an assert.
...
Fixes nocompile/alias_28_A/F.
2008-07-26 15:23:15 +02:00
Tomas Lindquist Olsen
100c42bca3
Fixed segfault when using va_arg.
...
Fixed segfault when accessing function symbols from inline asm.
2008-07-23 20:21:18 +02:00
Christian Kamm
8f20b1ed00
Introducing opaque type to dmd frontent to be used with certain runtime array
...
and aa args and returns. There are still some bugs with aas.
2008-07-22 23:06:46 +02:00
Christian Kamm
566eac93fe
Get rid of runTimeHack and instead add proper argument info to the frontend
...
declatation.
2008-07-22 19:24:40 +02:00
Christian Kamm
e846017e80
[svn r388] ClassInfo declaration could fail if base classdecl hadn't been resolved.
...
Use ForceDeclare on the class decl instead of declaring class info only.
2008-07-15 08:17:43 +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
Tomas Lindquist Olsen
27674069e7
[svn r384] Some minor code cleanups.
2008-07-14 21:49:54 +02:00
Christian Kamm
ef2bdb9c1c
[svn r382] In CastExp, after the cast to CastExp.to force the type to be CastExp.type.
...
This is used for c.im for instance, where the cast is to idouble but type is double.
2008-07-14 19:17:25 +02:00
Christian Kamm
7e7441a5f8
[svn r380] Improve complex number support.
2008-07-14 17:22:43 +02:00
Christian Kamm
65be990012
[svn r375] Make DeclarationExp reuse storage if already allocated.
2008-07-14 11:47:03 +02:00
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