December 05, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Some things of note:
>
> 1) This includes a new code coverage analyzer for dmd (I think gcov should
> work for gdc users). I've been wanting to add this for 20 years, I finally
> realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
> I shoulda done it a long time ago. I can't believe some third party tools to
> do this cost $800+.
>
> 2) The submissions for bug reports on complex numbers has risen a lot
> lately, and I never get them for the C compiler. This means that nobody uses
> complex numbers in C, but they do in D. Interesting!
>
> 3) This incorporates a new 'header' generator capability, written by Dave
> Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
> the source for it is included). I hope to get it working by the next update.
>
> http://www.digitalmars.com/d/changelog.html
>
>
>
Wow!! Code Coverage looks awesome! specially that I'm new to the concept!!
Good job!
|
December 05, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | BCS wrote:
> I think this is related to a bug that still exists from .140.
>
> (http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/5671)
>
> The essence of the problem is that DMD can't tell the argument list of a
> function from just the name.
>
> example:
>
> int fn(int);
> int fn(char);
> void fn(void);
>
> // what type is fn?
>
> auto fnp = &fn;
>
> // what type is fnp and what does it point to
>
>
Interesting. I was actually experimenting a little more:
int testfunc( char[] s, int i, int j, int k ) {}
void main()
{
writelfn( typeid(typeof(&testfunc)) );
writelfn( (&testfunc).mangleof );
}
OUTPUTS:
int()*
PFAaiiZi
So as we see above, the typeid of the function pointer cannot be extracted similar to what you describe. Only that it returns an int and that it is a function pointer is represented.
-JJR
|
December 05, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | John Reimer wrote:
>> #define REGISTER_AS_REMOTE_PROCEDURE_CALL(Object, functionName) (Object)->Register((#functionName),(functionName))
>
> If I can't get the symbol name converted to a string at compile time... all is lost and D is still limited.
>
I just want to say that all is NOT lost... that sounded very melodramatic. I can get around this simply enough with with more typing... it would be just kind of nice to be able to do everything with D. ;-)
-JJR
|
December 05, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <dn0i6d$2pgk$1@digitaldaemon.com>, Walter Bright says... > >Some things of note: > >1) This includes a new code coverage analyzer for dmd (I think gcov should work for gdc users). I've been wanting to add this for 20 years, I finally realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak. I shoulda done it a long time ago. I can't believe some third party tools to do this cost $800+. > >2) The submissions for bug reports on complex numbers has risen a lot lately, and I never get them for the C compiler. This means that nobody uses complex numbers in C, but they do in D. Interesting! > >3) This incorporates a new 'header' generator capability, written by Dave Fladebo. I goofed it up merging it in, so it is disabled at the moment (just the source for it is included). I hope to get it working by the next update. > >http://www.digitalmars.com/d/changelog.html In article <dn0i6d$2pgk$1@digitaldaemon.com>, Walter Bright says... > >Some things of note: > >1) This includes a new code coverage analyzer for dmd (I think gcov should work for gdc users). I've been wanting to add this for 20 years, I finally realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak. I shoulda done it a long time ago. I can't believe some third party tools to do this cost $800+. > >2) The submissions for bug reports on complex numbers has risen a lot lately, and I never get them for the C compiler. This means that nobody uses complex numbers in C, but they do in D. Interesting! > >3) This incorporates a new 'header' generator capability, written by Dave Fladebo. I goofed it up merging it in, so it is disabled at the moment (just the source for it is included). I hope to get it working by the next update. > >http://www.digitalmars.com/d/changelog.html Walter, I just tested the new features out and they look great! One critique about .mangleof() if I may: > static char[] mangleof(char[] namespace); This way, one can get mangleof to emit a fully-qualified symbol: > writefln("_D",typeof(char[]).mangleof("my.string.ident")); Which would emit: > _Dmy6string5identAa I think this adjustment might prove very useful. - EricAnderton at yahoo |
December 06, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | In article <dn2e4h$2c4h$1@digitaldaemon.com>, John Reimer says... > >BCS wrote: >> I think this is related to a bug that still exists from .140. >> >> (http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/5671) >> >> The essence of the problem is that DMD can't tell the argument list of a function from just the name. >> .. >> >> > >Interesting. I was actually experimenting a little more: > >int testfunc( char[] s, int i, int j, int k ) {} > >void main() >{ > writelfn( typeid(typeof(&testfunc)) ); > writelfn( (&testfunc).mangleof ); >} > >OUTPUTS: > >int()* >PFAaiiZi > > >So as we see above, the typeid of the function pointer cannot be extracted similar to what you describe. Only that it returns an int and that it is a function pointer is represented. > >-JJR It gets worse :-o try overloding test with different return types, then it gest nothing right! import std.stdio; // switch these and the type changes char test(char v){} int test(int i){} void main() { writef( typeid(typeof(&test)) , \n); writef( (&test).mangleof , \n); } |
December 06, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to James Dunne | "James Dunne" <james.jdunne@gmail.com> wrote in message news:dn24a7$1utp$1@digitaldaemon.com... > On WinXP SP2, DMD 0.141 says > > Error: unrecognized switch '-Hdheaders' > > and > > Error: unrecognized switch '-Hfheaders' > > NOTE: these are listed as options on the help screen output from DMD.exe invoked without any arguments. That's because it's disabled at the moment. > Also, the -cov switch is missing from > that screen. I'll fix that. > I have no idea what code coverage is, See www.digitalmars.com/d/code_coverage.html > but the header file generation > code is pretty freakin' cool (if I can get it to work?)! Way to go Walter. Dave Fladebo is the author of that <g>. |
December 06, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <dn0i6d$2pgk$1@digitaldaemon.com>, Walter Bright says... > >Some things of note: > >1) This includes a new code coverage analyzer for dmd (I think gcov should work for gdc users). I've been wanting to add this for 20 years, I finally realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak. I shoulda done it a long time ago. I can't believe some third party tools to do this cost $800+. > Wow, this is very cool! I think mention of this should be added to http://digitalmars.com/d/comparison.html and http://digitalmars.com/d/overview.html |
December 06, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to clayasaurus | On the code coverage documentation page it says
dmd sieve -cov
sieve
Shouldn't it be
dmd sieve.d -cov
sieve
? This one through me for a little loop.
clayasaurus wrote:
> Walter Bright wrote:
>
>> "clayasaurus" <clayasaurus@gmail.com> wrote in message
>> news:dn0l15$2rqf$1@digitaldaemon.com...
>>
>>> When I type 'dmd' on linux with no options it gives me the help menu and
>>> then it displays the following...
>>>
>>> arc profiling: Can't open output file /home/clark/cbx/mars/access.da.
>>
>>
>>
>> Criminy, I put the wrong executable up. It's fixed now.
>>
>>
>
> Thanks. Also, you're still using 'printf' with '\n' for the sieve example? ;)
>
> The code coverage analysis is a neat little tool and is very much appreciated. : )
>
|
December 06, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dave | Is this a compiler specific feature, or is it part of the language?
~ Clay
Dave wrote:
> In article <dn0i6d$2pgk$1@digitaldaemon.com>, Walter Bright says...
>
>>Some things of note:
>>
>>1) This includes a new code coverage analyzer for dmd (I think gcov should
>>work for gdc users). I've been wanting to add this for 20 years, I finally
>>realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
>>I shoulda done it a long time ago. I can't believe some third party tools to
>>do this cost $800+.
>>
>
>
> Wow, this is very cool!
>
> I think mention of this should be added to
>
> http://digitalmars.com/d/comparison.html
>
> and
>
> http://digitalmars.com/d/overview.html
>
>
|
December 06, 2005 Re: DMD 0.141 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to clayasaurus | "clayasaurus" <clayasaurus@gmail.com> wrote in message news:dn30jp$2sl5$1@digitaldaemon.com... > On the code coverage documentation page it says > > dmd sieve -cov > sieve > > Shouldn't it be > > dmd sieve.d -cov > sieve > > ? This one through me for a little loop. The two are the same. A .d default extension is applied if there isn't one already. |
Copyright © 1999-2021 by the D Language Foundation