diff --git a/internal/gc/gcx.d b/internal/gc/gcx.d index c18540d10..c31708969 100644 --- a/internal/gc/gcx.d +++ b/internal/gc/gcx.d @@ -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; + } } diff --git a/std/boxer.d b/std/boxer.d index d56137a35..f767986c3 100644 --- a/std/boxer.d +++ b/std/boxer.d @@ -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); } /**