23 changes: 10 additions & 13 deletions src/core/sync/semaphore.d
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,15 @@ class Semaphore
mach_timespec_t t = void;
(cast(byte*) &t)[0 .. t.sizeof] = 0;

if( dur!("nsecs")( 0 ) == val )
if( val.total!("seconds")() > t.tv_sec.max )
{
if( val.total!("seconds")() > t.tv_sec.max )
{
t.tv_sec = t.tv_sec.max;
t.tv_nsec = cast(typeof(t.tv_nsec)) val.fracSec.nsecs;
}
else
{
t.tv_sec = cast(typeof(t.tv_sec)) val.total!("seconds")();
t.tv_nsec = cast(typeof(t.tv_nsec)) val.fracSec.nsecs;
}
t.tv_sec = t.tv_sec.max;
t.tv_nsec = cast(typeof(t.tv_nsec)) val.fracSec.nsecs;
}
else
{
t.tv_sec = cast(typeof(t.tv_sec)) val.total!("seconds")();
t.tv_nsec = cast(typeof(t.tv_nsec)) val.fracSec.nsecs;
}
while( true )
{
Expand Down Expand Up @@ -505,8 +502,8 @@ version( unittest )
}
Thread.yield();
}
alertedOne = semReady.wait( dur!"msecs"(200) );
alertedTwo = semReady.wait( dur!"msecs"(200) );
alertedOne = semReady.wait( dur!"msecs"(100) );
alertedTwo = semReady.wait( dur!"msecs"(100) );
}

auto thread = new Thread( &waiter );
Expand Down
10 changes: 8 additions & 2 deletions src/core/sys/posix/arpa/inet.d
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ extern (C):
// Required
//
/*
NOTE: The following must must be defined in core.sys.posix.arpa.inet to break
a circular import: in_port_t, in_addr_t, struct in_addr, INET_ADDRSTRLEN.
in_port_t // from core.sys.posix.netinet.in_
in_addr_t // from core.sys.posix.netinet.in_
Expand Down Expand Up @@ -69,8 +72,8 @@ version( linux )
}
else version( OSX )
{
alias uint16_t in_port_t; // TODO: verify
alias uint32_t in_addr_t; // TODO: verify
alias uint16_t in_port_t;
alias uint32_t in_addr_t;

struct in_addr
{
Expand Down Expand Up @@ -116,6 +119,9 @@ else version( FreeBSD )
// IPV6 (IP6)
//
/*
NOTE: The following must must be defined in core.sys.posix.arpa.inet to break
a circular import: INET6_ADDRSTRLEN.
INET6_ADDRSTRLEN // from core.sys.posix.netinet.in_
*/

Expand Down
2 changes: 1 addition & 1 deletion src/core/sys/posix/dirent.d
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ else version( FreeBSD )
char[256] d_name;
}

typedef void* DIR;
alias void* DIR;

dirent* readdir(DIR*);
}
Expand Down
63 changes: 43 additions & 20 deletions src/core/sys/posix/netinet/in_.d
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ ntohs() // from core.sys.posix.arpa.inet

