Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
December 05, 2009 dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Probably the biggest thing is opDispatch! http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.053.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.037.zip Many thanks to the numerous people who contributed to this update. |
December 05, 2009 Re: dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Fri, Dec 04, 2009 at 08:05:13PM -0800, Walter Bright wrote: > Probably the biggest thing is opDispatch! Nay, the bug fixes! It looks like you guys solved an elusive codegen problem in this release that's been bugging me since about 2007. Not a showstopper - rearranging some statements made it go away (also why I never filed a bug report; I couldn't reproduce it reliably in any test case smaller than my 5000 line app!), but an annoyance nonetheless. I think it might have been Bugzilla 3521. Whatever, I've been unable to reproduce it again at all over the last hour and a half. I think it's dead! Yay! And WOW dmd 1 is fast. dmd 2 is fast too, but oh man, I've forgotten how blazing dmd1 really is. Anyway, thanks! So exciting. > > Many thanks to the numerous people who contributed to this update. -- Adam D. Ruppe http://arsdnet.net |
December 05, 2009 Re: dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | Adam D. Ruppe wrote:
> I think it might have been Bugzilla 3521.
Yeah, that was a pretty evil bug. It has been lurking there for probably 18+ years now. It's evil because only a very, very rare set of circumstances will trip it, and even then it may not be executed or noticed.
I instrumented the C++ compiler for it, and ran it through its test suite. Turns out, it did trip it, but only on a piece of code that was tested for compile only. Sigh.
I was glad to get it fixed.
|
December 05, 2009 Re: dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Fri, 04 Dec 2009 20:05:13 -0800, Walter Bright <newshound1@digitalmars.com> wrote:
>Probably the biggest thing is opDispatch!
>
>http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.053.zip
>
>
>http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.037.zip
>
>Many thanks to the numerous people who contributed to this update.
This code:
int[3] a = [1, 2, 3];
allocates the literal on heap and then copies it to 'a'. A call to a library function has to be made to avoid the allocation.
Can we have such allocations optimized out?
|
December 05, 2009 Re: dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Probably the biggest thing is opDispatch!
>
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.053.zip
>
>
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.037.zip
>
> Many thanks to the numerous people who contributed to this update.
Why is opPow just override-able in classes and not in structs ? Is that intended behaviour ?
|
December 05, 2009 Re: dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Extrawurst | Extrawurst wrote:
> Walter Bright wrote:
>> Probably the biggest thing is opDispatch!
>>
>> http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.053.zip
>>
>>
>> http://www.digitalmars.com/d/2.0/changelog.html
>> http://ftp.digitalmars.com/dmd.2.037.zip
>>
>> Many thanks to the numerous people who contributed to this update.
>
> Why is opPow just override-able in classes and not in structs ? Is that intended behaviour ?
ok my bad it does work for structs, it just complains if i implement the operator using the "override" keyword:
Inside of a class it say:
"Error: function main.Foo.opPow does not override any function"
and inside of a struct is says:
"Error: function main.Foo.opPow override only applies to class member functions"
Weird !
|
December 05, 2009 Re: dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Extrawurst | Extrawurst wrote:
> Walter Bright wrote:
>> Probably the biggest thing is opDispatch!
>>
>> http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.053.zip
>>
>>
>> http://www.digitalmars.com/d/2.0/changelog.html
>> http://ftp.digitalmars.com/dmd.2.037.zip
>>
>> Many thanks to the numerous people who contributed to this update.
>
> Why is opPow just override-able in classes and not in structs ? Is that intended behaviour ?
Do you have a test case? The cases I tested all worked.
|
December 05, 2009 Re: dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Extrawurst | Extrawurst wrote:
> Extrawurst wrote:
>> Walter Bright wrote:
>>> Probably the biggest thing is opDispatch!
>>>
>>> http://www.digitalmars.com/d/1.0/changelog.html
>>> http://ftp.digitalmars.com/dmd.1.053.zip
>>>
>>>
>>> http://www.digitalmars.com/d/2.0/changelog.html
>>> http://ftp.digitalmars.com/dmd.2.037.zip
>>>
>>> Many thanks to the numerous people who contributed to this update.
>>
>> Why is opPow just override-able in classes and not in structs ? Is that intended behaviour ?
>
> ok my bad it does work for structs, it just complains if i implement the operator using the "override" keyword:
> Inside of a class it say:
> "Error: function main.Foo.opPow does not override any function"
>
> and inside of a struct is says:
> "Error: function main.Foo.opPow override only applies to class member functions"
>
> Weird !
Ignore me, i should take a nap ;) it is all good!
|
December 05, 2009 Re: dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Extrawurst | Extrawurst wrote:
> Extrawurst wrote:
>> Walter Bright wrote:
>>> Probably the biggest thing is opDispatch!
>>>
>>> http://www.digitalmars.com/d/1.0/changelog.html
>>> http://ftp.digitalmars.com/dmd.1.053.zip
>>>
>>>
>>> http://www.digitalmars.com/d/2.0/changelog.html
>>> http://ftp.digitalmars.com/dmd.2.037.zip
>>>
>>> Many thanks to the numerous people who contributed to this update.
>>
>> Why is opPow just override-able in classes and not in structs ? Is that intended behaviour ?
>
> ok my bad it does work for structs, it just complains if i implement the operator using the "override" keyword:
> Inside of a class it say:
> "Error: function main.Foo.opPow does not override any function"
>
> and inside of a struct is says:
> "Error: function main.Foo.opPow override only applies to class member functions"
>
> Weird !
overriding is not the same as overloading.
|
December 05, 2009 Re: dmd 1.053 and 2.037 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > Probably the biggest thing is opDispatch! > > http://www.digitalmars.com/d/1.0/changelog.html > http://ftp.digitalmars.com/dmd.1.053.zip > > > http://www.digitalmars.com/d/2.0/changelog.html > http://ftp.digitalmars.com/dmd.2.037.zip > > Many thanks to the numerous people who contributed to this update. I love opDispatch ;) [CODE] struct Foo { public void opDispatch(string s) (int _v) { writefln("Foo.'%s' (%s)",s,_v); return; } } void main() { Foo f; f.fuckya(2); f.thisisaterriblelongmethodnamethatisnotevenimplementedexplicitlyinsideofmyclassFoo(2); } [/CODE] I cannot wait to use it in my lua bindings, this is a great feature. |
Copyright © 1999-2021 by the D Language Foundation