Commit Graph
2004 Commits
Author SHA1 Message Date
Alexey Prokhin a0e4737c2e Treat warnings as errors like dmd does 2011-09-13 21:01:39 +04:00
Alexey Prokhin 93eeccaf81 ldmd2: always pass --singleobj option 2011-09-13 21:01:38 +04:00
Alexey Prokhin 9a9999854f Named Return Value Optimization 2011-09-13 21:01:38 +04:00
Alexey Prokhin 0e754b5acd Merge dmd v2.055 2011-09-13 21:01:32 +04:00
Alexey Prokhin 8f4a15c868 Fix ldc1 regressions 2011-09-10 13:24:29 +04:00
Alexey Prokhin f3c901af9d Use _d_arraycatT to append an element to an array instead of reallocating the array 2011-09-10 13:23:47 +04:00
Alexey Prokhin 0caba6672d Call postblit on a struct when appending it to an array. Use _d_arraycatnT to concatenate multiple arrays.
Before, _d_arraycatT was used to concatenate multiple arrays. That caused an issue when postblit
was called on a struct multiple times. The next code asserted due to the issue:

void main()
{
    static struct S
    {
        int x;
        int pad;
        this(this)
        {
            ++x;
        }
    }

    auto sarr = new S[1];
    auto sarr2 = sarr ~ sarr ~ sarr;
    assert(sarr2[0].x == 1);
    assert(sarr2[1].x == 1);
    assert(sarr2[2].x == 1);
    assert(sarr[0].x == 0);
}
2011-09-10 13:22:05 +04:00
David Nadlinger 9864129fb8 Merge branch 'master' into merge-2.054
Conflicts:
	gen/statements.cpp (returning void from main() was fixed on both branches)
2011-08-17 16:09:28 +02:00
David Nadlinger 3f448afa37 Another nested context crash fix.
The test case that would previously crash:

a.d
---
module a;

@property bool empty(T)(in T[] a) {
  return !a.length;
}

void find(alias pred,R1)(R1 haystack) {
  simpleMindedFind!pred(haystack);
}

void simpleMindedFind(alias pred, R1)(R1 haystack) {
  bool haystackTooShort() {
    return haystack.empty;
  }
}
---

b.d
---
module b;

import c;

void getTimeZone() {
  indexOf();
}
---

c.d
---
module c;

import a;

void indexOf()() {
  find!({})("");
}
---
2011-08-17 02:33:33 +02:00
David Nadlinger 11f19eec5a D1: Don't crash when returning a void expression from void main(). 2011-08-12 20:14:55 +02:00
David Nadlinger 5fdbce2de4 Merge pull request #3 from bioinfornatics/master
Bash autocompletion improvements.
2011-08-12 02:40:57 -07:00
Jonathan MERCIER ad2eaa9ea1 enhance autocompletion 2011-08-12 11:30:05 +02:00
David Nadlinger 777c1e3530 Merge pull request #2 from bioinfornatics/master
add autocompletion for ldc2 with bash-completion
2011-08-09 15:53:39 -07:00
Jonathan MERCIER 775736bfb0 add bash script for autocompletion 2011-08-10 00:46:14 +02:00
David Nadlinger e63044ecc8 Merge pull request #1 from klickverbot/remove-phobos1
Removed Phobos 1 from LDC tree.
2011-08-08 12:07:30 -07:00
David Nadlinger 3c95ddd3b5 Removed Phobos 1 from LDC tree.
If anyone wanted to ever resurrect LDC1/Phobos (lphobos/README.txt had an »unmaintained« notice for more than three years now), this should be done in an external repository.
2011-08-08 21:00:42 +02:00
David Nadlinger 1cfc243c34 Removed druntime.patch and phobos.patch – we are maintaining our own GitHub forks. 2011-08-08 19:24:58 +02:00
David Nadlinger 21a05aa971 Merge branch 'default' into 'merge'. 2011-07-29 00:37:30 +02:00
David Nadlinger 618051022f Fixed crash in DtoCreateNestedContextType().
In some cases, like the following, DtoDeclareFunction() hasn't already been called when DtoCreateNestedContextType() is invoked. This seems to have been anticipated when the function was originally written, but DtoDeclareFunction() was previously called after the ir func was already accessed in fd->ir.irFunc->nestedContextCreated.

