so it works with compiler changes

This commit is contained in:
Walter Bright 2015-11-04 00:14:59 -08:00
parent 3ea3ec6c8c
commit 1f763bca8d
2 changed files with 25 additions and 20 deletions

View file

@ -234,7 +234,7 @@ class GC
void initialize()
{
//printf("GC.initialize(), this = %p\n", this);
//printf("GC.initialize(), this = %p\n", this);
gcLock = GCLock.classinfo;
gcx = cast(Gcx *)cstdlib.calloc(1, Gcx.sizeof);
if (!gcx)
@ -964,13 +964,13 @@ class GC
gcx.addRange(pbot, ptop);
}
else
{
//printf("sync gcLock %p, classinit = %p, this = %p\n", gcLock, GCLock.classinfo, this);
synchronized (gcLock)
{
gcx.addRange(pbot, ptop);
}
}
{
//printf("sync gcLock %p, classinit = %p, this = %p\n", gcLock, GCLock.classinfo, this);
synchronized (gcLock)
{
gcx.addRange(pbot, ptop);
}
}
//debug(PRINTF) printf("-GC.addRange()\n");
}
@ -1604,15 +1604,15 @@ struct Gcx
memmove(pooltable + n,
pooltable + n + 1,
(--npools - n) * (Pool*).sizeof);
if (npools)
{
minAddr = pooltable[0].baseAddr;
maxAddr = pooltable[npools - 1].topAddr;
}
else
{ minAddr = null;
maxAddr = null;
}
if (npools)
{
minAddr = pooltable[0].baseAddr;
maxAddr = pooltable[npools - 1].topAddr;
}
else
{ minAddr = null;
maxAddr = null;
}
}
}
@ -2733,6 +2733,11 @@ struct Pool
else
return cast(int)(baseAddr > p2.baseAddr);
}
int opEquals(Pool *p2)
{
return baseAddr == p2.baseAddr;
}
}

View file

@ -333,7 +333,7 @@ struct Box
* Compare this box's value with another box. This implicitly casts if the
* types are different, identical to the regular type system.
*/
bool opEquals(Box other)
int opEquals(Box other)
{
return opEqualsInternal(other, false);
}
@ -388,9 +388,9 @@ struct Box
* Compare this box's value with another box. This implicitly casts if the
* types are different, identical to the regular type system.
*/
float opCmp(Box other)
int opCmp(Box other)
{
return opCmpInternal(other, false);
return cast(int)opCmpInternal(other, false);
}
/**