Christian Kamm
b2d860374b
Default initialize temporary struct generated from struct literal.
...
This makes sure padding is zeroed out.
2008-08-09 09:03:52 +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
Tomas Lindquist Olsen
800497f2be
Fixed constant expression taking address of function.
2008-08-04 03:38:23 +02:00
Tomas Lindquist Olsen
daad516579
Removed the 'needsstorage' thing from Dsymbol. Arguments are not always given storage when applicable. This is not longer treat specially
...
in this regard. Code for accessing nested variables and contexts rewritten. Probably more. Fairly well tested.
2008-08-04 02:59:34 +02:00
Tomas Lindquist Olsen
b0a5f554d6
Fixed problem in AssignExp where the result value might be uninitialized. see mini/assign1.d
2008-08-03 16:59:28 +02:00
Tomas Lindquist Olsen
dedc0f4829
Fixed problem with using the variable names _arguments and _argptr in non D-style vararg functions.
...
Fixed problem with compiling with LLVM 2.3
2008-08-03 16:10:00 +02:00
Christian Kamm
aff505ea6e
Automated merge with http://hg.dsource.org/projects/llvmdc
2008-08-02 22:54:46 +02:00
Christian Kamm
ad8e9ae852
Implement a rough AddrExp::toConstElem()
2008-08-02 22:54:36 +02:00
Tomas Lindquist Olsen
1ee9104354
Fixed AA Rvalue-only access (like indexing an AA return value immediately).
2008-08-02 22:35:24 +02:00
Tomas Lindquist Olsen
e31070a437
Fixed problems with nested 'this'. Fixes #39 .
...
Fixed problem with debug info order of intrinsic calls (func.start after declare).
2008-08-02 00:50:39 +02:00
Tomas Lindquist Olsen
9b45fc5533
Changed the handling of variadic intrinsics a bit.
...
Removed the -fp80 option and made real be 80bit floats on X86, this is what the D spec really says it should be and fixes a bunch of issues.
Changed the handling of parameter attributes to a bit more generalized approach.
Added sext/zext attributes for byte/short/ubyte/ushort parameters, fixes #60 .
Parameter attribs now properly set for intrinsic calls if necessary.
Made the tango.math.Math patch less intrusive.
Fixed/added some mini tests.
2008-08-01 17:59:58 +02:00
Tomas Lindquist Olsen
07cfb67178
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
...
Reworked the LLVMDC specific pragmas.
2008-08-01 00:32:06 +02:00
Christian Kamm
5b5d7404b4
Insert array bound checks for slices.
2008-07-30 19:02:13 +02:00
Christian Kamm
7882f4858e
Enable array bounds check and emit them in IndexExp.
2008-07-30 18:38:56 +02:00
Tomas Lindquist Olsen
905ca019dd
Added type param to DVarValue as DMD sometimes overrides the type of the VarDeclaration.
...
Added support for align(1)/packed structs, other alignments are still ignored.
Fixed some problems with accessing lazy arguments.
2008-07-30 10:12:55 +02:00
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