Showing with 110 additions and 107 deletions.
  1. +13 −13 import/object.di
  2. +4 −2 src/core/cpuid.d
  3. +1 −1 src/core/runtime.d
  4. +2 −2 src/core/stdc/errno.d
  5. +1 −1 src/core/thread.d
  6. +24 −24 src/core/time.d
  7. +4 −4 src/gc/gcx.d
  8. +61 −60 src/object_.d
26 changes: 13 additions & 13 deletions import/object.di
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ class TypeInfo
hash_t getHash(in void* p);
equals_t equals(in void* p1, in void* p2);
int compare(in void* p1, in void* p2);
size_t tsize();
@property size_t tsize();
void swap(void* p1, void* p2);
TypeInfo next();
void[] init();
uint flags();
@property TypeInfo next();
void[] init(); // TODO: make this a property, but may need to be renamed to diambiguate with T.init...
@property uint flags();
// 1: // has possible pointers into GC memory
OffsetTypeInfo[] offTi();
void destroy(void* p);
void postblit(void* p);
size_t talign();
@property size_t talign();
version (X86_64) int argTypes(out TypeInfo arg1, out TypeInfo arg2);
}

Expand Down Expand Up @@ -212,16 +212,16 @@ class TypeInfo_Inout : TypeInfo_Const

abstract class MemberInfo
{
string name();
@property string name();
}

class MemberInfo_field : MemberInfo
{
this(string name, TypeInfo ti, size_t offset);

override string name();
TypeInfo typeInfo();
size_t offset();
@property override string name();
@property TypeInfo typeInfo();
@property size_t offset();
}

class MemberInfo_function : MemberInfo
Expand All @@ -235,10 +235,10 @@ class MemberInfo_function : MemberInfo

this(string name, TypeInfo ti, void* fp, uint flags);

override string name();
TypeInfo typeInfo();
@property override string name();
@property TypeInfo typeInfo();
void* fp();
uint flags();
@property uint flags();
}

struct ModuleInfo
Expand Down Expand Up @@ -446,7 +446,7 @@ void clear(T)(ref T obj) if (is(T == struct))
obj.__dtor();
}
auto buf = (cast(ubyte*) &obj)[0 .. T.sizeof];
auto init = cast(ubyte[])typeid(T).init();
auto init = cast(ubyte[])typeid(T).init;
if(init.ptr is null) // null ptr means initialize to 0s
buf[] = 0;
else
Expand Down
6 changes: 4 additions & 2 deletions src/core/cpuid.d
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public:
/// The data caches. If there are fewer than 5 physical caches levels,
/// the remaining levels are set to uint.max (== entire memory space)
__gshared CacheInfo[5] datacache;
@property {
/// Does it have an x87 FPU on-chip?
bool x87onChip() {return (features&FPU_BIT)!=0;}
/// Is MMX supported?
Expand Down Expand Up @@ -163,7 +164,7 @@ public:
return false;
return (features & SYSENTERSYSEXIT_BIT)!=0;
}


/// Is 3DNow prefetch supported?
bool has3dnowPrefetch()
Expand Down Expand Up @@ -213,6 +214,7 @@ public:
bool preferPentium4() { return probablyIntel && family == 0xF; }
/// Does this CPU perform better on Pentium I code than Pentium Pro code?
bool preferPentium1() { return family < 6 || (family==6 && model < 0xF && !probablyIntel); }
}

__gshared:
// All these values are set only once, and never subsequently modified.
Expand All @@ -234,7 +236,7 @@ private:
uint maxCores = 1;
uint maxThreads = 1;
// Note that this may indicate multi-core rather than hyperthreading.
bool hyperThreadingBit() { return (features&HTT_BIT)!=0;}
@property bool hyperThreadingBit() { return (features&HTT_BIT)!=0;}