version( linux )
{
//alias uint16_t in_port_t;
//alias uint32_t in_addr_t;

//struct in_addr
//{
// in_addr_t s_addr;
//}

private enum __SOCK_SIZE__ = 16;

struct sockaddr_in
Expand All @@ -89,10 +97,18 @@ version( linux )
enum uint INADDR_ANY = 0x00000000;
enum uint INADDR_BROADCAST = 0xffffffff;

enum INET_ADDRSTRLEN = 16;
//enum INET_ADDRSTRLEN = 16;
}
else version( OSX )
{
//alias uint16_t in_port_t;
//alias uint32_t in_addr_t;

//struct in_addr
//{
// in_addr_t s_addr;
//}

private enum __SOCK_SIZE__ = 16;

struct sockaddr_in
Expand All @@ -115,10 +131,18 @@ else version( OSX )
enum uint INADDR_ANY = 0x00000000;
enum uint INADDR_BROADCAST = 0xffffffff;

enum INET_ADDRSTRLEN = 16;
//enum INET_ADDRSTRLEN = 16;
}
else version( FreeBSD )
{
//alias uint16_t in_port_t;
//alias uint32_t in_addr_t;

//struct in_addr
//{
// in_addr_t s_addr;
//}

struct sockaddr_in
{
ubyte sin_len;
Expand All @@ -138,6 +162,8 @@ else version( FreeBSD )

enum uint INADDR_ANY = 0x00000000;
enum uint INADDR_BROADCAST = 0xffffffff;

//enum INET_ADDRSTRLEN = 16;
}


Expand Down Expand Up @@ -232,7 +258,7 @@ version ( linux )
{
IPPROTO_IPV6 = 41,

INET6_ADDRSTRLEN = 46,
//INET6_ADDRSTRLEN = 46,

IPV6_JOIN_GROUP = 20,
IPV6_LEAVE_GROUP = 21,
Expand Down Expand Up @@ -355,7 +381,7 @@ else version( OSX )
{
IPPROTO_IPV6 = 41,

INET6_ADDRSTRLEN = 46,
//INET6_ADDRSTRLEN = 46,

IPV6_JOIN_GROUP = 12,
IPV6_LEAVE_GROUP = 13,
Expand Down Expand Up @@ -474,23 +500,20 @@ else version( FreeBSD )
in6_addr ipv6mr_multiaddr;
uint ipv6mr_interface;
}

enum INET6_ADDRSTRLEN = 46;
enum IPPROTO_IPV6 = 41; // <netinet/in.h>

enum

enum : uint
{
IPV6_SOCKOPT_RESERVED1 = 3,
IPV6_UNICAST_HOPS = 4,
IPV6_MULTICAST_IF = 9,
IPV6_MULTICAST_HOPS = 10,
IPV6_MULTICAST_LOOP = 11,
IPV6_JOIN_GROUP = 12,
IPV6_LEAVE_GROUP = 13,
IPV6_PORTRANGE = 14,
ICMP6_FILTER = 18,
IPV6_CHECKSUM = 26,
IPV6_V6ONLY = 27,
IPPROTO_IPV6 = 41,

//INET6_ADDRSTRLEN = 46,

IPV6_JOIN_GROUP = 12,
IPV6_LEAVE_GROUP = 13,
IPV6_MULTICAST_HOPS = 10,
IPV6_MULTICAST_IF = 9,
IPV6_MULTICAST_LOOP = 11,
IPV6_UNICAST_HOPS = 4,
IPV6_V6ONLY = 27,
}

private enum
Expand Down
38 changes: 19 additions & 19 deletions src/core/sys/windows/dbghelp.d
Original file line number Diff line number Diff line change
Expand Up @@ -148,27 +148,27 @@ struct IMAGEHLP_SYMBOL64

extern(System)
{
typedef BOOL function(HANDLE hProcess, DWORD64 lpBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead) ReadProcessMemoryProc64;
typedef PVOID function(HANDLE hProcess, DWORD64 AddrBase) FunctionTableAccessProc64;
typedef DWORD64 function(HANDLE hProcess, DWORD64 Address) GetModuleBaseProc64;
typedef DWORD64 function(HANDLE hProcess, HANDLE hThread, ADDRESS64 *lpaddr) TranslateAddressProc64;

typedef BOOL function(HANDLE hProcess, PCSTR UserSearchPath, bool fInvadeProcess) SymInitializeFunc;
typedef BOOL function(HANDLE hProcess) SymCleanupFunc;
typedef DWORD function(DWORD SymOptions) SymSetOptionsFunc;
typedef DWORD function() SymGetOptionsFunc;
typedef PVOID function(HANDLE hProcess, DWORD64 AddrBase) SymFunctionTableAccess64Func;
typedef BOOL function(DWORD MachineType, HANDLE hProcess, HANDLE hThread, STACKFRAME64 *StackFrame, PVOID ContextRecord,
alias BOOL function(HANDLE hProcess, DWORD64 lpBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead) ReadProcessMemoryProc64;
alias PVOID function(HANDLE hProcess, DWORD64 AddrBase) FunctionTableAccessProc64;
alias DWORD64 function(HANDLE hProcess, DWORD64 Address) GetModuleBaseProc64;
alias DWORD64 function(HANDLE hProcess, HANDLE hThread, ADDRESS64 *lpaddr) TranslateAddressProc64;

alias BOOL function(HANDLE hProcess, PCSTR UserSearchPath, bool fInvadeProcess) SymInitializeFunc;
alias BOOL function(HANDLE hProcess) SymCleanupFunc;
alias DWORD function(DWORD SymOptions) SymSetOptionsFunc;
alias DWORD function() SymGetOptionsFunc;
alias PVOID function(HANDLE hProcess, DWORD64 AddrBase) SymFunctionTableAccess64Func;
alias BOOL function(DWORD MachineType, HANDLE hProcess, HANDLE hThread, STACKFRAME64 *StackFrame, PVOID ContextRecord,
ReadProcessMemoryProc64 ReadMemoryRoutine, FunctionTableAccessProc64 FunctoinTableAccess,
GetModuleBaseProc64 GetModuleBaseRoutine, TranslateAddressProc64 TranslateAddress) StackWalk64Func;
typedef BOOL function(HANDLE hProcess, DWORD64 dwAddr, PDWORD pdwDisplacement, IMAGEHLP_LINE64 *line) SymGetLineFromAddr64Func;
typedef DWORD64 function(HANDLE hProcess, DWORD64 dwAddr) SymGetModuleBase64Func;
typedef BOOL function(HANDLE hProcess, DWORD64 dwAddr, IMAGEHLP_MODULE64 *ModuleInfo) SymGetModuleInfo64Func;
typedef BOOL function(HANDLE hProcess, DWORD64 Address, DWORD64 *Displacement, IMAGEHLP_SYMBOL64 *Symbol) SymGetSymFromAddr64Func;
typedef DWORD function(PCTSTR DecoratedName, PTSTR UnDecoratedName, DWORD UndecoratedLength, DWORD Flags) UnDecorateSymbolNameFunc;
typedef DWORD64 function(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, PCSTR ModuleName, DWORD64 BaseOfDll, DWORD SizeOfDll) SymLoadModule64Func;
typedef BOOL function(HANDLE HProcess, PTSTR SearchPath, DWORD SearchPathLength) SymGetSearchPathFunc;
typedef BOOL function(HANDLE hProcess, DWORD64 Address) SymUnloadModule64Func;
alias BOOL function(HANDLE hProcess, DWORD64 dwAddr, PDWORD pdwDisplacement, IMAGEHLP_LINE64 *line) SymGetLineFromAddr64Func;
alias DWORD64 function(HANDLE hProcess, DWORD64 dwAddr) SymGetModuleBase64Func;
alias BOOL function(HANDLE hProcess, DWORD64 dwAddr, IMAGEHLP_MODULE64 *ModuleInfo) SymGetModuleInfo64Func;
alias BOOL function(HANDLE hProcess, DWORD64 Address, DWORD64 *Displacement, IMAGEHLP_SYMBOL64 *Symbol) SymGetSymFromAddr64Func;
alias DWORD function(PCTSTR DecoratedName, PTSTR UnDecoratedName, DWORD UndecoratedLength, DWORD Flags) UnDecorateSymbolNameFunc;
alias DWORD64 function(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, PCSTR ModuleName, DWORD64 BaseOfDll, DWORD SizeOfDll) SymLoadModule64Func;
alias BOOL function(HANDLE HProcess, PTSTR SearchPath, DWORD SearchPathLength) SymGetSearchPathFunc;
alias BOOL function(HANDLE hProcess, DWORD64 Address) SymUnloadModule64Func;
}

struct DbgHelp
Expand Down
8 changes: 4 additions & 4 deletions src/core/sys/windows/stacktrace.d
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extern(Windows)
DWORD GetEnvironmentVariableA(LPCSTR lpName, LPSTR pBuffer, DWORD nSize);
void RtlCaptureContext(CONTEXT* ContextRecord);

typedef LONG function(void*) UnhandeledExceptionFilterFunc;
alias LONG function(void*) UnhandeledExceptionFilterFunc;
void* SetUnhandledExceptionFilter(void* handler);
}

Expand All @@ -44,9 +44,9 @@ enum : uint

extern(System)
{
typedef HANDLE function(DWORD dwFlags, DWORD th32ProcessID) CreateToolhelp32SnapshotFunc;
typedef BOOL function(HANDLE hSnapshot, MODULEENTRY32 *lpme) Module32FirstFunc;
typedef BOOL function(HANDLE hSnapshot, MODULEENTRY32 *lpme) Module32NextFunc;
alias HANDLE function(DWORD dwFlags, DWORD th32ProcessID) CreateToolhelp32SnapshotFunc;
alias BOOL function(HANDLE hSnapshot, MODULEENTRY32 *lpme) Module32FirstFunc;
alias BOOL function(HANDLE hSnapshot, MODULEENTRY32 *lpme) Module32NextFunc;
}


Expand Down
50 changes: 25 additions & 25 deletions src/core/sys/windows/windows.d
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ else // Win32
alias uint * PULONG_PTR;
}

typedef void *HANDLE;
alias void *HANDLE;
alias void *PVOID;
alias HANDLE HGLOBAL;
alias HANDLE HLOCAL;
Expand Down Expand Up @@ -639,49 +639,49 @@ enum
REG_LEGAL_OPTION = (REG_OPTION_RESERVED | REG_OPTION_NON_VOLATILE | REG_OPTION_VOLATILE | REG_OPTION_CREATE_LINK | REG_OPTION_BACKUP_RESTORE | REG_OPTION_OPEN_LINK),
}

