Commit Graph
100 Commits
Author SHA1 Message Date
David Nadlinger d5d649b9c9 Build DMD testsuite in a debug and a release configuration. 2012-09-29 23:10:30 +02:00
David Nadlinger 407e534504 LDMD: Fix handling unknown switches from DFLAGS. 2012-09-29 22:45:42 +02:00
David Nadlinger c0980de3af Testsuite updates; run it as part of CI builds.
Only can run a quick build because of Travis time restrictions. Should
try to find a set of most-likely-to-fail command line args, maybe
"-O -gc -fPIC"?
2012-09-29 20:59:06 +02:00
David Nadlinger 3eea8de2cf D1 build fix.
Sorry for the breakage, I intended to push the previous change as a pull
request for a CI run, not the main repository.
2012-09-28 02:03:39 +02:00
David Nadlinger 5f6447e52c Fix GitHub issue #168 – alignment of globals. 2012-09-28 01:57:21 +02:00
David Nadlinger 4b3662adfd Fixed unlisted vector handling bug.
Thanks to filwit on IRC for mentioning it.
2012-09-28 00:34:31 +02:00
David Nadlinger c6abdcf4a4 Don't set TypePointer::isunsigned to true in the frontend.
The previous solution was problematic because the change was language-
visble via the isUnsigned trait. Now, pointers are simply explicitly
checked for in the relevant places. (Note that there might be cases in
the diff where a direct isunsigned() call would have been appropriate –
I only checked for instances where the type clearly cannot be a pointer,
but chose to go the safe route in replicating existing behavior
otherwise).

Fixes DMD testcase 'traits'.
2012-09-28 00:28:49 +02:00
David Nadlinger e7c72b072b Default to C-style variadics for all calling conventions.
Fixes DMD testcase 'callingconv'.
2012-09-27 23:53:04 +02:00
David Nadlinger 3f9f13594c Work around unmerged types being returned from frontend.
Fixes DMD testcase 'funclit'.
2012-09-27 23:50:52 +02:00
David Nadlinger 4a1cbc2d33 Debug log prettification: Indent toElemDtor() children. 2012-09-27 22:01:53 +02:00
David Nadlinger 9e8ec9613c Removed superfluous newline in log message. 2012-09-27 21:55:09 +02:00
David Nadlinger 25beaf41b5 Fix base class contract invocation.
Fixes DMD testcase 'testcontracts'.
2012-09-27 21:05:51 +02:00
David Nadlinger f54fa0077a Only allow a single D main() function.
Fixes DMD testcase 'fail5634'.
2012-09-27 20:22:52 +02:00
David Nadlinger 8968103b8b Some verbose logging output prettification. 2012-09-21 18:54:23 +02:00
David Nadlinger 754cf3805f Added first draft of useful README.
Needs to be expanded with a short section on contributing (and a
separate CONTRIBUTING file, for the GitHub feature), ...

LICENSE also needs an overhaul, and our files need license headers.
2012-09-18 23:41:23 +02:00
David Nadlinger 146622c5eb Merge pull request #165 from klickverbot/contract-out
Fix #162 - contracts for member functions with out parameters.
2012-09-17 05:51:38 -07:00
David Nadlinger 9e64918efd Fix #162 - contracts for member functions with out parameters.
Also documented the code and changed it to explicitly use IN_LLVM
for the LDC specific parts in order to make debugging/frontend
merging easier.
2012-09-17 01:46:48 +02:00
David Nadlinger 0e6639f6be IRC/ML notifications for Travis CI. 2012-09-16 22:19:04 +02:00
David Nadlinger 165e0ef3c6 Fix typo in D1 part of 940d6e9. 2012-09-16 22:07:30 +02:00
David Nadlinger b11c49a9c9 Fix D1 build.
This applies the changes from 9a3cdf2e to dmd/ as well.
2012-09-16 22:04:39 +02:00
David Nadlinger 6ecd2e993b Initial config for Travis CI (travis-ci.org).
Doesn't run any tests so far, only tests if everything builds.
2012-09-16 22:00:42 +02:00
David Nadlinger 98f9742db5 FuncDeclaration::semantic3 cleanup.
Cosmetical changes only.
2012-09-16 19:22:17 +02:00
David Nadlinger 1bc5dad066 druntime updates – fixes #158. 2012-09-09 23:20:18 +02:00
David Nadlinger bf0d8afc88 Merge branch 'dmd-2.060' into master.
Conflicts:
	dmd2/func.c
	dmd2/mars.c
