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
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