export LONG RegDeleteKeyA(HKEY hKey, LPCSTR lpSubKey);
export LONG RegDeleteKeyW(HKEY hKey, LPCWSTR lpSubKey);
export LONG RegDeleteValueA(HKEY hKey, LPCSTR lpValueName);
export LONG RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName);
export LONG RegDeleteKeyA(in HKEY hKey, LPCSTR lpSubKey);
export LONG RegDeleteKeyW(in HKEY hKey, LPCWSTR lpSubKey);
export LONG RegDeleteValueA(in HKEY hKey, LPCSTR lpValueName);
export LONG RegDeleteValueW(in HKEY hKey, LPCWSTR lpValueName);

export LONG RegEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpName, LPDWORD lpcbName, LPDWORD lpReserved, LPSTR lpClass, LPDWORD lpcbClass, FILETIME* lpftLastWriteTime);
export LONG RegEnumKeyExW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, LPDWORD lpcbName, LPDWORD lpReserved, LPWSTR lpClass, LPDWORD lpcbClass, FILETIME* lpftLastWriteTime);
export LONG RegEnumValueA(HKEY hKey, DWORD dwIndex, LPSTR lpValueName, LPDWORD lpcbValueName, LPDWORD lpReserved,
export LONG RegEnumKeyExA(in HKEY hKey, DWORD dwIndex, LPSTR lpName, LPDWORD lpcbName, LPDWORD lpReserved, LPSTR lpClass, LPDWORD lpcbClass, FILETIME* lpftLastWriteTime);
export LONG RegEnumKeyExW(in HKEY hKey, DWORD dwIndex, LPWSTR lpName, LPDWORD lpcbName, LPDWORD lpReserved, LPWSTR lpClass, LPDWORD lpcbClass, FILETIME* lpftLastWriteTime);
export LONG RegEnumValueA(in HKEY hKey, DWORD dwIndex, LPSTR lpValueName, LPDWORD lpcbValueName, LPDWORD lpReserved,
LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);
export LONG RegEnumValueW(HKEY hKey, DWORD dwIndex, LPWSTR lpValueName, LPDWORD lpcbValueName, LPDWORD lpReserved,
export LONG RegEnumValueW(in HKEY hKey, DWORD dwIndex, LPWSTR lpValueName, LPDWORD lpcbValueName, LPDWORD lpReserved,
LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);

export LONG RegCloseKey(HKEY hKey);
export LONG RegFlushKey(HKEY hKey);
export LONG RegCloseKey(in HKEY hKey);
export LONG RegFlushKey(in HKEY hKey);

export LONG RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult);
export LONG RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult);
export LONG RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult);
export LONG RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult);
export LONG RegOpenKeyA(in HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult);
export LONG RegOpenKeyW(in HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult);
export LONG RegOpenKeyExA(in HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult);
export LONG RegOpenKeyExW(in HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult);