2012-09-07 04:15:44 +02:00
David Nadlinger 2750541d0a druntime and dmd-testsuite updates. 2012-09-07 03:51:33 +02:00
David Nadlinger 81b462b129 D1 build fix. 2012-09-07 03:51:33 +02:00
David Nadlinger bebc5cce28 Workaround for Voldemort return type handling issues.
See the comment in DtoCallFunction for an explanation of what is
going on.

The struct zero initialization code was also refactored out to
AssignExp::toElem and modified so that it is only triggered
on integer->struct assignments, not for any types where the
modifier-stripped types don't match up. This would have lead to
silently wrong code in the cases where the assert would have been
triggered otherwise.

Fixes the Phobos testsuite build.
2012-09-07 03:51:33 +02:00
David Nadlinger 139e1a9c2a Implement stripModifiers using castMod(0).
Reduces the potentail for bugs in the fragile code; castMod(0) is
used like this in DMD code.
2012-09-07 03:51:33 +02:00
David Nadlinger 57b2eb3dad Fixed crash on nested functions with parameters that have a postblit.
Implementing the recursion in DeclarationExp::apply, which seems more
natural, lead to a "cannot interpret" CTFE error in Phobos.

An upstream bug will be raised about this.
2012-09-07 03:51:33 +02:00
David Nadlinger 88f08cf927 Workaround for LLVM bug 11479.
The LLVM module name doesn't really seem to impact much aynway.
2012-09-07 03:51:33 +02:00
David Nadlinger 05b9b14fa9 Fixed -debuglib in LDMD. 2012-09-07 03:51:33 +02:00
David Nadlinger 6275c66a89 Fixed segfault on invalid naked functions.
Emitting a frontend error during codegen is somewhat problematic in
any case, but stopping if an error ocurred should work just fine here.
2012-09-07 03:51:33 +02:00
David Nadlinger 45d9efb203 Call element postblit on "return array[0]".
Fixes DMD testcase 'sdtor'.
2012-09-07 03:51:33 +02:00
David Nadlinger 1cecab16cf Emit correct TypeInfo argument for _d_arrayassign.
Fixes part of DMD testcase 'sdtor'.
2012-09-07 03:51:33 +02:00
David Nadlinger 207033c427 Removed LDC-only dead code.
Helps avoid broken merges.
2012-09-07 03:51:33 +02:00
David Nadlinger d4eafe53e0 Removed obsolete nested context styles.
NChybrid was the only one that didn't instantly trigger a "not
implemented" assertion on any code using nested function for a long
time, and removing the cruft greatly improves code readability
(maintainability is a moot point anyway given its current state).
2012-09-07 03:51:33 +02:00
David Nadlinger ee4285f934 Properly handle DMD-internal "reference variables".
Previously, we just had a hack to make ref foreach statements work.
This commit enables them to work in other cases as well, like the
implicit __result variable for functions with out-contracts (which
is such a magic ref variable for ref-returning functions).

Fixes DMD testcase 'testcontracts'.
2012-09-07 03:51:33 +02:00
David Nadlinger 6b1b84a28d Pass library file arguments to linker _before_ custom switches.
This allows specifying a static D library specified at the LDC
command line to pick up symbols from druntime/Phobos.

