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