[dmd-internals] d2 64 bit update

Don Clugston dclugston at googlemail.com
Thu Dec 23 13:11:54 PST 2010


¯¯¯

On 23 December 2010 22:03, David Simcha <dsimcha at gmail.com> wrote:
> Great work!  See details below:
>
> On Thu, Dec 23, 2010 at 3:52 PM, Brad Roberts <braddr at puremagic.com> wrote:
>>
>> 1) druntime's tests changed to be like phobos'.  In other words, one test
>> app per .d file.  This makes it so much simpler to dig into what's going
>> wrong.  Before anyone takes this as a point of failure of D's unittests, I
>> think bootstrapping from totally broken is a very different case from a
>> mostly working setup and digging into new issues.
>
> Shouldn't this conversion be automatable?
>
>>
>> 2) implement the asm code in std/math.d.
>
> Failing this, IMHO all math functions that don't already (I'm not sure how
> many don't) should have a portable implementation (which could be just
> calling C) that meets all requirements (safe, pure, nothrow, etc.)

The problem is, the C functions are *not* pure. They modify errno.
But, you can just lie -- put  pure nothrow @safe{} around the C
functions in core.stdc.math.
(I wouldn't want that to be included in an official release, but it's
no problem for testing).


>.  This
> would be "good enough" until someone gets around to writing optimized ASM
> versions of the math functions, and would probably make it easier for the
> GDC/LDC people to port D to more archs.


More information about the dmd-internals mailing list