---
void main() {
  mixin({
    string foo() {
      return "";
    }

    string bar()() {
      return foo();
    }

    return bar();
  }());
}
---
2011-07-28 23:17:20 +02:00
David Nadlinger e397b29722 Fixed #448 for D2 and restored opOpAssign expression cache for D1.
When clearing the lvalue cache, the added-then-backed-out-then-added-back-for-D2-only code by Alexey permanently removed all casts from e1 (e1 is a member variable!), instead of only skipping them for the cachedLvalue assignment.
2011-07-28 23:10:22 +02:00
David Nadlinger 15c5316e26 Prevent two function with same mangled name but different types from being declared.
Previously, LDC would crash in the backend due to the fact that the IR is typed in such cases (we recently had such an instance with Tango, where an extern( C ) function was declared once with int and once with size_t).
2011-07-27 23:01:22 +02:00
Alexey Prokhin 71a0a968ef Fixed #6 2011-07-26 09:48:10 +04:00
Alexey Prokhin a41b822420 Fixed ldc1 compilation 2011-07-26 09:30:36 +04:00
Alexey Prokhin 46c241009d Fixed a segfault when compiling fail_compilation/fail105.d 2011-07-23 14:06:59 +04:00
Alexey Prokhin 457f4dffbe ICE involving pointers 2011-07-23 13:19:51 +04:00
Alexey Prokhin 213524bc61 CTFE: fixed calling of invariant from a constructor 2011-07-22 22:22:06 +04:00
Alexey Prokhin ed84a21462 Fixed try/finally statements inside another finally 2011-07-22 19:44:16 +04:00
Alexey Prokhin ac2e7b033b Fixed compilation of lifetime.d 2011-07-22 12:51:23 +04:00
Alexey Prokhin 79edefdc37 Fixed compilation of functions that does not have return statement but contain inline asm 2011-07-19 22:22:49 +04:00
Alexey Prokhin 06baaacdc0 Fixed an undefined reference if a postblit is annotated with @disabled 2011-07-19 20:20:00 +04:00
Alexey Prokhin 6576b68dfd Added empty ImportStatement::toIR(). That fixes import from a function 2011-07-19 20:02:39 +04:00
Alexey Prokhin 4cc10019ee Fixed an assertion in DtoType() 2011-07-19 19:58:38 +04:00
Alexey Prokhin edd1ed5b09 DMD issue 693 & 5946 - Allow using 'this' for alias template parameter 2011-07-19 19:43:05 +04:00
Alexey Prokhin f97fd92433 Fixed compilation of test32() from runnable/template1 2011-07-19 19:42:41 +04:00
Alexey Prokhin ce799e9974 Fixed postblit call 2011-07-19 19:20:43 +04:00
Alexey Prokhin 2cc34c4005 Call desctructors on temporary variables 2011-07-19 19:20:42 +04:00
Alexey Prokhin 3c7490e446 Removed compiler warning 2011-07-19 19:20:40 +04:00
Alexey Prokhin 2220dd0559 'even' opcode on x86_64 2011-07-19 19:20:40 +04:00
Alexey Prokhin c470a715a0 DMD issue 1570 - Wrong return for address operator 2011-07-19 19:20:39 +04:00
Alexey Prokhin 7a31b599cc Updated to dmdfe 2.054 2011-07-19 19:20:38 +04:00
Alexey Prokhin 99f5a73125 Allow nonconstants in associative array initializers 2011-07-19 10:14:15 +04:00
Alexey Prokhin bb2676dbe3 Fix unresolved symbol in the runnable/mixin2 test 2011-07-19 10:14:14 +04:00
Alexey Prokhin 596aad3738 DMD issue 3086 - TypeInfo opEquals returns incorrect results 2011-07-19 10:14:13 +04:00
Alexey Prokhin aef7e0ee36 Fix array append with dollar op 2011-07-19 10:14:12 +04:00
Alexey Prokhin 4210f4285a Fixed a few interpret regressions 2011-07-19 10:14:11 +04:00
Alexey Prokhin 462cdda4ae Merge dmdfe 2.053beta 2011-07-19 10:14:04 +04:00
Alexey Prokhin 928fa9c4de Created branch 'merge' 2011-07-26 09:07:04 +04:00
Moritz Warning b122315f2f set used LLVM version to 2.9 2011-06-15 19:16:50 +02:00
Alexey Prokhin f3bf9fd277 Improve _d_arrayappendT call 2011-05-11 21:13:43 +04:00
Kelly Wilson 5d0f918e9e Fix cmpxchg16b instruction for asm blocks. Thanks to wolfwood from the Xomb project for this fix. 2011-05-05 20:56:46 -06:00