mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 01:23:14 +01:00
Updated to dmdfe 2.051
This commit is contained in:
133
phobos.patch
133
phobos.patch
@@ -1,6 +1,6 @@
|
||||
diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.h' -x Makefile -x '*.rej' -x '*~' -x '*.log' -x .svn -x '*pro.user' -x .directory -x cmake_install -x CMakeFiles -x .preprocessed.tmp -x 'Makefile.*' -x '*.orig' -- phobos-orig/std/concurrency.d phobos/std/concurrency.d
|
||||
--- phobos-orig/std/concurrency.d 2010-10-29 05:54:44.000000000 +0400
|
||||
+++ phobos/std/concurrency.d 2010-11-07 19:26:52.000000000 +0300
|
||||
--- phobos-orig/std/concurrency.d 2010-12-20 23:02:36.000000000 +0300
|
||||
+++ phobos/std/concurrency.d 2011-01-05 15:15:31.000000000 +0300
|
||||
@@ -359,9 +359,10 @@
|
||||
owner = ownerTid;
|
||||
fn( args );
|
||||
@@ -14,9 +14,9 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
return spawnTid;
|
||||
}
|
||||
diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.h' -x Makefile -x '*.rej' -x '*~' -x '*.log' -x .svn -x '*pro.user' -x .directory -x cmake_install -x CMakeFiles -x .preprocessed.tmp -x 'Makefile.*' -x '*.orig' -- phobos-orig/std/conv.d phobos/std/conv.d
|
||||
--- phobos-orig/std/conv.d 2010-10-29 05:54:44.000000000 +0400
|
||||
+++ phobos/std/conv.d 2010-11-08 15:54:33.109464001 +0300
|
||||
@@ -1405,7 +1405,7 @@
|
||||
--- phobos-orig/std/conv.d 2010-12-20 23:02:36.000000000 +0300
|
||||
+++ phobos/std/conv.d 2011-01-05 15:15:31.000000000 +0300
|
||||
@@ -1425,7 +1425,7 @@
|
||||
else // not hex
|
||||
{
|
||||
if (toupper(p.front) == 'N' && !startsWithZero)
|
||||
@@ -25,7 +25,7 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
// nan
|
||||
enforce((p.popFront(), !p.empty && toupper(p.front) == 'A')
|
||||
&& (p.popFront(), !p.empty && toupper(p.front) == 'N'),
|
||||
@@ -3243,6 +3243,11 @@
|
||||
@@ -3263,6 +3263,11 @@
|
||||
T toImpl(T, S)(S d) if (is(Unqual!S == double) && isSomeString!(T))
|
||||
{
|
||||
//alias Unqual!(ElementType!T) Char;
|
||||
@@ -38,9 +38,9 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
int len = sprintf(buffer.ptr, "%g", d);
|
||||
return to!T(buffer[0 .. len].dup);
|
||||
diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.h' -x Makefile -x '*.rej' -x '*~' -x '*.log' -x .svn -x '*pro.user' -x .directory -x cmake_install -x CMakeFiles -x .preprocessed.tmp -x 'Makefile.*' -x '*.orig' -- phobos-orig/std/functional.d phobos/std/functional.d
|
||||
--- phobos-orig/std/functional.d 2010-10-29 05:54:44.000000000 +0400
|
||||
+++ phobos/std/functional.d 2010-12-30 13:56:03.206104002 +0300
|
||||
@@ -713,6 +713,13 @@
|
||||
--- phobos-orig/std/functional.d 2010-12-20 23:02:36.000000000 +0300
|
||||
+++ phobos/std/functional.d 2011-01-05 15:15:31.000000000 +0300
|
||||
@@ -714,6 +714,13 @@
|
||||
assert(dg_pure_nothrow() == 7);
|
||||
//assert(dg_pure_nothrow_safe() == 8);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
/* test for linkage */
|
||||
{
|
||||
struct S
|
||||
@@ -724,4 +731,6 @@
|
||||
@@ -725,4 +732,6 @@
|
||||
auto dg_xtrnD = toDelegate(&S.xtrnD);
|
||||
static assert(! is(typeof(dg_xtrnC) == typeof(dg_xtrnD)));
|
||||
}
|
||||
@@ -62,8 +62,8 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
+ }
|
||||
}
|
||||
diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.h' -x Makefile -x '*.rej' -x '*~' -x '*.log' -x .svn -x '*pro.user' -x .directory -x cmake_install -x CMakeFiles -x .preprocessed.tmp -x 'Makefile.*' -x '*.orig' -- phobos-orig/std/internal/math/biguintx86.d phobos/std/internal/math/biguintx86.d
|
||||
--- phobos-orig/std/internal/math/biguintx86.d 2010-10-29 05:54:44.000000000 +0400
|
||||
+++ phobos/std/internal/math/biguintx86.d 2010-11-07 19:26:52.000000000 +0300
|
||||
--- phobos-orig/std/internal/math/biguintx86.d 2010-12-20 23:02:36.000000000 +0300
|
||||
+++ phobos/std/internal/math/biguintx86.d 2011-01-05 15:15:30.000000000 +0300
|
||||
@@ -734,7 +734,10 @@
|
||||
// EDI = dest
|
||||
// ESI = src
|
||||
@@ -98,56 +98,10 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
mixin(asmMulAdd_enter_odd(OP, "ESP+LASTPARAM"));
|
||||
}
|
||||
|
||||
diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.h' -x Makefile -x '*.rej' -x '*~' -x '*.log' -x .svn -x '*pro.user' -x .directory -x cmake_install -x CMakeFiles -x .preprocessed.tmp -x 'Makefile.*' -x '*.orig' -- phobos-orig/std/intrinsic.d phobos/std/intrinsic.d
|
||||
--- phobos-orig/std/intrinsic.d 2010-10-29 05:54:44.000000000 +0400
|
||||
+++ phobos/std/intrinsic.d 2010-12-16 14:56:59.311832002 +0300
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
module std.intrinsic;
|
||||
|
||||
-nothrow:
|
||||
+//nothrow:
|
||||
|
||||
/**
|
||||
* Scans the bits in v starting with bit 0, looking
|
||||
@@ -72,12 +72,12 @@
|
||||
/**
|
||||
* Tests and complements the bit.
|
||||
*/
|
||||
-int btc(uint *p, uint bitnum);
|
||||
+nothrow int btc(uint *p, uint bitnum);
|
||||
|
||||
/**
|
||||
* Tests and resets (sets to 0) the bit.
|
||||
*/
|
||||
-int btr(uint *p, size_t bitnum);
|
||||
+nothrow int btr(uint *p, size_t bitnum);
|
||||
|
||||
/**
|
||||
* Tests and sets the bit.
|
||||
@@ -136,7 +136,7 @@
|
||||
array = [0]:x2, [1]:x100
|
||||
</pre>
|
||||
*/
|
||||
-int bts(uint *p, size_t bitnum);
|
||||
+nothrow int bts(uint *p, size_t bitnum);
|
||||
|
||||
|
||||
/**
|
||||
@@ -144,7 +144,8 @@
|
||||
byte 3, byte 1 becomes byte 2, byte 2 becomes byte 1, byte 3
|
||||
becomes byte 0.
|
||||
*/
|
||||
-pure uint bswap(uint v);
|
||||
+pure nothrow pragma(intrinsic, "llvm.bswap.i32")
|
||||
+ uint bswap(uint val);
|
||||
|
||||
|
||||
/**
|
||||
diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.h' -x Makefile -x '*.rej' -x '*~' -x '*.log' -x .svn -x '*pro.user' -x .directory -x cmake_install -x CMakeFiles -x .preprocessed.tmp -x 'Makefile.*' -x '*.orig' -- phobos-orig/std/math.d phobos/std/math.d
|
||||
--- phobos-orig/std/math.d 2010-10-29 05:54:44.000000000 +0400
|
||||
+++ phobos/std/math.d 2010-12-28 21:51:24.775335002 +0300
|
||||
@@ -276,7 +276,7 @@
|
||||
--- phobos-orig/std/math.d 2011-01-05 16:04:59.087062853 +0300
|
||||
+++ phobos/std/math.d 2011-01-05 18:17:40.283062853 +0300
|
||||
@@ -266,7 +266,7 @@
|
||||
assert(abs(71.6Li) == 71.6L);
|
||||
assert(abs(-56) == 56);
|
||||
assert(abs(2321312L) == 2321312L);
|
||||
@@ -156,55 +110,57 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
}
|
||||
|
||||
/***********************************
|
||||
@@ -318,7 +318,10 @@
|
||||
@@ -308,7 +308,10 @@
|
||||
* Results are undefined if |x| >= $(POWER 2,64).
|
||||
*/
|
||||
|
||||
-@safe pure nothrow real cos(real x); /* intrinsic */
|
||||
-real cos(real x) @safe pure nothrow; /* intrinsic */
|
||||
+version(LDC)
|
||||
+ @safe pure nothrow real cos(real x) { return llvm_cos(x); }
|
||||
+else
|
||||
+ @safe pure nothrow real cos(real x); /* intrinsic */
|
||||
+ real cos(real x) @safe pure nothrow; /* intrinsic */
|
||||
|
||||
/***********************************
|
||||
* Returns sine of x. x is in radians.
|
||||
@@ -333,7 +336,10 @@
|
||||
@@ -323,7 +326,10 @@
|
||||
* Results are undefined if |x| >= $(POWER 2,64).
|
||||
*/
|
||||
|
||||
-@safe pure nothrow real sin(real x); /* intrinsic */
|
||||
-real sin(real x) @safe pure nothrow; /* intrinsic */
|
||||
+version(LDC)
|
||||
+ @safe pure nothrow real sin(real x) { return llvm_sin(x); }
|
||||
+else
|
||||
+ @safe pure nothrow real sin(real x); /* intrinsic */
|
||||
+ real sin(real x) @safe pure nothrow; /* intrinsic */
|
||||
|
||||
|
||||
/***********************************
|
||||
@@ -400,7 +406,9 @@
|
||||
@@ -390,7 +396,9 @@
|
||||
|
||||
@trusted pure nothrow real tan(real x)
|
||||
real tan(real x) @trusted pure nothrow
|
||||
{
|
||||
- version(Naked_D_InlineAsm_X86) {
|
||||
- version(D_InlineAsm_X86) {
|
||||
+ version(LDC) {
|
||||
+ return core.stdc.math.tanl(x);
|
||||
+ } else version(Naked_D_InlineAsm_X86) {
|
||||
+ } else version(D_InlineAsm_X86) {
|
||||
asm
|
||||
{
|
||||
fld x[EBP] ; // load theta
|
||||
@@ -809,6 +817,12 @@
|
||||
@@ -806,7 +814,13 @@
|
||||
* greater than long.max, the result is
|
||||
* indeterminate.
|
||||
*/
|
||||
-long rndtol(real x) @safe pure nothrow; /* intrinsic */
|
||||
+version(LDC)
|
||||
+pure nothrow long rndtol(real x)
|
||||
+{
|
||||
+ return core.stdc.math.llroundl(x);
|
||||
+}
|
||||
+else
|
||||
@safe pure nothrow long rndtol(real x); /* intrinsic */
|
||||
+ long rndtol(real x) @safe pure nothrow; /* intrinsic */
|
||||
|
||||
|
||||
@@ -831,6 +845,20 @@
|
||||
/*****************************************
|
||||
@@ -828,6 +842,20 @@
|
||||
* )
|
||||
*/
|
||||
|
||||
@@ -225,7 +181,7 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
@safe pure nothrow
|
||||
{
|
||||
float sqrt(float x); /* intrinsic */
|
||||
@@ -838,6 +866,8 @@
|
||||
@@ -835,6 +863,8 @@
|
||||
real sqrt(real x); /* intrinsic */ /// ditto
|
||||
}
|
||||
|
||||
@@ -234,7 +190,7 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
@trusted pure nothrow { // Should be @safe. See bugs 4628, 4630.
|
||||
// Create explicit overloads for integer sqrts. No ddoc for these because
|
||||
// hopefully a more elegant solution will eventually be found, so we don't
|
||||
@@ -1413,9 +1443,22 @@
|
||||
@@ -1421,9 +1451,22 @@
|
||||
* Compute n * 2$(SUP exp)
|
||||
* References: frexp
|
||||
*/
|
||||
@@ -250,27 +206,20 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
+else
|
||||
+{
|
||||
|
||||
@safe pure nothrow real ldexp(real n, int exp); /* intrinsic */
|
||||
real ldexp(real n, int exp) @safe pure nothrow; /* intrinsic */
|
||||
|
||||
+}
|
||||
+
|
||||
unittest {
|
||||
assert(ldexp(1, -16384) == 0x1p-16384L);
|
||||
assert(ldexp(1, -16382) == 0x1p-16382L);
|
||||
@@ -1608,7 +1651,31 @@
|
||||
@@ -1617,7 +1660,24 @@
|
||||
* $(TR $(TD $(PLUSMN)$(INFIN)) $(TD +$(INFIN)) )
|
||||
* )
|
||||
*/
|
||||
-@safe pure nothrow real fabs(real x); /* intrinsic */
|
||||
-real fabs(real x) @safe pure nothrow; /* intrinsic */
|
||||
+version(LDC) {
|
||||
+ version( FreeBSD )
|
||||
+ version (all) // < 8-CURRENT
|
||||
+ private extern(C) real fabsl(real x) { return fabs(x); }
|
||||
+ else
|
||||
+ private extern(C) real fabsl(real x);
|
||||
+ else
|
||||
+ private extern(C) real fabsl(real x);
|
||||
+ pure nothrow real fabs(real x)
|
||||
+ @trusted pure nothrow real fabs(real x)
|
||||
+ {
|
||||
+ version(D_InlineAsm_X86)
|
||||
+ {
|
||||
@@ -285,12 +234,12 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
+ }
|
||||
+ }
|
||||
+} else {
|
||||
+ @safe pure nothrow real fabs(real x); /* intrinsic */
|
||||
+ real fabs(real x) @safe pure nothrow; /* intrinsic */
|
||||
+}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
@@ -2993,9 +3060,15 @@
|
||||
@@ -3017,9 +3077,15 @@
|
||||
assert(pow(x,eight) == (x * x) * (x * x) * (x * x) * (x * x));
|
||||
|
||||
assert(pow(x, neg1) == 1 / x);
|
||||
@@ -310,7 +259,7 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
/** Compute the value of an integer x, raised to the power of a positive
|
||||
diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.h' -x Makefile -x '*.rej' -x '*~' -x '*.log' -x .svn -x '*pro.user' -x .directory -x cmake_install -x CMakeFiles -x .preprocessed.tmp -x 'Makefile.*' -x '*.orig' -- phobos-orig/std/openrj.d phobos/std/openrj.d
|
||||
--- phobos-orig/std/openrj.d 2009-09-03 12:01:40.000000000 +0400
|
||||
+++ phobos/std/openrj.d 2010-10-26 13:17:37.000000000 +0400
|
||||
+++ phobos/std/openrj.d 2011-01-05 15:15:30.000000000 +0300
|
||||
@@ -620,11 +620,11 @@
|
||||
/**
|
||||
*
|
||||
@@ -354,8 +303,8 @@ diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.
|
||||
result = dg(field);
|
||||
|
||||
diff -U 3 -H -d -r -N -x '*.mak' -x tk -x backend -x debug -x release -x '*_pch.h' -x Makefile -x '*.rej' -x '*~' -x '*.log' -x .svn -x '*pro.user' -x .directory -x cmake_install -x CMakeFiles -x .preprocessed.tmp -x 'Makefile.*' -x '*.orig' -- phobos-orig/std/outbuffer.d phobos/std/outbuffer.d
|
||||
--- phobos-orig/std/outbuffer.d 2010-10-29 05:54:44.000000000 +0400
|
||||
+++ phobos/std/outbuffer.d 2010-11-05 13:59:42.000000000 +0300
|
||||
--- phobos-orig/std/outbuffer.d 2010-12-20 23:02:36.000000000 +0300
|
||||
+++ phobos/std/outbuffer.d 2011-01-05 15:15:31.000000000 +0300
|
||||
@@ -308,8 +308,15 @@
|
||||
void printf(string format, ...)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user