export LONG RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcbClass,
export LONG RegQueryInfoKeyA(in HKEY hKey, LPSTR lpClass, LPDWORD lpcbClass,
LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcbMaxSubKeyLen, LPDWORD lpcbMaxClassLen,
LPDWORD lpcValues, LPDWORD lpcbMaxValueNameLen, LPDWORD lpcbMaxValueLen, LPDWORD lpcbSecurityDescriptor,
PFILETIME lpftLastWriteTime);
export LONG RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcbClass,
export LONG RegQueryInfoKeyW(in HKEY hKey, LPWSTR lpClass, LPDWORD lpcbClass,
LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcbMaxSubKeyLen, LPDWORD lpcbMaxClassLen,
LPDWORD lpcValues, LPDWORD lpcbMaxValueNameLen, LPDWORD lpcbMaxValueLen, LPDWORD lpcbSecurityDescriptor,
PFILETIME lpftLastWriteTime);

export LONG RegQueryValueA(HKEY hKey, LPCSTR lpSubKey, LPSTR lpValue, LPLONG lpcbValue);
export LONG RegQueryValueW(HKEY hKey, LPCWSTR lpSubKey, LPWSTR lpValue, LPLONG lpcbValue);
export LONG RegQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPVOID lpData, LPDWORD lpcbData);
export LONG RegQueryValueExW(HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPVOID lpData, LPDWORD lpcbData);
export LONG RegQueryValueA(in HKEY hKey, LPCSTR lpSubKey, LPSTR lpValue, LPLONG lpcbValue);
export LONG RegQueryValueW(in HKEY hKey, LPCWSTR lpSubKey, LPWSTR lpValue, LPLONG lpcbValue);
export LONG RegQueryValueExA(in HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPVOID lpData, LPDWORD lpcbData);
export LONG RegQueryValueExW(in HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPVOID lpData, LPDWORD lpcbData);

export LONG RegCreateKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD Reserved, LPSTR lpClass,
export LONG RegCreateKeyExA(in HKEY hKey, LPCSTR lpSubKey, DWORD Reserved, LPSTR lpClass,
DWORD dwOptions, REGSAM samDesired, SECURITY_ATTRIBUTES* lpSecurityAttributes,
PHKEY phkResult, LPDWORD lpdwDisposition);
export LONG RegCreateKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass,
export LONG RegCreateKeyExW(in HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass,
DWORD dwOptions, REGSAM samDesired, SECURITY_ATTRIBUTES* lpSecurityAttributes,
PHKEY phkResult, LPDWORD lpdwDisposition);

export LONG RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, BYTE* lpData, DWORD cbData);
export LONG RegSetValueExW(HKEY hKey, LPCWSTR lpValueName, DWORD Reserved, DWORD dwType, BYTE* lpData, DWORD cbData);
export LONG RegSetValueExA(in HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, BYTE* lpData, DWORD cbData);
export LONG RegSetValueExW(in HKEY hKey, LPCWSTR lpValueName, DWORD Reserved, DWORD dwType, BYTE* lpData, DWORD cbData);

export LONG RegOpenCurrentUser(REGSAM samDesired, PHKEY phkResult);

Expand Down
58 changes: 49 additions & 9 deletions src/gc/gcx.d
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private
NO_SCAN = 0b0000_0010,
NO_MOVE = 0b0000_0100,
APPENDABLE = 0b0000_1000,
NO_INTERIOR = 0b0001_0000,
ALL_BITS = 0b1111_1111
}
}
Expand Down Expand Up @@ -2290,18 +2291,28 @@ struct Gcx
size_t biti = void;
size_t pn = offset / PAGESIZE;
Bins bin = cast(Bins)pool.pagetable[pn];

// For the NO_INTERIOR attribute. This tracks whether
// the pointer is an interior pointer or points to the
// base address of a block.
bool pointsToBase = false;

//debug(PRINTF) printf("\t\tfound pool %p, base=%p, pn = %zd, bin = %d, biti = x%x\n", pool, pool.baseAddr, pn, bin, biti);

