DMD Issue with Asm Generation?

2016-02-13 Thread user001 via Digitalmars-d
There seems to be some invalid code generation for std.format for type of "real". Relavant links: https://github.com/D-Programming-Language/phobos/blob/master/std/format.d#L1713 https://github.com/D-Programming-Language/phobos/blob/master/std/math.d#L5118 movabs rbx,7FF0

Re: DMD Issue with Asm Generation?

2016-02-13 Thread user001 via Digitalmars-d
Disregard all that above, looks like someone used a "double" which uses 0x7FF0 to check if infinite. Not sure why the code runs fine on x86 though, different library maybe? https://github.com/D-Programming-Language/phobos/blob/master/std/format.d#L1709

Uniform Function Call Syntax?

2016-03-03 Thread user001 via Digitalmars-d
Was just wondering why UFCS only works in one direction, that is why functions can be used as if it were part of a struct/class but not the other way around. struct Vec3 { float x; float y; float z; float dot(Vec3 o) { return x * o.x + y * o.y + z * o.z; } } in

Re: Uniform Function Call Syntax?

2016-03-03 Thread user001 via Digitalmars-d
On Friday, 4 March 2016 at 02:09:25 UTC, Era Scarecrow wrote: On Friday, 4 March 2016 at 01:56:34 UTC, user001 wrote: Was just wondering why UFCS only works in one direction, that is why functions can be used as if it were part of a struct/class but not the other way around. int dot; float v