Commit graph

39 commits

Author SHA1 Message Date
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
8cad8d6c7a Merged ABI changes into D2 frontend. 2009-03-03 14:10:37 +01:00
Tomas Lindquist Olsen
1ba0dc70f1 Same fix for align size of void type on D2. 2009-03-01 01:34:20 +01:00
Christian Kamm
b7febcf35a Error gracefully for +=, -=, *=, /= if rhs is complex but lhs isn't. 2009-02-28 19:58:30 +01:00
Frits van Bommel
031474c724 Apply previous changes to dmd2/mtype.c as well. 2009-02-28 17:44:53 +01:00
Frits van Bommel
2beff65988 Fix struct field alignment on x86-64 (for align > 8, like real.alignof) 2009-02-27 12:35:31 +01:00
Tomas Lindquist Olsen
57a69e8177 - Fixed LLVM style CL args for D2.
- Moved main() into its own file gen/main.cpp
- Fixed basic cross compilation
- removed the option for setting OS
- added support for llc's mattr, mcpu and mtriple switches
- added basic ABI abstraction for return value rewrites, it's not perfect and will probably be completely rewritten once I get to handling parameter rewrites as well.
- x86-64 extern(C) abi for cfloat returns now match (llvm-)gcc.
2009-02-26 14:11:49 +01:00
Tomas Lindquist Olsen
3e17a21e0b Merged a bunch recent dmd v1 frontend changes into the dmd v2 tree. 2009-02-13 22:20:30 +01:00
Tomas Lindquist Olsen
fc480b7fd8 SWITCHED TO LLVM 2.5 !
Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel.

Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple.

Fixed return calling convention for complex numbers, ST and ST(1) were switched around.

Added some testcases.

I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
2009-02-08 05:26:54 +01:00
Tomas Lindquist Olsen
1e8eae2e5d Fixed warning on osx as per request from mwarning. 2009-02-04 16:02:05 +01:00
Christian Kamm
aa2cd42536 Apply naked changes of [920] to dmd2/ 2009-02-03 18:11:39 +01:00
Christian Kamm
8726eefefa Apply StaticStructInit changes from [913] to dmd2/ 2009-02-03 18:00:17 +01:00
Tomas Lindquist Olsen
75591b3c16 Changed templates and typeinfo to use linkonce linkage instead of weak linkage, this should fix inlining problems, fixing bug #197 . If problems show up, it's easy to change it back by changing the define in mars.h . I'm 95% sure this is safe, given how we handle templates. 2009-02-02 01:44:51 +01:00
Tomas Lindquist Olsen
9b85a345e9 Removed use of TARGET_LINUX and replaced with POSIX, fixes bug [172] 2009-02-02 00:58:36 +01:00
Christian Kamm
d3f44831dc Fix typo in [909]. 2009-01-29 17:59:25 +01:00
Christian Kamm
f2ce0df11c Port some LDC1 portability fixes to LDC2. Fixes #196. 2009-01-29 17:19:48 +01:00
Christian Kamm
2814c2ab44 Also apply custom allocator size_t change to DMD2 frontend. 2009-01-18 13:18:31 +01:00
Tomas Lindquist Olsen
f090cea4cb same fix appled to dmd2 frontend 2009-01-10 14:37:48 +01:00
Christian Kamm
9d01659718 Add missing overrides for toConstExp to dmd2/expression.h. Fixes #156. 2008-12-20 09:15:31 +01:00
Christian Kamm
dff06d0f15 Add Elrood's patch to output LDC and LLVM source revs. 2008-12-14 16:51:36 +01:00
Christian Kamm
6600ef0a86 Automated merge with http://hg.dsource.org/projects/ldc 2008-12-14 16:30:20 +01:00
Christian Kamm
dabe5d3efd Remove unportable env-sanitizing code. If it is really needed, it needs to be
rethought. Closes #131.
2008-12-14 16:30:06 +01:00
Tomas Lindquist Olsen
9f2497ef77 Runtime now compiles with D2 again. This does NOT mean it works flawlessly !!! 2008-12-14 04:11:32 +01:00
Tomas Lindquist Olsen
b7bea99dbb Merged DMD 2.021 frontend.
Removed generated files from dmd/dmd2 dirs.
2008-12-13 16:14:37 +01:00
Tomas Lindquist Olsen
c14996f39e Removed insufficient fix for DMD bug 1161, it was causing problems with instantiating imported templates, and passing private variables as aliases. I failed to come up with a proper fix! 2008-12-10 13:56:10 +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
e5d688834d Fixed printf formatting flag problem on mingw (missed one) 2008-12-01 19:51:45 +01:00
Tomas Lindquist Olsen
2788a2a0f1 Made ClassInfo.interfaces generation consistent with DMD, fixes #134
Removed unneeded includes from dmd/attrib.c
2008-12-01 18:34:02 +01:00
Tomas Lindquist Olsen
cd8f12ed35 Forgot to add AnonDeclaration::toObjFile for D2 2008-12-01 14:54:06 +01:00
Tomas Lindquist Olsen
e0972b0793 Fixed ModuleInfo generation to no longer use the ModuleInfo class' default initializer for types/defaults, it's unsafe as initializers don't necesarily match the "formal" type. There might be explicit padding.
Changed -g switch to emit DW_LANG_D debug info, make demangling work with a patched GDB, still more work to do for full support of D's Dwarf extensions.
Added getNullValue helper method.
2008-12-01 02:10:16 +01:00
Tomas Lindquist Olsen
577237e073 Changed some hardcoded offset/alignment for classes in DMD, broke offsets for 64bits.
Changed ClassInfo generation to no longer access the default initializer of ClassInfo, fixes problems with index mismatch.
2008-11-30 20:22:09 +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
910280a3e8 Use LLVM package string for llvm version info in D2 frontend too. 2008-11-26 19:44:06 +01:00
Christian Kamm
b905f290ba Add missing CMakeList, apply conf changes to dmd2 frontend. 2008-11-24 20:02:59 +01:00
Tomas Lindquist Olsen
41d9e79780 Fixed 64bit problem with aaValues runtime calls (assumed 32bits) 2008-11-16 20:42:45 +01:00
Tomas Lindquist Olsen
5d9854aaff Fixed 32bit assumption in statement.c when calling aaApply(2). 2008-11-12 07:41:56 +01:00
Tomas Lindquist Olsen
582deb9827 D2 changes!
Removed druntime from the repository again.. Sorry :/
Updated the druntime port a bit, now requires druntime from trunk.
Added info in runtime/README on how to get druntime from trunk.
Added patch to add LDC support to druntime.
Removed some debug logging from D2 builds.
Fixed broken typeinfo for const/invariant in D2.
2008-11-12 07:22:05 +01:00
Tomas Lindquist Olsen
c36bd9f4b0 Applied fvbommel's patch from #112
Added missing TypeInfoInvariant codegen for D2
2008-11-12 02:30:28 +01:00
Tomas Lindquist Olsen
c4c1c1d72e Added initial D2 support, D2 frontend and changes to codegen to make things compile. 2008-11-11 01:38:48 +01:00