// Adjust bit to be at start of allocated memory block
if (bin < B_PAGE)
{
biti = (offset & notbinsize[bin]) >> pool.shiftBy;
// We don't care abou setting pointsToBase correctly
// because it's ignored for small object pools anyhow.
auto base = offset & notbinsize[bin];
biti = base >> pool.shiftBy;
//debug(PRINTF) printf("\t\tbiti = x%x\n", biti);
}
else if (bin == B_PAGE)
{
biti = (offset & notbinsize[bin]) >> pool.shiftBy;
auto base = offset & notbinsize[bin];
pointsToBase = offset == base;
biti = base >> pool.shiftBy;
//debug(PRINTF) printf("\t\tbiti = x%x\n", biti);

pcache = cast(size_t)p & ~cast(size_t)(PAGESIZE-1);
Expand All @@ -2318,13 +2329,18 @@ struct Gcx
// Don't mark bits in B_FREE or B_UNCOMMITTED pages
continue;
}

if(pool.isLargeObject && !pointsToBase && pool.nointerior.test(biti))
{
continue;
}

//debug(PRINTF) printf("\t\tmark(x%x) = %d\n", biti, pool.mark.test(biti));
if (!pool.mark.testSet(biti))
{
//if (log) debug(PRINTF) printf("\t\tmarking %p\n", p);
if (!pool.noscan.test(biti))
{
{
pool.scan.set(biti);
changes = 1;
pool.newChanges = true;
Expand Down Expand Up @@ -2849,6 +2865,8 @@ struct Gcx
bits |= BlkAttr.FINALIZE;
if (pool.noscan.test(biti))
bits |= BlkAttr.NO_SCAN;
if (pool.isLargeObject && pool.nointerior.test(biti))
bits |= BlkAttr.NO_INTERIOR;
// if (pool.nomove.nbits &&
// pool.nomove.test(biti))
// bits |= BlkAttr.NO_MOVE;
Expand Down Expand Up @@ -2888,6 +2906,11 @@ struct Gcx
{
pool.appendable.set(biti);
}

if (pool.isLargeObject && (mask & BlkAttr.NO_INTERIOR))
{
pool.nointerior.set(biti);
}
}


Expand All @@ -2909,6 +2932,8 @@ struct Gcx
// pool.nomove.clear(biti);
if (mask & BlkAttr.APPENDABLE)
pool.appendable.clear(biti);
if (pool.isLargeObject && (mask & BlkAttr.NO_INTERIOR))
pool.nointerior.clear(biti);
}


Expand Down Expand Up @@ -2986,10 +3011,7 @@ struct Gcx
if (!findPool(current.data[i].parent))
{
auto j = prev.find(current.data[i].p);
if (j == OPFAIL)
debug(PRINTF) printf("N");
else
debug(PRINTF) printf(" ");;
debug(PRINTF) printf(j == OPFAIL ? "N" : " ");
current.data[i].print();
}
}
Expand Down Expand Up @@ -3050,6 +3072,8 @@ struct Pool
GCBits finals; // entries that need finalizer run on them
GCBits noscan; // entries that should not be scanned
GCBits appendable; // entries that are appendable
GCBits nointerior; // interior pointers should be ignored.
// Only implemented for large object pools.

size_t npages;
size_t freepages; // The number of pages not in use.
Expand Down Expand Up @@ -3101,8 +3125,16 @@ struct Pool
scan.alloc(nbits);

// pagetable already keeps track of what's free for the large object
// pool. nointerior is only worth the overhead for the large object
// pool.
if(!isLargeObject) freebits.alloc(nbits);
if(isLargeObject)
{
nointerior.alloc(nbits);
}
else
{
freebits.alloc(nbits);
}

noscan.alloc(nbits);
appendable.alloc(nbits);
Expand Down Expand Up @@ -3157,7 +3189,14 @@ struct Pool

mark.Dtor();
scan.Dtor();
if(!isLargeObject) freebits.Dtor();
if(isLargeObject)
{
nointerior.Dtor();
}
else
{
freebits.Dtor();
}
finals.Dtor();
noscan.Dtor();
appendable.Dtor();
Expand All @@ -3175,6 +3214,7 @@ struct Pool
//finals.Invariant();
//noscan.Invariant();
//appendable.Invariant();
//nointerior.Invariant();

