Commit Graph

  • 5d4fe64ac2 Get rid of old phobos-based tests. Christian Kamm 2009-05-28 22:00:08 +02:00
  • e03a897bad Make sure complex -> integral casts are not used when casting to bool. Error instead of assert on unimplemented cast. Christian Kamm 2009-05-28 21:45:14 +02:00
  • 803156b035 Allow complex -> integral casts. Christian Kamm 2009-05-28 20:26:26 +02:00
  • b06fa1f05e I ran into another issue like the one fixed by r1318, so update all of tests/mini/norun_debug* to hopefully keep crashing using the same trick. Frits van Bommel 2009-05-28 02:28:30 +02:00
  • a24a2201f1 Teach -dgc2stack to preserve the call graph. This should allow for more efficient execution by the pass manager. Frits van Bommel 2009-05-28 02:14:01 +02:00
  • 6619190ba5 * Add -functionattrs to default pass list so -dgc2stack is more effective when callees aren't inlined. This should also improve various standard LLVM optimizations. * Comment out some verbose logging. Frits van Bommel 2009-05-28 00:07:21 +02:00
  • 1ec75f0536 merging Kelly Wilson 2009-05-27 12:42:28 -06:00
  • cab7aeb843 just a simple change to cmake for mingw Kelly Wilson 2009-05-27 12:41:41 -06:00
  • 30aa3fa00b Added tag 0.9.1 for changeset a6dfd3cb5b99 Christian Kamm 2009-05-27 19:52:47 +02:00
  • 7fd43e8bf7 Error instead of assert on delegate literals as constant expressions. Make function literal linkage internal inside functions and external otherwise. Christian Kamm 2009-05-27 19:20:18 +02:00
  • e7b3f5415f Make "aa[key]" use the same runtime call as "key in aa". The runtime calls these were using were different, but with equivalent definitions. Frits van Bommel 2009-05-25 12:50:40 +02:00
  • c8665ddc88 Revert ldmd back to use bash instead of sh to unbreak it on Ubuntu. Frits van Bommel 2009-05-23 23:18:47 +02:00
  • a178d9563d Fix for mingw32 segfault Kelly Wilson 2009-05-23 14:59:04 -06:00
  • 1791d7b8b4 Fix a behavioral change accidentally introduced by the move to the LLVM commandline system: -output-(bc|ll|s) used to disable generation of an object file unless explicitly requested with -output-o. Now they do so again. Frits van Bommel 2009-05-23 20:57:22 +02:00
  • 52329f071e Fix regression dstress.nocompile.finally_07. The EnclosingTryFinally handler should not be set when emitting the landing pad's finally code. Christian Kamm 2009-05-23 09:02:36 +02:00
  • 2665fc4f3c Add test from #308 to minitests. Christian Kamm 2009-05-23 00:26:38 +02:00
  • 5b799deeb4 Fix #308 by giving finally code emitted by EnclosingTryFinally a different landing pad. Christian Kamm 2009-05-23 00:23:39 +02:00
  • adfc5b3ee9 Fix scope(exit) foreach (ref v; arr) foo(v); Frits van Bommel 2009-05-22 21:38:01 +02:00
  • 59f9b35cea Count the sret register as well when keeping track of how many integer registers are available for extern(C) functions on x86-64. Interestingly, llvm-g++ seems to have a very similar bug: http://llvm.org/pr4242 (So this breaks ABI-compatibility with llvm-gcc for this corner case, but gains it with gcc...) Frits van Bommel 2009-05-22 13:17:06 +02:00
  • 86e1457dde Automated merge with http://hg.dsource.org/projects/ldc Christian Kamm 2009-05-22 10:18:04 +02:00
  • c433604243 Fix bug #307 by doing what DMD does: add the arrayop to sc->module->importedFrom instead of sc->module. That way array ops in template instantiations will be semantic3'ed. Christian Kamm 2009-05-22 10:17:47 +02:00
  • 2739cd108c Let TargetABI::passByValue() know when a parameter is byref (either explicitly or because it's a static array) by giving it the pointer type instead of the type itself. This fixes Derelict compilation on x86-64, where the ABI wasn't expecting a static array to be passed in at all. Frits van Bommel 2009-05-22 00:19:54 +02:00
  • d537ad0d48 Allow package protected members to be accessed by the declaring module even if it isn't in a package. Christian Kamm 2009-05-21 18:08:31 +02:00
  • 2f150ddd62 Oops, didn't mean to change debug info linkage. Frits van Bommel 2009-05-21 15:26:46 +02:00
  • a520661667 Now that templates instantiations are no longer emitted for all modules that even blink at them they seem to break due to being linkonce (if compiled with any optimization level > 0), so let's give them weak linkage instead. The difference is that unreferenced linkonce symbols can be deleted, while weak symbols need to be preserved. Frits van Bommel 2009-05-21 15:23:28 +02:00
  • f675d36cfb Tentative fix for semantic3 on imported modules and unnecessary template function definition issue. Please test! Also change linkage of __interfaceInfos to external (same as __Class, __vtbl, __init). The other change might make this superfluous. Christian Kamm 2009-05-21 10:56:04 +02:00
  • 8e56fe69a4 Merged xfBuild patch for dependency tree generation. See #286. Christian Kamm 2009-05-20 21:13:41 +02:00
  • 95c35225bb Don't print the entire declaration of the alliassee when ->toChars() is called on an AliasDeclaration; just printing the name will do. This fixes #305, which otherwise tries to generate {{{ class E { void A() { alias /* recurse into E->toCBuffer() */ m; } } }}} by way of an infinite recursion (causing a segfault when the stack runs out). Frits van Bommel 2009-05-20 16:20:59 +02:00
  • ea4690128b Merge some changes from Tango's object.di into the testincludes version. Frits van Bommel 2009-05-19 22:35:08 +02:00
  • 3164ceba17 Remove some overly verbose logging. Frits van Bommel 2009-05-19 20:46:33 +02:00
  • 16a2512808 remove extra 'test' instructions and fix 'test' properly Kelly Wilson 2009-05-19 12:28:44 -06:00
  • 8941b6960c fix missing 'test' mnemonic and add several variations Kelly Wilson 2009-05-19 11:58:54 -06:00
  • 727e8f0dfb Install ldmd too. Frits van Bommel 2009-05-19 16:40:37 +02:00
  • f733680251 Try to cut down reallocations when building string literals. Tomas Lindquist Olsen 2009-05-18 16:01:22 +02:00
  • 152db286c0 Added a comment to the ldc.conf.in template about the %%ldcbinarydir%% "macro". Tomas Lindquist Olsen 2009-05-18 15:08:46 +02:00
  • 81cf30688a Patch to allow compiling LDC with MinGW, by mp4 / [1]jaffa (slightly edited). Closes #300. Frits van Bommel 2009-05-18 14:02:50 +02:00
  • 1ca2ee5d66 Allow ignored pragmas to have a body; don't ignore the body. Also, ignore errors while trying to make sense of parameters to ignored pragmas for -v. Frits van Bommel 2009-05-17 23:33:35 +02:00
  • be25445461 Added simple check for ClassInfo change introduced in DMD 1.045, it must have 12 fields. Tomas Lindquist Olsen 2009-05-17 23:15:04 +02:00
  • 827880e467 Don't try to strip metadata if we don't generate any Frits van Bommel 2009-05-17 22:40:02 +02:00
  • 0b8413b4bc Fixed class -> integer casts. Tomas Lindquist Olsen 2009-05-17 22:02:03 +02:00
  • 2690f3cfd8 Add debug info for all class fields, including those from super classes... Tomas Lindquist Olsen 2009-05-17 17:55:53 +02:00
  • e2ba08388f Added new FreeBSD and Solaris predefined version identifiers. Tomas Lindquist Olsen 2009-05-17 17:10:26 +02:00
  • b64ad3299e Use RTTIBuilder to build !ModuleInfo, still needs some work. Tomas Lindquist Olsen 2009-05-17 17:04:47 +02:00
  • 3e4ade93ba Updated comment in RTTIBuilder.h Tomas Lindquist Olsen 2009-05-17 16:31:23 +02:00
  • b1fa43ce24 Increased RTTIBuilder buffer to 14 constants, to be big enough for !ClassInfo as well as !TypeInfo Tomas Lindquist Olsen 2009-05-17 16:29:49 +02:00
  • dc4b7e8118 Update !ClassInfo generation to use !RTTIBuilder, slight update of !RTTIBuilder . Tomas Lindquist Olsen 2009-05-17 16:27:01 +02:00
  • b6daf3d545 Renamed !TypeInfoBuilder to !RTTIBuilder. Tomas Lindquist Olsen 2009-05-17 15:20:58 +02:00
  • 0414a5acbb Fixed filename in array bounds check for mixed in imported template function. Fixes ticket #295 . Tomas Lindquist Olsen 2009-05-17 14:56:29 +02:00
  • 9be5694168 Added error messages when failed to open files for .bc and .ll output, instead of just trying to write to the stream, pretty similar to the #281 problem. Tomas Lindquist Olsen 2009-05-17 14:40:09 +02:00
  • 0a77bd9fa6 Add error message when failed to open output stream for native asm output. Fixes ticket #281 . Tomas Lindquist Olsen 2009-05-17 14:20:27 +02:00
  • b52ee2de13 Use %La to hex-format a real instead of pretending it's an integer. Frits van Bommel 2009-05-17 11:06:14 +02:00
  • a75ddbf803 Specify a large integer constant more portably. Frits van Bommel 2009-05-17 10:33:21 +02:00
  • 5078019c54 Cleaned up TypeInfo_Tuple generation. Tomas Lindquist Olsen 2009-05-17 05:07:51 +02:00
  • d80de9deb3 Cleaned up TypeInfo_Struct. Fixed problem with DtoConstSize_t taking a size_t argument, this is not enough for cross compiling from 32bit host to a 64bit target. It now takes uint64_t. There's probably a lot of similar case around to code ... Tomas Lindquist Olsen 2009-05-17 04:41:10 +02:00
  • f3c7278e88 Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface. Tomas Lindquist Olsen 2009-05-17 03:10:55 +02:00
  • 371cdb71ba Remove an incorrect attribute: noalias doesn't apply to struct types, even if we prefer to think of that type as an array :(. Frits van Bommel 2009-05-17 02:22:21 +02:00
  • 76ae0b0ab6 Fix format-string bugs by adding __attribute__((__format__)) in all applicable places and fixing all warnings my gcc produced. Among other things, this should fix several segfaults (including one I just ran into). Frits van Bommel 2009-05-17 00:15:25 +02:00
  • 392a4a850e Add patch for Tango 0.99.8. Christian Kamm 2009-05-16 23:44:27 +02:00
  • e7e3632d36 Remove a macro-redefinition warning Frits van Bommel 2009-05-16 23:00:56 +02:00
  • b87acdc36f Updated DMDFE version id from 1.042 to 1.045 ... Tomas Lindquist Olsen 2009-05-16 22:27:31 +02:00
  • 6633d696c9 Forgot to set the (ClassInfo.flags & 32) bit added in 1.045. Tomas Lindquist Olsen 2009-05-16 22:24:49 +02:00
  • e8780d50e8 Merged DMD 1.045 !!! Tomas Lindquist Olsen 2009-05-16 22:21:31 +02:00
  • 9beb33770f Fixed previous aggregate initZ alignment. Added missing IrType::isDelegate method. Tomas Lindquist Olsen 2009-05-16 18:37:16 +02:00
  • 2e33a6af9f Added explicit alignment for aggregate __initZ symbols, this is needed for some union types, or the default initializer symbol might be misaligned. Tomas Lindquist Olsen 2009-05-16 18:25:01 +02:00
  • c0f2af5afd Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P Added -v-cg switch, which right now just prints "codegen: module.name (module/name.d)" to stdout, this can really help figuring out where, in some complex build command, things go wrong. Tomas Lindquist Olsen 2009-05-16 18:19:52 +02:00
  • 61514569ff Automated merge with http://hg.dsource.org/projects/ldc Christian Kamm 2009-05-16 14:22:23 +02:00
  • 8c422bde53 Don't always expand aliases to FuncDecls to FuncAliasDecls - breaks for single functions. Christian Kamm 2009-05-16 14:22:09 +02:00
  • 46b200a4ed silence a gcc warning Benjamin Kramer 2009-05-16 13:50:44 +02:00
  • c05183123d Automated merge with http://hg.dsource.org/projects/ldc Frits van Bommel 2009-05-16 13:10:35 +02:00
  • 541f3723cd Intrinsics shouldn't see struct padding, so use a special TargetABI for them that removes it. This unbreaks the llvm_*_with_overflow intrinsics. Frits van Bommel 2009-05-16 13:06:49 +02:00
  • 53c3ac0313 Fix overload resolution issue in dmd bug 313/314 fix. Christian Kamm 2009-05-16 12:17:33 +02:00
  • 62e8384da0 Set explicit alignment for normal global variables, ensures alignment is correct for globals with union type. Tomas Lindquist Olsen 2009-05-15 17:17:20 +02:00
  • 0680e6a3ca Enabled fix for ticket #294 . It will try it's best to let LLVM handle the alignment, and fall back to manual padding when that's not possible. If this causes problems again, we'll have to consistently pad manually using packed structs. Tomas Lindquist Olsen 2009-05-15 17:05:35 +02:00
  • ad142b5fda Erm... Revert the rev [1352] change, the original code was correct ... Tomas Lindquist Olsen 2009-05-15 15:30:59 +02:00
  • 41c738f4da Re-apply [1346], which was reverted in [1348], now that padding should no longer be a problem. As noted before, this will break ABI-compatibility on x86-64, so recompile old code before linking with newly-compiled code if you're on x86-64. As an added bonus, I actually tested it this time :). Frits van Bommel 2009-05-14 20:40:56 +02:00
  • 287b1278d3 Remove struct padding when passing or returning in registers on x86-64 (extern(D) only) Frits van Bommel 2009-05-14 20:36:55 +02:00
  • a0678dc9ec Oups, fix assertion condition in disabled code from rev [1351]. Tomas Lindquist Olsen 2009-05-14 17:23:55 +02:00
  • b147ecc66d Initial (but disabled) fix for ticket #294 , the actual part that fixes the bug is in a #if 0 block as I'm afraid it will cause regressions. I'm most likely not going to be around tonight, and maybe not tomorrow as well, so I'm pushing it in case someone wants to run some serious testing/investigate the problem noted in llvmhelpers.cpp : realignOffset . Tomas Lindquist Olsen 2009-05-14 17:20:17 +02:00
  • f5d635dfc7 Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 . Tomas Lindquist Olsen 2009-05-14 13:26:40 +02:00
  • 5694ec18ff Use getenv on Windows, closes #248. Christian Kamm 2009-05-13 18:08:40 +02:00
  • 72a546af4a Revert [1346] for now, it breaks because of padding :( Frits van Bommel 2009-05-12 16:53:43 +02:00
  • 35d62be334 Remove some other code that tested for LLVM before r67588. Frits van Bommel 2009-05-12 16:02:51 +02:00
  • ec476cc5f1 Remove an old workaround that was kept around for ABI-compatibility on x86-64 between different LLVM versions. This means LLVM r67588 is required if you want to compile for x86-64, otherwise the backend will assert when you try to return e.g. struct { int i; char c; } from a function. (In particular, this is no longer compatible with LLVM 2.5) It also means that any code returning small structs on x86-64 will probably need to be recompiled in order to be linkable to code compiled with this change. Frits van Bommel 2009-05-12 15:50:48 +02:00
  • 77cb1c6b8e Added error instead of assertion failure when trying to get !TypeInfo for a forward declared struct. Tomas Lindquist Olsen 2009-05-11 20:54:25 +02:00
  • e4e07baf87 Re-enable consistency check for fixed LLVM versions. Frits van Bommel 2009-05-11 15:48:33 +02:00
  • 49a2924823 Update for metadata changes in LLVM trunk. Frits van Bommel 2009-05-11 11:59:22 +02:00
  • 041a8c4bd3 Fix DtoArrayCopyToSlice by passing length*sizeof(element) instead of just length to _d_array_slice_copy. Christian Kamm 2009-05-10 22:26:04 +02:00
  • 57fc3463f6 Run backend without optimizations when no optimization parameters were used, even when not generating debug info. Frits van Bommel 2009-05-10 20:22:08 +02:00
  • dfaba71dce Fix the ldcbinarypath config file rewriting. Christian Kamm 2009-05-10 18:14:36 +02:00
  • d7c984fbef Explicitly include string.h for strdup. Christian Kamm 2009-05-10 18:03:32 +02:00
  • 226e85bf30 Automated merge with http://hg.dsource.org/projects/ldc Christian Kamm 2009-05-10 17:58:35 +02:00
  • ba95eab71f In config file: replace %%ldcbinarypath%% with the path to the ldc executable. Christian Kamm 2009-05-10 17:58:09 +02:00
  • 3fb2cb0322 Okay... Fix the assertion as well, since 20 really is enough yet it wanted MORE... Despite the message. Tomas Lindquist Olsen 2009-05-10 17:31:56 +02:00
  • 0ab77de246 Increased a buffer size in TypeInfo_StaticArray from 10 to 20 to avoid assertion failures! Thanks LeoD. Tomas Lindquist Olsen 2009-05-10 17:25:47 +02:00
  • 4f59c0cb7b Removed fix from rev [1331] since rev [1333] adds a more general fix that catches more cases! Tomas Lindquist Olsen 2009-05-10 15:50:51 +02:00
  • 813c650517 Backport D2 CTFE cast behavior to allow cast(char[])char[n] to succeed. Christian Kamm 2009-05-10 15:42:23 +02:00
  • ea00a120e9 Added testcase for #288 . Tomas Lindquist Olsen 2009-05-10 14:37:30 +02:00
  • c6dca3fb76 Fixed CTFE evaluation on .dup . Fixes ticket #288 . Tomas Lindquist Olsen 2009-05-10 14:32:23 +02:00
  • dbe4852b7b Fixed D-style vararg arguments with types that have sizes bigger that pointers, yet are not aligned to pointer sizes. Fixes ticket #276 . Tomas Lindquist Olsen 2009-05-10 04:37:03 +02:00
  • d1f582583b Turn new _d_array_slice_copy runtime call into memcpy when the slice lengths are equal and alias analysis says it's safe. Frits van Bommel 2009-05-10 04:18:14 +02:00