[dmd-internals] Three patches for recent regressions
Steve Schveighoffer
schveiguy at yahoo.com
Fri Sep 3 11:50:05 PDT 2010
Long ago I filed a bug that has similar issues (1653), and found it was a
duplicate of 1807. It has some similar "magic" IFTI that your funky test case
shows, can you see if your patch either fixes it or else if it is easy to
include it too?
http://d.puremagic.com/issues/show_bug.cgi?id=1807
Thanks for the patch for 4173!
-Steve
----- Original Message ----
> From: Don Clugston <dclugston at googlemail.com>
> To: Discuss the internals of DMD <dmd-internals at puremagic.com>
> Sent: Fri, September 3, 2010 2:36:00 PM
> Subject: Re: [dmd-internals] Three patches for recent regressions
>
> On 2 September 2010 09:58, Don Clugston <dclugston at googlemail.com> wrote:
> > On 31 August 2010 11:04, Don Clugston <dclugston at googlemail.com> wrote:
> >> 4751 Regression(1.062, 2.047) ICE(constfold.c) >> after error
> >> 4753 fail_compilation/fail116.d sends dmd into a loop, exhausting memory
> >> 4771 fail_compilation/fail274.d hits a halt in iasm.c
> >>
> >> I suggest we introduce a policy for compiler releases: "No regressions
> >> more recent than 2.041/1.057".
> >> We can gradually push this back until all regressions are gone.
> >
> > There are two other regressions with patches:
> >
> > 4430 Regression(2.037) erroneous matching on specialized template function
> > 3627 -of with a filename with a double extension confuses linker
> >
> > If all those are fixed, we'll be down to 7 D2-specific regressions, 5
> > D1-specific regressions, and 2 which are common to both. (There are a
> > couple of other bugs tagged as 'regression', but which have never
> > actually worked correctly).
> >
>
> And I just created my most fun patch for a long time. Fixes 3 bugs at
> once. See bug 4173.
>
> 4173 Regression(2.037) Explicitly instantiated templates still try to
> do IFTI in some cases
> 1715 Template specialization checks for equality rather than convertibility
> 1970 Templated interfaces not matched
>
> I fixed the regression by allowing arbitrary type deduction of
> templated base classes and interfaces. This lets you do crazy stuff
> like this:
>
> interface TwoWay(A,B) {}
> class C1: TwoWay!(char, float), TwoWay!(int, float) {}
> class C2: TwoWay!(float, char) {}
> class C3 : C2, TwoWay!(int, char) {}
>
> C1 twoway;
> C3 twoway2;
> B foo(A, B)(TwoWay!(A, B) x, TwoWay!(B, A) y) { return B.init;}
>
> static assert(is(typeof(foo(twoway, twoway2)) == float));
> static assert(is(typeof(foo(twoway2, twoway)) == char));
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>
More information about the dmd-internals
mailing list