if (baseAddr)
{
Expand Down
216 changes: 93 additions & 123 deletions src/object_.d

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/rt/aApply.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private import rt.util.utf;
*/

// dg is D, but _aApplycd() is C
extern (D) typedef int delegate(void *) dg_t;
extern (D) alias int delegate(void *) dg_t;

extern (C) int _aApplycd1(char[] aa, dg_t dg)
{ int result;
Expand Down Expand Up @@ -196,7 +196,7 @@ extern (C) int _aApplydw1(dchar[] aa, dg_t dg)
/****************************************************************************/

// dg is D, but _aApplycd2() is C
extern (D) typedef int delegate(void *, void *) dg2_t;
extern (D) alias int delegate(void *, void *) dg2_t;

extern (C) int _aApplycd2(char[] aa, dg2_t dg)
{ int result;
Expand Down
4 changes: 2 additions & 2 deletions src/rt/aApplyR.d
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private import rt.util.utf;
/* 1 argument versions */

// dg is D, but _aApplyRcd() is C
extern (D) typedef int delegate(void *) dg_t;
extern (D) alias int delegate(void *) dg_t;

extern (C) int _aApplyRcd1(in char[] aa, dg_t dg)
{ int result;
Expand Down Expand Up @@ -488,7 +488,7 @@ unittest
/* 2 argument versions */

// dg is D, but _aApplyRcd2() is C
extern (D) typedef int delegate(void *, void *) dg2_t;
extern (D) alias int delegate(void *, void *) dg2_t;

extern (C) int _aApplyRcd2(in char[] aa, dg2_t dg)
{ int result;
Expand Down
22 changes: 17 additions & 5 deletions src/rt/aaA.d
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,24 @@ private
NO_SCAN = 0b0000_0010,
NO_MOVE = 0b0000_0100,
APPENDABLE = 0b0000_1000,
NO_INTERIOR = 0b0001_0000,
ALL_BITS = 0b1111_1111
}

extern (C) void* gc_malloc( size_t sz, uint ba = 0 );
extern (C) void* gc_calloc( size_t sz, uint ba = 0 );
extern (C) void gc_free( void* p );

// Convenience function to make sure the NO_INTERIOR gets set on the
// aaA arrays.
aaA*[] newaaA(size_t len)
{
auto ptr = cast(aaA**) gc_malloc(
len * (aaA*).sizeof, BlkAttr.NO_INTERIOR);
auto ret = ptr[0..len];
ret[] = null;
return ret;
}
}

// Auto-rehash and pre-allocate - Dave Fladebo
Expand Down Expand Up @@ -473,7 +485,7 @@ body
break;
}
len = prime_list[i];
newb.b = new aaA*[len];
newb.b = newaaA(len);

foreach (e; aa.b)
{
Expand Down Expand Up @@ -578,7 +590,7 @@ unittest
*/

// dg is D, but _aaApply() is C
extern (D) typedef int delegate(void *) dg_t;
extern (D) alias int delegate(void *) dg_t;

int _aaApply(AA aa, size_t keysize, dg_t dg)
{ int result;
Expand All @@ -605,7 +617,7 @@ int _aaApply(AA aa, size_t keysize, dg_t dg)
}

// dg is D, but _aaApply2() is C
extern (D) typedef int delegate(void *, void *) dg2_t;
extern (D) alias int delegate(void *, void *) dg2_t;

int _aaApply2(AA aa, size_t keysize, dg2_t dg)
{ int result;
Expand Down Expand Up @@ -666,7 +678,7 @@ BB* _d_assocarrayliteralT(TypeInfo_AssociativeArray ti, size_t length, ...)
break;
}
auto len = prime_list[i];
result.b = new aaA*[len];
result.b = newaaA(len);

size_t keystacksize = (keysize + int.sizeof - 1) & ~(int.sizeof - 1);
size_t valuestacksize = (valuesize + int.sizeof - 1) & ~(int.sizeof - 1);
Expand Down Expand Up @@ -742,7 +754,7 @@ BB* _d_assocarrayliteralTX(TypeInfo_AssociativeArray ti, void[] keys, void[] val
break;
}
auto len = prime_list[i];
result.b = new aaA*[len];
result.b = newaaA(len);

size_t keytsize = aligntsize(keysize);

Expand Down
2 changes: 1 addition & 1 deletion src/rt/trace.d
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,8 @@ void _trace_pro_n()
add RSP,16 ;
pop R11 ;
pop R10 ;
pop R8 ;
pop R9 ;
pop R8 ;
pop RDI ;
pop RSI ;
pop RDX ;
Expand Down
8 changes: 4 additions & 4 deletions src/rt/typeinfo/ti_AC.d
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,22 @@ class TypeInfo_AC : TypeInfo
return c < 0 ? -1 : c > 0 ? 1 : 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (Object[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(Object);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (Object[]).alignof;
}
Expand Down
8 changes: 4 additions & 4 deletions src/rt/typeinfo/ti_Acdouble.d
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ class TypeInfo_Ar : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (cdouble[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(cdouble);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (cdouble[]).alignof;
}
Expand Down
8 changes: 4 additions & 4 deletions src/rt/typeinfo/ti_Acfloat.d
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ class TypeInfo_Aq : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (cfloat[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(cfloat);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (cfloat[]).alignof;
}
Expand Down
8 changes: 4 additions & 4 deletions src/rt/typeinfo/ti_Acreal.d
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ class TypeInfo_Ac : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (creal[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(creal);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (real[]).alignof;
}
Expand Down
10 changes: 5 additions & 5 deletions src/rt/typeinfo/ti_Adouble.d
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ class TypeInfo_Ad : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (double[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(double);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (double[]).alignof;
}
Expand All @@ -98,7 +98,7 @@ class TypeInfo_Ap : TypeInfo_Ad
{
override string toString() { return "idouble[]"; }

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(idouble);
}
Expand Down
10 changes: 5 additions & 5 deletions src/rt/typeinfo/ti_Afloat.d
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ class TypeInfo_Af : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (float[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(float);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (float[]).alignof;
}
Expand All @@ -98,7 +98,7 @@ class TypeInfo_Ao : TypeInfo_Af
{
override string toString() { return "ifloat[]"; }

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(ifloat);
}
Expand Down
18 changes: 9 additions & 9 deletions src/rt/typeinfo/ti_Ag.d
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ class TypeInfo_Ag : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (byte[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(byte);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (byte[]).alignof;
}
Expand Down Expand Up @@ -101,7 +101,7 @@ class TypeInfo_Ah : TypeInfo_Ag
return dstrcmp(s1, s2);
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(ubyte);
}
Expand All @@ -113,7 +113,7 @@ class TypeInfo_Av : TypeInfo_Ah
{
override string toString() { return "void[]"; }

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(void);
}
Expand All @@ -125,7 +125,7 @@ class TypeInfo_Ab : TypeInfo_Ah
{
override string toString() { return "bool[]"; }

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(bool);
}
Expand Down Expand Up @@ -186,7 +186,7 @@ else
return hash;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(char);
}
Expand All @@ -198,7 +198,7 @@ class TypeInfo_Aya : TypeInfo_Aa
{
override string toString() { return "immutable(char)[]"; }

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(immutable(char));
}
Expand Down
12 changes: 6 additions & 6 deletions src/rt/typeinfo/ti_Aint.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ class TypeInfo_Ai : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (int[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(int);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (int[]).alignof;
}
Expand Down Expand Up @@ -123,7 +123,7 @@ class TypeInfo_Ak : TypeInfo_Ai
return 0;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(uint);
}
Expand All @@ -135,7 +135,7 @@ class TypeInfo_Aw : TypeInfo_Ak
{
override string toString() { return "dchar[]"; }

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(dchar);
}
Expand Down
10 changes: 5 additions & 5 deletions src/rt/typeinfo/ti_Along.d
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ class TypeInfo_Al : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (long[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(long);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (long[]).alignof;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ class TypeInfo_Am : TypeInfo_Al
return 0;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(ulong);
}
Expand Down
10 changes: 5 additions & 5 deletions src/rt/typeinfo/ti_Areal.d
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ class TypeInfo_Ae : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (real[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(real);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (real[]).alignof;
}
Expand All @@ -98,7 +98,7 @@ class TypeInfo_Aj : TypeInfo_Ae
{
override string toString() { return "ireal[]"; }

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(ireal);
}
Expand Down
12 changes: 6 additions & 6 deletions src/rt/typeinfo/ti_Ashort.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ class TypeInfo_As : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (short[]).sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(short);
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return (short[]).alignof;
}
Expand Down Expand Up @@ -112,7 +112,7 @@ class TypeInfo_At : TypeInfo_As
return 0;
}

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(ushort);
}
Expand All @@ -124,7 +124,7 @@ class TypeInfo_Au : TypeInfo_At
{
override string toString() { return "wchar[]"; }

override TypeInfo next()
@property override TypeInfo next() nothrow pure
{
return typeid(wchar);
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_C.d
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ class TypeInfo_C : TypeInfo
return c;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return Object.sizeof;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/rt/typeinfo/ti_byte.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TypeInfo_g : TypeInfo
return *cast(byte *)p1 - *cast(byte *)p2;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return byte.sizeof;
}
Expand Down
6 changes: 3 additions & 3 deletions src/rt/typeinfo/ti_cdouble.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class TypeInfo_r : TypeInfo
return _compare(*cast(cdouble *)p1, *cast(cdouble *)p2);
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return cdouble.sizeof;
}
Expand All @@ -71,13 +71,13 @@ class TypeInfo_r : TypeInfo
*cast(cdouble *)p2 = t;
}

override void[] init()
override void[] init() nothrow pure
{ static immutable cdouble r;

return (cast(cdouble *)&r)[0 .. 1];
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return cdouble.alignof;
}
Expand Down
6 changes: 3 additions & 3 deletions src/rt/typeinfo/ti_cfloat.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class TypeInfo_q : TypeInfo
return _compare(*cast(cfloat *)p1, *cast(cfloat *)p2);
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return cfloat.sizeof;
}
Expand All @@ -71,13 +71,13 @@ class TypeInfo_q : TypeInfo
*cast(cfloat *)p2 = t;
}

override void[] init()
override void[] init() nothrow pure
{ static immutable cfloat r;

return (cast(cfloat *)&r)[0 .. 1];
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return cfloat.alignof;
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_char.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TypeInfo_a : TypeInfo
return *cast(char *)p1 - *cast(char *)p2;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return char.sizeof;
}
Expand All @@ -48,7 +48,7 @@ class TypeInfo_a : TypeInfo
*cast(char *)p2 = t;
}

override void[] init()
override void[] init() nothrow pure
{ static immutable char c;

return (cast(char *)&c)[0 .. 1];
Expand Down
6 changes: 3 additions & 3 deletions src/rt/typeinfo/ti_creal.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class TypeInfo_c : TypeInfo
return _compare(*cast(creal *)p1, *cast(creal *)p2);
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return creal.sizeof;
}
Expand All @@ -71,13 +71,13 @@ class TypeInfo_c : TypeInfo
*cast(creal *)p2 = t;
}

override void[] init()
override void[] init() nothrow pure
{ static immutable creal r;

return (cast(creal *)&r)[0 .. 1];
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return creal.alignof;
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_dchar.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TypeInfo_w : TypeInfo
return *cast(dchar *)p1 - *cast(dchar *)p2;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return dchar.sizeof;
}
Expand All @@ -48,7 +48,7 @@ class TypeInfo_w : TypeInfo
*cast(dchar *)p2 = t;
}

override void[] init()
override void[] init() nothrow pure
{ static immutable dchar c;

return (cast(dchar *)&c)[0 .. 1];
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_delegate.d
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TypeInfo_D : TypeInfo
return *cast(dg *)p1 == *cast(dg *)p2;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return dg.sizeof;
}
Expand All @@ -45,7 +45,7 @@ class TypeInfo_D : TypeInfo
*cast(dg *)p2 = t;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}
Expand Down
6 changes: 3 additions & 3 deletions src/rt/typeinfo/ti_double.d
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TypeInfo_d : TypeInfo
return _compare(*cast(double *)p1, *cast(double *)p2);
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return double.sizeof;
}
Expand All @@ -70,13 +70,13 @@ class TypeInfo_d : TypeInfo
*cast(double *)p2 = t;
}