// feature flags CPUID1_EDX
enum : uint
Expand Down
2 changes: 1 addition & 1 deletion src/core/runtime.d
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ extern (C) bool runModuleUnitTests()
}
catch( Throwable e )
{
console( e.toString )( "\n" );
console( e.toString() )( "\n" );
failed++;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/stdc/errno.d
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ module core.stdc.errno;
extern (C) int getErrno(); // for internal use
extern (C) int setErrno(int); // for internal use

alias getErrno errno;
alias setErrno errno;
@property int errno() { return getErrno(); }
@property int errno(int n) { return setErrno(n); }

extern (C):
nothrow:
Expand Down
2 changes: 1 addition & 1 deletion src/core/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ private:
//
// All use of the global lists should synchronize on this lock.
//
static Mutex slock()
@property static Mutex slock()
{
__gshared Mutex m = null;

Expand Down
48 changes: 24 additions & 24 deletions src/core/time.d
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ assert(dur!"weeks"(12).weeks == 12);
assert(dur!"days"(13).weeks == 1);
--------------------
+/
@property alias get!"weeks" weeks;
@property auto weeks() const pure nothrow { return get!"weeks"(); }

unittest
{
Expand All @@ -770,7 +770,7 @@ assert(dur!"days"(13).days == 6);
assert(dur!"hours"(49).days == 2);
--------------------
+/
@property alias get!"days" days;
@property auto days() const pure nothrow { return get!"days"(); }

unittest
{
Expand Down Expand Up @@ -798,7 +798,7 @@ assert(dur!"hours"(49).hours == 1);
assert(dur!"minutes"(121).hours == 2);
--------------------
+/
@property alias get!"hours" hours;
@property auto hours() const pure nothrow { return get!"hours"(); }

unittest
{
Expand Down Expand Up @@ -826,7 +826,7 @@ assert(dur!"minutes"(127).minutes == 7);
assert(dur!"seconds"(121).minutes == 2);
--------------------
+/
@property alias get!"minutes" minutes;
@property auto minutes() const pure nothrow { return get!"minutes"(); }

unittest
{
Expand Down Expand Up @@ -854,7 +854,7 @@ assert(dur!"seconds"(127).seconds == 7);
assert(dur!"msecs"(1217).seconds == 1);
--------------------
+/
@property alias get!"seconds" seconds;
@property auto seconds() const pure nothrow { return get!"seconds"(); }

unittest
{
Expand Down Expand Up @@ -945,7 +945,7 @@ assert(dur!"nsecs"(2007).total!"hnsecs"() == 20);
assert(dur!"nsecs"(2007).total!"nsecs"() == 2000);
--------------------
+/
long total(string units)() const pure nothrow
@property long total(string units)() const pure nothrow
if(units == "weeks" ||
units == "days" ||
units == "hours" ||
Expand All @@ -965,24 +965,24 @@ assert(dur!"nsecs"(2007).total!"nsecs"() == 2000);
unittest
{
//Verify Examples.
assert(dur!"weeks"(12).total!"weeks"() == 12);
assert(dur!"weeks"(12).total!"days"() == 84);
assert(dur!"weeks"(12).total!"weeks" == 12);
assert(dur!"weeks"(12).total!"days" == 84);

assert(dur!"days"(13).total!"weeks"() == 1);
assert(dur!"days"(13).total!"days"() == 13);
assert(dur!"days"(13).total!"weeks" == 1);
assert(dur!"days"(13).total!"days" == 13);

assert(dur!"hours"(49).total!"days"() == 2);
assert(dur!"hours"(49).total!"hours"() == 49);
assert(dur!"hours"(49).total!"days" == 2);
assert(dur!"hours"(49).total!"hours" == 49);

assert(dur!"nsecs"(2007).total!"hnsecs"() == 20);
assert(dur!"nsecs"(2007).total!"nsecs"() == 2000);
assert(dur!"nsecs"(2007).total!"hnsecs" == 20);
assert(dur!"nsecs"(2007).total!"nsecs" == 2000);

const dur = Duration(12);
const cdur = Duration(12);
immutable idur = Duration(12);
static assert(__traits(compiles, dur.total!"days"()));
static assert(__traits(compiles, cdur.total!"days"()));
static assert(__traits(compiles, idur.total!"days"()));
dur.total!"days"; // just check that it compiles
cdur.total!"days"; // just check that it compiles
idur.total!"days"; // just check that it compiles
}


Expand Down Expand Up @@ -1371,7 +1371,7 @@ struct TickDuration
/++
Alias for converting TickDuration to seconds.
+/
@property alias to!("seconds", long) seconds;
@property auto seconds() const pure nothrow { return to!("seconds", long)(); }

unittest
{
Expand All @@ -1394,27 +1394,27 @@ struct TickDuration
/++
Alias for converting TickDuration to milliseconds.
+/
@property alias to!("msecs", long) msecs;
@property auto msecs() const pure nothrow { return to!("msecs", long)(); }


/++
Alias for converting TickDuration to microseconds.
+/


@property alias to!("usecs", long) usecs;
@property auto usecs() const pure nothrow { return to!("usecs", long)(); }


/++
Alias for converting TickDuration to hecto-nanoseconds (100 ns).
+/
@property alias to!("hnsecs", long) hnsecs;
@property auto hnsecs() const pure nothrow { return to!("hnsecs", long)(); }


/++
Alias for converting TickDuration to nanoseconds.
+/
@property alias to!("nsecs", long) nsecs;
@property auto nsecs() const pure nothrow { return to!("nsecs", long)(); }


/++
Expand Down Expand Up @@ -1628,8 +1628,8 @@ struct TickDuration
{
auto a = TickDuration.currSystemTick;
auto b = TickDuration.currSystemTick;
assert((a + b).to!("seconds", real) > 0);
assert((a - b).to!("seconds", real) <= 0);
assert((a + b).to!("seconds", real)() > 0);
assert((a - b).to!("seconds", real)() <= 0);
}


Expand Down
8 changes: 4 additions & 4 deletions src/gc/gcx.d
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ class GC
/**
*
*/
int delegate(int delegate(ref void*)) rootIter()
@property int delegate(int delegate(ref void*)) rootIter()
{
if (!thread_needLock())
{
Expand Down Expand Up @@ -1261,7 +1261,7 @@ class GC
/**
*
*/
int delegate(int delegate(ref Range)) rangeIter()
@property int delegate(int delegate(ref Range)) rangeIter()
{
if (!thread_needLock())
{
Expand Down Expand Up @@ -3192,15 +3192,15 @@ struct Pool
}

// The divisor used for determining bit indices.
private size_t divisor()
@property private size_t divisor()
{
// NOTE: Since this is called by initialize it must be private or
// invariant() will be called and fail.
return isLargeObject ? PAGESIZE : 16;
}

// Bit shift for fast division by divisor.
uint shiftBy()
@property uint shiftBy()
{
return isLargeObject ? 12 : 4;
}
Expand Down
Loading