Commit Graph

70 Commits

Author SHA1 Message Date
Christian Kamm
ed9591d81f Make IrFuncTy a member of TypeFunction. Reset between modules compiled in the
same LDC call.
2009-03-07 14:25:30 +01:00
Tomas Lindquist Olsen
c3a53c0128 Added hasUnalignedFields helper to check if a type has unaligned fields - as per request from fvbommel. Result is cached in TypeStruct. 2009-03-03 15:08:26 +01:00
Tomas Lindquist Olsen
5dbe3ee8e2 Abstracted more (most) ABI details out of the normal codegen. 2009-03-03 02:51:21 +01:00
Tomas Lindquist Olsen
c3504e59f3 Fixed alignsize for void types. (it's one byte) 2009-03-01 01:33:08 +01:00
Frits van Bommel
d4fdbf59a1 Use LLVM alignment data instead of hand-picked. 2009-02-28 16:09:44 +01:00
Frits van Bommel
99ed181690 Preparation for next patch. Don't ask about why this is needed.
I hate the preprocessor. Let's just leave it at that.
2009-02-28 16:09:35 +01:00
Christian Kamm
d3ea6fb855 Fix alignment info of cdouble, cfloat. They align the same as double, float now. 2009-02-28 13:48:49 +01:00
Christian Kamm
b3de4e773e Fix #217. getInternalTypeInfo doesn't work with LDC. 2009-02-17 18:57:11 +01:00
Christian Kamm
c3cdcab8d2 Convert struct arg to integer when passing inreg to make sure LLVM doesn't
ignore the attribute!
2009-02-04 18:39:33 +01:00
Christian Kamm
bbcea86cf2 Follow the D ABI and pass the last arg in a register if it is a struct that fits. 2009-02-03 21:46:46 +01:00
Christian Kamm
01f19c466c Fix #198 and #199 by making CTFE on static struct initializers work.
Renamed SymbolDeclaration to StaticStructInitDeclaration to make its usage clearer.
2009-02-01 20:20:56 +01:00
Christian Kamm
ab9b9cc2e9 Solaris compatibility and proc map parsing #183, thanks BlueZeniX! 2009-01-22 18:53:32 +01:00
Tomas Lindquist Olsen
6f3aff87df Fixed 64bit problem in mtype.c with _adReverse runtime call, fixes #161 . 2009-01-10 14:35:48 +01:00
Tomas Lindquist Olsen
16409a3367 Merged DMD 1.038 2009-01-06 16:33:51 +01:00
Christian Kamm
e7f750aee1 Apply BlueZeniX's patch for OpenSolaris compatibility. Fixes #158. 2009-01-04 15:49:28 +01:00
Tomas Lindquist Olsen
6716aecc52 Merged DMD 1.037 frontend 2008-12-13 13:15:31 +01:00
Tomas Lindquist Olsen
6997919627 Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Updated Tango patch to latest Tango revision.
2008-12-02 02:45:31 +01:00
Tomas Lindquist Olsen
f46f865375 Removed KDevelop3 project files, CMake can generate them just fine!
Fixed function literals in static initializers.
Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE.
Changed errors to go to stderr instead of stdout.
Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
2008-11-29 21:25:43 +01:00
Christian Kamm
cb3e057631 Move tuple syntax copy for function arguments after semantic, to make sure
->ty contains the final value. Fixes run/t/tuple_20_A again.
2008-11-22 18:45:09 +01:00
Christian Kamm
ccd8810e68 Fix bug reported by downs. Related to delegate types within tuple template parameters. 2008-11-18 17:14:57 +01:00
Tomas Lindquist Olsen
41d9e79780 Fixed 64bit problem with aaValues runtime calls (assumed 32bits) 2008-11-16 20:42:45 +01:00
Christian Kamm
d3f190822c Fix REALSIZE, REALPAD and alignment of double and real for x86-64. 2008-10-30 15:58:58 +01:00
Christian Kamm
36a98404ae Fix accidental double-inreg caused by shared TupleType. Enabled inreg by default. 2008-10-30 10:16:37 +01:00
Tomas Lindquist Olsen
3c3a5dda14 Implemented correct parameter order according to x86-32 ABI documentation.
Changed AA types to just a void* .
2008-10-25 06:03:28 +02:00
Tomas Lindquist Olsen
f71b7ac284 Added inreg attribute where appropriate on x86 to follow ABI docs.
Removed now unnecessary temporary variable in StringExp.
2008-10-23 00:34:46 +02:00
Tomas Lindquist Olsen
5ad345646a Merged DMD 1.036.
Improved comments a little in the runtime source code.
2008-10-22 17:06:17 +02:00
Tomas Lindquist Olsen
f7ea1da010 Removed TypeOpaque from DMD.
Changed runtime functions taking opaque[] to void[].
Implemented proper type painting, to avoid "resizing" array casts in runtime calls that previously took opaque[].
Implemented dynamic arrays as first class types, this implements proper ABI for these types on x86.
Added dwarf region end after call to assert function, fixes some problems with llvm not allowing this to be missing.
Reverted change to WithStatement from rev [704] it breaks MiniD, mini/with2.d needs to be fixed some other way...
Fixed tango bug 1339 in runtime, problem with _adReverseChar on invalid UTF-8.
Disabled .bc generation in the compiler runtime part, genobj.d triggers some llvm bug when using debug info. the .o seems to work fine.
2008-10-22 14:55:33 +02:00
Christian Kamm
a3a418150e Some missed LLVMDC -> LDC. 2008-10-06 22:54:08 +02:00
Tomas Lindquist Olsen
06a55194d7 Upgraded frontend to DMD 1.035 2008-10-06 16:22:11 +02:00
Christian Kamm
2f9b9dead7 Make default argument protection check not error for undefined protection.
Fix symbol visibility issues in Tango.
2008-10-03 17:31:16 +02:00
Christian Kamm
c4b523dc29 Nicer error message on some invalid default args. 2008-10-01 21:14:15 +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
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
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
c092165b3a Fixed mini/missingti.d 2008-08-14 03:09:26 +02:00
Christian Kamm
d81aeb0d28 Make the alignment computations of the frontend match the llvm default alignment.
Breaks run/double_03 because it assumes double.alignof >= 8, which does not
seem to be the case for llvm.
2008-08-10 13:42:08 +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
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
Christian Kamm
e6dd53b61c Made setup for runtime calls in dmd frontend allocate less. 2008-07-24 18:51:36 +02:00
Christian Kamm
169fe68a25 Fix argument types for wchar/char reverse and sort. 2008-07-24 18:20:40 +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
e12c58abad Do not strip the leading underscore for typeinfo mangles on Windows. 2008-07-21 20:11:42 +02:00
Tomas Lindquist Olsen
832504e5d7 [svn r357] Merged DMD 1.033 2008-07-12 19:38:31 +02:00
Tomas Lindquist Olsen
03d26e1178 [svn r326] Fixed a bunch of issues with printf's that MinGW32 did not support.
Fixed problems with label collisions when using labels inside inline asm. LabelStatement is now easily reached given its
Identifier, which should be useful elsewhere too.
Enabled inline asm for building the lib/compiler/llvmdc runtime code, fixing branches out of asm makes this possible.
2008-06-27 22:04:35 +02:00
Tomas Lindquist Olsen
5647598da9 [svn r306] Fixed: it's now possible to compile and link llvmdc with MinGW32 and msys on Win32 :D I tried it myself ;) Building the runtime still needs some work, but it's a step in the right direction. 2008-06-21 03:14:49 +02:00
Tomas Lindquist Olsen
964f91b5a1 [svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
Branch statements now emit a new block after it.
Fixed the _adSort runtime function had a bad signature.
Added a missing dot prefix on compiler generated string tables for string switch.
Fixed, PTRSIZE seems like it was wrong on 64bit, now it definitely gets set properly.
2008-06-16 16:01:19 +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
d03c3a7757 [svn r233] Added: -oq command line option for writing fully qualified object names.
Added: started support for x86 80bit floating point.
Changed: aggregates passed by value now use the llvm 'byval' parameter attribute, also lays ground work for
using other attributes.
Changed: eliminated a lot more std::vectorS, these showed up pretty much at the top when profiling!
Changed: performed other misc. cleanups.
Changed: halt expression now call the new llvm trap intrinsic instead of an assert(0).
Changed: dstress suite now passes -O0 by default, this only eliminates unreferenced globals, which speeds up
linking quite a bit.
2008-06-05 06:38:36 +02:00
Tomas Lindquist Olsen
6b735db510 [svn r227] Fixed: crash in lifetime.d when resizing array of AAs by .length assignment. 2008-05-27 19:53:29 +02:00