override void[] init()
override void[] init() nothrow pure
{ static immutable double r;

return (cast(double *)&r)[0 .. 1];
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return double.alignof;
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_float.d
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TypeInfo_f : TypeInfo
return _compare(*cast(float *)p1, *cast(float *)p2);
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return float.sizeof;
}
Expand All @@ -68,7 +68,7 @@ class TypeInfo_f : TypeInfo
*cast(float *)p2 = t;
}

override void[] init()
override void[] init() nothrow pure
{ static immutable float r;

return (cast(float *)&r)[0 .. 1];
Expand Down
2 changes: 1 addition & 1 deletion src/rt/typeinfo/ti_int.d
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TypeInfo_i : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return int.sizeof;
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_long.d
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TypeInfo_l : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return long.sizeof;
}
Expand All @@ -54,7 +54,7 @@ class TypeInfo_l : TypeInfo
*cast(long *)p2 = t;
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return long.alignof;
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_ptr.d
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TypeInfo_P : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return (void*).sizeof;
}
Expand All @@ -51,7 +51,7 @@ class TypeInfo_P : TypeInfo
*cast(void* *)p2 = t;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}
Expand Down
6 changes: 3 additions & 3 deletions src/rt/typeinfo/ti_real.d
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TypeInfo_e : TypeInfo
return _compare(*cast(real *)p1, *cast(real *)p2);
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return real.sizeof;
}
Expand All @@ -70,13 +70,13 @@ class TypeInfo_e : TypeInfo
*cast(real *)p2 = t;
}