Fixes DMD testcase 'test39'.
2012-09-07 03:51:32 +02:00
David Nadlinger 4b23e794ca Removed linkExecutable() (dead code). 2012-09-07 03:51:32 +02:00
David Nadlinger 1cb982f568 druntime updates. 2012-09-07 03:51:32 +02:00
David Nadlinger 16847dd5d5 Disregard modifiers when checking for initializer type match.
Previously, only const'ness was dropped, but DMD 2.060 started to
emit initializers with incompatible shared modifiers as well.
2012-09-07 03:51:32 +02:00
David Nadlinger 4ae14449ea Emit new TypeInfo layout.
Includes untested support for RTInfo.
2012-09-07 03:51:32 +02:00
David Nadlinger 8ebd2ce5a6 More CRLF->LF line ending conversion. 2012-09-07 03:51:32 +02:00
David Nadlinger c941640d17 Fixed '-debug' and '-version' handling in LDMD.
No idea how the old version once passed the test suite.
2012-09-07 03:51:32 +02:00
David Nadlinger 6fea7358dc Fixed several asm-related error message formats. 2012-09-07 03:51:32 +02:00
David Nadlinger 7a162b6f6d Fixed rvalue delegate property access.
Covered by DMD testcase 'test42'.
2012-09-07 03:51:32 +02:00
David Nadlinger 364cfb6714 Improved initializer ICE error message. 2012-09-07 03:51:32 +02:00
David Nadlinger 508652fd8b Initialization of vector types with single value.
Fixes DMD testcase 'testargtypes'.
2012-09-07 03:51:32 +02:00
David Nadlinger 9ac1582726 Update druntime/Phobos library version. 2012-09-07 03:51:31 +02:00
David Nadlinger 0fe41a1f30 druntime updates. 2012-09-07 03:51:31 +02:00
David Nadlinger 31e732911a Fixed templated interface member call codegen.
Fixes DMD testcase 'test7618'.
2012-09-07 03:51:31 +02:00
David Nadlinger 270979ffd6 Testsuite updates. 2012-09-07 03:51:31 +02:00
David Nadlinger d163799758 Imported D2 testsuite (v2.060) as submodule. 2012-09-07 03:51:31 +02:00
David Nadlinger 1645eff596 Created separate tests directory for D1. 2012-09-07 03:51:31 +02:00
David Nadlinger 837ef30fec Merged DMD 2.060 frontend.
Upstream Git tag v2.060 (e8fe11c20249cb9e42538be88c99b74ede4d12e3).
2012-09-07 03:51:31 +02:00
David Nadlinger e03e027002 Removed all CRLF line endings from DMD source.
Some files in our copy of the DMD 2 source had CRLF line endings.
This was not only inconsistent, but also made merging DMD patches
(where LF is used throughout) unnecessarily painful.
2012-09-07 03:51:31 +02:00
David Nadlinger 56233a373c Merge pull request #151 from jerro/master
Add pragma for emitting LLVM shufflevector instructions.
2012-08-06 12:04:59 -07:00
David Nadlinger 1c1c6894e0 Only link CURL when building Phobos as shared library. 2012-07-24 19:17:24 +02:00
David Nadlinger 61e4d9044a Fix build on Linux.
Sorry for that, seems to work on OS X, even on case-sensitive file systems.
2012-07-24 19:13:31 +02:00
David Nadlinger cb94195439 Merge pull request #144 from dansanduleac/master
Fix missing curl dependency from phobos
2012-07-21 13:05:37 -07:00
David Nadlinger f7e5245e03 Fix #138 – in precondition of methods broken in D1.
Not sure why the code was special-cased for D2 in the first place –
are there any cases where we expect a »full« context struct in the
contracts for D1. At least, they don't occur in DStress/Tango/….

As a general note, this is one of many bugs which would have not gone
unnoticed if we didn't use so many bitcasts.
2012-07-13 11:38:56 +02:00
David Nadlinger 67fd824543 Merged alexrp's initial ARM patches.
The Phobos changes have, as far as I can tell, already landed in
upstream master as well. But since 2.060 will probably take some time
to arrive, I figured it makes sense to merge them right now, so that
collaboration on ARM support can continue.
2012-07-11 23:03:26 +02:00
David Nadlinger 8a27c94ce8 Merge pull request #137 from alexrp/master
Define ARM even in Thumb mode.
2012-07-09 05:25:54 -07:00
David Nadlinger c630ab56ff Fix #136 - return static arrays as sret parameters on non-x86.
This should eventually be done on x86 and x86_64 as well, but as
discussed in GitHub issue #110/pull request #120, the ABI there needs a
closer look: at least on x86_64, we need to treat static arrays exactly
like if they were a struct containing T.length members of the same type
to be compatible with DMD (as soon as the ABI is correctly implemented
there, that is).

