Commit Graph

326 Commits

Author SHA1 Message Date
Tomas Lindquist Olsen
fd2fac6aa7 Fixed param attrs for return values (not really broken, but would be if more return attrs were added) 2008-08-01 18:07:33 +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
8f14ece3af Move DtoArrayBoundsCheck from llvmhelpers to arrays. 2008-07-31 19:14:49 +02:00
Christian Kamm
fcd784d14f Forgot a ->toBasetype() in the array bound code.
Fixes compile/typedef_05.
2008-07-30 20:25:46 +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
Christian Kamm
fc9ccb9f6a Rework complex divison. 2008-07-30 16:48:35 +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
f2c5fa2c2f Enable insertion of missing terminator instruction for main. 2008-07-29 15:58:45 +02:00
Christian Kamm
dd8982db1f Disallow delegates to static functions. 2008-07-29 12:49:14 +02:00
Christian Kamm
c6e0dd9be3 Fix the static array cast size check. 2008-07-29 12:44:28 +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
99f1cfef36 Error instead of assert on unimplemented interface functions. 2008-07-29 10:55:58 +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
20d429e085 Fixed delegate casts. 2008-07-28 08:05:21 +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
ad17af1e26 Rework complex addition, substraction and multiplication. Division may need the same.
Fixes run/c/cdouble_09_A,C,D and run/c/cfloat_09_A,C,D.
2008-07-27 17:53:49 +02:00
Tomas Lindquist Olsen
1f00395f0b Fixed path seperator issue on windows in linker. 2008-07-27 14:15:22 +02:00
Christian Kamm
86819d1cef Should only error if array initializer is too long. Too short is ok. 2008-07-26 17:33:49 +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
a278651178 Add error if array initializer has incorrect length. 2008-07-26 15:42:05 +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
Christian Kamm
b496d03606 Automated merge with http://hg.dsource.org/projects/llvmdc 2008-07-26 15:12:48 +02:00
Tomas Lindquist Olsen
1e87165fe7 Committed merge 2008-07-26 15:09:33 +02:00
Tomas Lindquist Olsen
70f16e36fb Added bitcode filename to very verbose logging.
Fixed -O<n> switches from llvm 2.4.
Removed md5 from the kdevelop project filelist.
2008-07-26 15:02:57 +02:00
Christian Kamm
a5f976ffce Start a new basic block after a continue statement.
Fixes bug_d_irstate_244_A/b.
2008-07-26 15:00:57 +02:00
Christian Kamm
732cdc5766 Fix inline asm FS:4 by writing the displacement directly into the asm instead of using %fs:$0 with an input constraint. 2008-07-26 13:38:25 +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
44931493f6 Fixed root cause for Invalid BitCasts. DtoCanLoad continues to return false
for aggregates even though llvm 2.4svn could load them.
2008-07-23 17:56:09 +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
d54a1347a4 Do only link to libpthread, libm and libdl on Linux. 2008-07-21 20:12:24 +02:00
Tomas Lindquist Olsen
d583262c98 [svn r394] Fixed the new DtoNullValue function 2008-07-15 15:16:56 +02:00
Christian Kamm
625f28814d [svn r393] Started implementation for DtoNullValue. 2008-07-15 14:53:16 +02:00
Christian Kamm
1486f29abb [svn r391] Fix classes nested inside functions for real. 2008-07-15 10:23:50 +02:00
Christian Kamm
e69f92b613 [svn r390] Make the zero value used when no nested context was created of the correct type.
Fixes run/class_06.
2008-07-15 08:44:08 +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
0d2ca74dac [svn r381] Allow concatenating with static arrays. 2008-07-14 17:26:58 +02:00
Christian Kamm
7e7441a5f8 [svn r380] Improve complex number support. 2008-07-14 17:22:43 +02:00
Christian Kamm
4d24676beb [svn r379] Fix slice assigns of the form T[] = T when T is a typedef.
Fixes run/a/array_initialization_20_B, D, F, H.
2008-07-14 12:39:23 +02:00
Christian Kamm
b0b530ea42 [svn r378] Make some errors fatal to prevent segfaults. Error instead of assert on missing label.
Fixes: nocompile/
finally_02, 03, 07, 08
goto_16_A, 16_B, 12, 13, 14
2008-07-14 12:11:30 +02:00
Christian Kamm
bcc4cfdea4 [svn r377] The previous check was too strict, it completely disallowed gotos within finally blocks. This reenables them as long as they don't cross a finally boundary. 2008-07-14 12:00:24 +02:00
Christian Kamm
c1fbcd9942 [svn r376] Fix bug with finally blocks and labels. The labels would get emitted multiple times and conflict.
It is now possible to add label scopes in IrFunction and all labels names will be prefixed accordingly.

Also disallow goto into finally blocks.

Fixes nocompile/finally_02 and others.
2008-07-14 11:48:55 +02:00
Christian Kamm
65be990012 [svn r375] Make DeclarationExp reuse storage if already allocated. 2008-07-14 11:47:03 +02:00