override void[] init()
override void[] init() nothrow pure
{ static immutable real r;

return (cast(real *)&r)[0 .. 1];
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return real.alignof;
}
Expand Down
2 changes: 1 addition & 1 deletion src/rt/typeinfo/ti_short.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TypeInfo_s : TypeInfo
return *cast(short *)p1 - *cast(short *)p2;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return short.sizeof;
}
Expand Down
2 changes: 1 addition & 1 deletion src/rt/typeinfo/ti_ubyte.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TypeInfo_h : TypeInfo
return *cast(ubyte *)p1 - *cast(ubyte *)p2;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return ubyte.sizeof;
}
Expand Down
2 changes: 1 addition & 1 deletion src/rt/typeinfo/ti_uint.d
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TypeInfo_k : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return uint.sizeof;
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_ulong.d
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TypeInfo_m : TypeInfo
return 0;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return ulong.sizeof;
}
Expand All @@ -54,7 +54,7 @@ class TypeInfo_m : TypeInfo
*cast(ulong *)p2 = t;
}

override size_t talign()
@property override size_t talign() nothrow pure
{
return ulong.alignof;
}
Expand Down
2 changes: 1 addition & 1 deletion src/rt/typeinfo/ti_ushort.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TypeInfo_t : TypeInfo
return *cast(ushort *)p1 - *cast(ushort *)p2;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return ushort.sizeof;
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_void.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TypeInfo_v : TypeInfo
return *cast(byte *)p1 - *cast(byte *)p2;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return void.sizeof;
}
Expand All @@ -48,7 +48,7 @@ class TypeInfo_v : TypeInfo
*cast(byte *)p2 = t;
}

override uint flags()
@property override uint flags() nothrow pure
{
return 1;
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/typeinfo/ti_wchar.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TypeInfo_u : TypeInfo
return *cast(wchar *)p1 - *cast(wchar *)p2;
}

override size_t tsize()
@property override size_t tsize() nothrow pure
{
return wchar.sizeof;
}
Expand All @@ -48,7 +48,7 @@ class TypeInfo_u : TypeInfo
*cast(wchar *)p2 = t;
}

override void[] init()
override void[] init() nothrow pure
{ static immutable wchar c;

return (cast(wchar *)&c)[0 .. 1];
Expand Down
3 changes: 1 addition & 2 deletions src/rt/util/string.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* The exception module defines all system-level exceptions and provides a
* mechanism to alter system-level error handling.
* String manipulation and comparison utilities.
*
* Copyright: Copyright Sean Kelly 2005 - 2009.
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
Expand Down
2 changes: 1 addition & 1 deletion test/gcbench/tree1.d
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TreeNode {


void main(string[] args) {
auto sw = StopWatch(autoStart);
auto sw = StopWatch(AutoStart.yes);

enum int minDepth = 4;
enum n = 18;
Expand Down