Re: Is there a way to get a list of functions that get inlined by

2010-02-08 Thread Scorn
>>> Use LDC (D1), you will note a significant improvement over DMD. >>> >> Unless you're on windows. >> > > Yep, second big problem. And unless you're using CodeBlocks (like me at the moment) for development ...

Re: Is there a way to get a list of functions that get inlined by

2010-02-08 Thread Trass3r
Use LDC (D1), you will note a significant improvement over DMD. Unless you're on windows. Yep, second big problem.

Re: Is there a way to get a list of functions that get inlined by

2010-02-08 Thread Nick Sabalausky
"bearophile" wrote in message news:hkpiai$2kt...@digitalmars.com... > Scorn: >> The only things i figured out so far is that functions across modules do >> not seem to get inlined (i don't know if this is the case in general) >> which would be really bad. Another thing which i believe is that >>

Re: Is there a way to get a list of functions that get inlined by

2010-02-08 Thread Scorn
bearophile schrieb: > Scorn: >> The only things i figured out so far is that functions across modules do >> not seem to get inlined (i don't know if this is the case in general) >> which would be really bad. Another thing which i believe is that >> functions / methods which contain ref parameters a

Re: Is there a way to get a list of functions that get inlined by

2010-02-08 Thread Trass3r
Use LDC (D1), you will note a significant improvement over DMD. I believe that, but... D1. Also LDC doesn't seem to get much attention (development-wise) recently.

Re: Is there a way to get a list of functions that get inlined by

2010-02-08 Thread bearophile
Scorn: > The only things i figured out so far is that functions across modules do > not seem to get inlined (i don't know if this is the case in general) > which would be really bad. Another thing which i believe is that > functions / methods which contain ref parameters are never inlined at > all

Re: Why isn't == used to compare structs

2010-02-08 Thread Trass3r
Yes, I intentionally duped the string to make sure they're not using the same memory. I was thinking of something like a transitive ==. Overload opEquals.

Re: Why isn't == used to compare structs

2010-02-08 Thread Jacob Carlborg
On 2/8/10 13:48, Trass3r wrote: Why isn't == used to compare the struct members in the code above? I mean, if I compare the structs with == it could also use == to compare the members. If I use "is" to compare the structs it could use "is" to compare them members. Structs are compared *bitwise*

Re: Why isn't == used to compare structs

2010-02-08 Thread Jacob Carlborg
On 2/8/10 14:58, Pelle Månsson wrote: On 02/08/2010 01:48 PM, Trass3r wrote: Why isn't == used to compare the struct members in the code above? I mean, if I compare the structs with == it could also use == to compare the members. If I use "is" to compare the structs it could use "is" to compare

Re: Is there a way to get a list of functions that get inlined by dmd?

2010-02-08 Thread Scorn
Trass3r schrieb: > Would be interesting. Yes, this would be very interesting indeed. A list of the rules which dmd uses internally for inlining functions and methods similiar to this (which is for .NET) http://blogs.msdn.com/ericgu/archive/2004/01/29/64717.aspx would be really nice. Sure you ca

Is there a way to get a list of functions that get inlined by dmd?

2010-02-08 Thread Trass3r
Would be interesting.

Re: Why isn't == used to compare structs

2010-02-08 Thread Trass3r
I believe the question was *why* things are this way. I think it's weird. It's common behavior. In the end structs are just a way to map a memory range to some variable tuple. If you really need == for all members you can always overload opEquals!!

Re: Why isn't == used to compare structs

2010-02-08 Thread Pelle Månsson
On 02/08/2010 01:48 PM, Trass3r wrote: Why isn't == used to compare the struct members in the code above? I mean, if I compare the structs with == it could also use == to compare the members. If I use "is" to compare the structs it could use "is" to compare them members. Structs are compared *b

Re: Why isn't == used to compare structs

2010-02-08 Thread Trass3r
Why isn't == used to compare the struct members in the code above? I mean, if I compare the structs with == it could also use == to compare the members. If I use "is" to compare the structs it could use "is" to compare them members. Structs are compared *bitwise*! When you dup your pointer

Re: Why isn't == used to compare structs

2010-02-08 Thread Manuel König
Am Mon, 08 Feb 2010 12:19:12 +0100 schrieb Jacob Carlborg : > struct String > { > char[] data; > } > > void main () > { > auto foo = String("foo"); > auto bar = String("foo".dup); > > assert(bar == foo); > } > > Why isn't == used to compare the struct members in the code

Why isn't == used to compare structs

2010-02-08 Thread Jacob Carlborg
struct String { char[] data; } void main () { auto foo = String("foo"); auto bar = String("foo".dup); assert(bar == foo); } Why isn't == used to compare the struct members in the code above? I mean, if I compare the structs with == it could also use == to compar

Re: interpret.c assertion failure on enum.stringof mixin

2010-02-08 Thread strtr
Don Wrote: > Wow, seems like you and the compiler are at war... > I had an even more horrid dmd crash some time ago, removing a circular selective import seemed to fix it. But I'm not sure and can't replicate it any more :( > > Please put this into bugzilla. Title "ICE(interpret.c): mixin non

Re: interpret.c assertion failure on enum.stringof mixin

2010-02-08 Thread Don
strtr wrote: strtr Wrote: enum { E }; void _mixin() { writefln( E.stringof ); } void func() { mixin(_mixin); } Assertion failure: '!dim || (parameters && (parameters->dim == dim))' on line 140 in file 'interpret.c' At least I got a line number this time :) Wow, seems like yo