While for this reason I want to avoid a ABI change which could silently
break some code only to change the x86 ABI again shortly after, this
commit only touches the "default" ABI for unknown targets and thus
should be safe (as we give absoultely no ABI guarantees there anyway).
2012-07-07 23:53:46 +02:00
David Nadlinger 279f64a08d Merged druntime. 2012-07-07 21:33:00 +02:00
David Nadlinger f6d07ba0b3 Fix #135 – -o- broken with LDMD. 2012-07-06 21:55:19 +02:00
David Nadlinger cef19fb225 Fix #125 – Nested class context pointer invalid (D1).
Patch originally by Alexey Prokhin, thanks.
2012-06-24 16:18:47 +02:00
David Nadlinger 67f12fe8b5 Fixed DSource #330 – Many-at-a-time nested context crash (D1). 2012-06-24 11:30:32 +02:00
David Nadlinger 1480501f43 Just use -lib now that we have it. 2012-06-24 11:29:26 +02:00
David Nadlinger 05bf3dbaec Updated druntime (cas for classes). 2012-06-24 00:09:10 +02:00
David Nadlinger c84ce8044e Merged druntime. 2012-06-23 23:38:54 +02:00
David Nadlinger fa6af6341a Fix #121 - merged druntime fix. 2012-06-23 18:43:33 +02:00
David Nadlinger 70384cc05f Fix #125 - merged druntime fix. 2012-06-23 17:29:38 +02:00
David Nadlinger 61e61e47f0 Fix #125 - fix generation of nested context chains.
Just declaring the type of the parent is obviously not enoguh, we need to have run this very code for determining level and context type (if the parent is also nested, that is).
2012-06-23 17:05:59 +02:00
David Nadlinger 6f236518b5 Fixes #123 – Linking of pre/post-condition in interface fails when interface implemented in separate module. 2012-06-19 22:37:46 +02:00
David Nadlinger e7afd77313 Merge pull request #128 from redstar/cmake_libconfig
New CMake module to locate libconfig++
2012-06-19 12:31:05 -07:00
David Nadlinger 27349f3589 Add LLVM_LDFLAGS twice to the LDMD link command to work around build problems. 2012-06-11 00:31:55 +02:00
David Nadlinger 7652fb8015 Explicitly include <unistd.h>. 2012-06-11 00:31:54 +02:00
David Nadlinger 295798877c Avoid NULL/0 conversion warning. 2012-06-11 00:01:15 +02:00
David Nadlinger 53018c76f8 And climits.
Sorry for the noise.
2012-06-10 22:52:11 +02:00
David Nadlinger 6ddf84b61e Explicitly include cstdarg in LDMD.
Hopefully compiles everywhere now.
2012-06-10 22:20:13 +02:00
David Nadlinger 9489508046 Write LDMD executable to bin/. 2012-06-10 22:19:54 +02:00
David Nadlinger 98261321d8 Merge pull request #117 from alexrp/master
Return 0 immediately after printing -version/--version.
2012-06-10 09:56:03 -07:00
David Nadlinger fdee1fc725 Add back support for -C, for backwards compatibility. 2012-06-07 11:17:40 +02:00
David Nadlinger f131647709 Pass through unknown switches to LDC. 2012-06-07 11:17:39 +02:00
David Nadlinger b549edd60c Removed now obsolote bin/ directory. 2012-06-07 11:17:39 +02:00
David Nadlinger 6ced6dae77 Fix #45, fix #100: LDMD rewrite for more sophisticated emulation of DMD command line behavior.
It ain't pretty. I know.
2012-06-07 11:17:39 +02:00
David Nadlinger 62bfda0259 Fix #113 - promotion of small static array arguments to registers. 2012-06-06 22:55:59 +02:00
David Nadlinger ba9fb721ed Removed trailing whitespace. 2012-06-06 20:41:46 +02:00
David Nadlinger d5084d9051 Factored out x86 ABI code to separate file. 2012-06-06 20:39:38 +02:00
David Nadlinger 1c301aabcd Fix #105 - don't randomly overwrite di files with thread.di.
DI_CMD is the CMake equivalent of a global variable, so it needs to be set in any case.
2012-06-06 17:54:07 +02:00
David Nadlinger 04ea9ceefc Merge pull request #112 from svenstaro/master
Fix typos: MUTILIB to MULTILIB
2012-06-06 07:19:02 -07:00
David Nadlinger 260faae6ec Remove inreg attribute from static arrays when enregistering them. 2012-06-06 15:44:54 +02:00
David Nadlinger 6ad085a1f8 Only allow __Dmain to remain undefined in druntime to avoid hidden build errors. 2012-06-05 10:57:52 +02:00
David Nadlinger 1ead8476e5 Merge remote-tracking branch 'dansanduleac/i104_2' 2012-06-05 10:54:18 +02:00
David Nadlinger 911e00c434 Bump druntime/Phobos version to 2.059. 2012-06-05 10:27:35 +02:00
David Nadlinger 51b601f900 Merge pull request #108 from dansanduleac/i49_2
Fix #49: Static arrays should be passed using byval
2012-06-04 23:01:06 -07:00
David Nadlinger d24592b3e7 Fix #77 - LDC1 fails to compile tango.io.vfs.ZipFolder.
I think the same rewrite for contract this should be valid in D1 - if I missed something crucial, feel free to revert.
2012-06-02 19:21:36 +02:00
David Nadlinger 509a5799ff Use hand-written .di files if present along the source – fixes issue #95. 2012-06-02 16:49:47 +02:00
David Nadlinger 96b7fb6336 Always cache libconfig++ flags; tell user if pkg-config could not be found.
Previously, it was not clear to the user if pkg-config detection failed, leading to surprises if libconfig++ actually was present on the system.

The LIBCONFIG* variables are now always cached so that they can conveniently be set from ccmake/cmake-gui.
2012-06-02 15:43:14 +02:00