Commit Graph

61 Commits

Author SHA1 Message Date
Robert Clipsham
70b2156010 Fixed a segfault in ldc2 when compiling synchronized{} blocks. 2009-09-19 13:05:10 +01:00
Robert Clipsham
e44a9aa260 Removed a chunk of code in favour of a shorter and more portable method 2009-09-08 11:21:30 +01:00
Robert Clipsham
089e792258 DMD 2.032 Merge. 2009-09-08 10:07:56 +01:00
Benjamin Kramer
0ee2f34611 Don't use llvm::getGlobalContext() anymore 2009-07-13 20:16:15 +02:00
Robert Clipsham
b73e45940a Merged dmdfe 2.031. 2009-07-07 02:26:11 +01:00
Robert Clipsham
1812c5b00a Fixed some unmerged parts of the D2 frontend.
Removed the automatic linker flags for D2 (temp).
Renamed a runtime function for D2.
2009-07-06 23:54:02 +01:00
Frits van Bommel
8044a67720 Apply changes from r1482 to D2 frontend too. Completely untested, but ldc2
compiles again.
2009-06-08 13:45:26 +02:00
Tomas Lindquist Olsen
e31957dcd8 Change the frontend generated assert(this) or assert(&this) in D2 to set the ThisExp::var field. 2009-06-03 13:11:01 +02:00
Tomas Lindquist Olsen
b218bfc828 Added missing initializer of (LDC introduced) Expression::cachedLvalue in D2 frontend. 2009-06-03 03:49:24 +02:00
Tomas Lindquist Olsen
f6997cb604 D2:
Applied function type from D1 frontend that got removed in D2, it's critical for member function type to be correct.

Fixed a bunch of type discrepancies in druntime object.di vs. genobj.d .

Disabled (#if 0) some potentally very large type dumps for -vv .

Updated classinfo and typeinfo generation for D2, almost complete now.

Added finer grained checks for vtbl type mismatching, aids debugging.
2009-06-03 02:28:48 +02:00
Frits van Bommel
2cd4d15be1 Merge a fix from the D1 frontend to the D2 frontend. 2009-06-02 20:28:53 +02:00
Frits van Bommel
0c6a40485d Fix a segfault in ldc2 (use of an uninitialized variable). 2009-06-02 19:54:02 +02:00
Frits van Bommel
59f5636391 * Fix some gcc warnings in the D2 frontend code.
* Remove binaries from `dmd2/`
2009-06-02 19:18:48 +02:00
Robert Clipsham
24f426c1bc Removed unused files to allow for a pull. 2009-06-01 19:02:09 +01:00
Robert Clipsham
91ddf6140a More tweaks. 2009-06-01 18:58:21 +01:00
Robert Clipsham
c5be82c5ae LDC 2 compiles again. 2009-05-30 17:23:32 +01:00
Kelly Wilson
a178d9563d Fix for mingw32 segfault 2009-05-23 14:59:04 -06:00
Christian Kamm
8d01068c9b Apply small includes patch for FreeBSD. Thanks kimelto! 2009-04-02 19:16:44 +02:00
Frits van Bommel
e129494812 Allow specific optimization passes to be requested from the command line.
Now you can run "`ldc test.d -c -mem2reg -simplifycfg`" if you feel the urge.
The -O<N> options are still supported, and are inserted in the passes list in
the position where they appear on the command line.
(so -simplifycfg -O1 -instcombine does the "right thing")

One small change: -inline is renamed to -enable-inlining due to a naming
conflict with the option to add the -inline pass. -inline now inserts the
inlining pass in the position specified, not in the middle of -O<N>.
(ldmd has been updated to translate -inline to -enable-inlining)
2009-03-29 15:46:55 +02:00
Frits van Bommel
d6bb243ff5 Apply [1120] to D2 as well (untested). 2009-03-15 16:57:44 +01:00
Frits van Bommel
ad46ec8bd0 Split out LLVM_REV into separate header, to reduce rebuilding when only the LDC
revision has changed.
2009-03-13 16:18:43 +01:00
Frits van Bommel
622a93a810 Make LDC work with LLVM trunk (s/LinkOnceLinkage/LinkOnceOdrLinkage/)
Also moved the #defines for linkage types into a separate header instead of
mars.h so we can #include revisions.h without having to rebuild the entire
frontend every time we update.
(I'm using revisions.h to get the LLVM revision for use in preprocessor
conditionals. It should work with LLVM release 2.5, old trunk and new trunk)
2009-03-08 16:13:10 +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
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