Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/core/atomic.d
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ private
template HeadUnshared(T)
{
static if( is( T U : shared(U*) ) )
alias shared(U)* HeadUnshared;
alias HeadUnshared = shared(U)*;
else
alias T HeadUnshared;
alias HeadUnshared = T;
}
}

Expand Down Expand Up @@ -143,7 +143,7 @@ version( CoreDdoc )
}

deprecated("Please use MemoryOrder instead.")
alias MemoryOrder msync;
alias msync = MemoryOrder;

/**
* Inserts a full load/store memory fence (on platforms that need it). This ensures
Expand Down Expand Up @@ -324,7 +324,7 @@ else version( AsmX86_32 )
}

deprecated("Please use MemoryOrder instead.")
alias MemoryOrder msync;
alias msync = MemoryOrder;


private
Expand Down Expand Up @@ -785,7 +785,7 @@ else version( AsmX86_64 )
}

deprecated("Please use MemoryOrder instead.")
alias MemoryOrder msync;
alias msync = MemoryOrder;


private
Expand Down
6 changes: 3 additions & 3 deletions src/core/demangle.d
Original file line number Diff line number Diff line change
Expand Up @@ -1884,12 +1884,12 @@ version(unittest)

template staticIota(int x)
{
template Seq(T...){ alias T Seq; }
template Seq(T...){ alias Seq = T; }

static if (x == 0)
alias Seq!() staticIota;
alias staticIota = Seq!();
else
alias Seq!(staticIota!(x - 1), x - 1) staticIota;
alias staticIota = Seq!(staticIota!(x - 1), x - 1);
}
}
unittest
Expand Down
2 changes: 1 addition & 1 deletion src/core/math.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Written in the D programming language.
// Written in the D programming language.

/**
* Builtin mathematical intrinsics
Expand Down
2 changes: 1 addition & 1 deletion src/core/memory.d
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ struct GC
* size = The size of the block, calculated from base.
* attr = Attribute bits set on the memory block.
*/
alias BlkInfo_ BlkInfo;
alias BlkInfo = BlkInfo_;


/**
Expand Down
8 changes: 4 additions & 4 deletions src/core/runtime.d
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ extern(C) int rt_term();

private
{
alias bool function() ModuleUnitTester;
alias bool function(Object) CollectHandler;
alias Throwable.TraceInfo function( void* ptr ) TraceHandler;
alias ModuleUnitTester = bool function();
alias CollectHandler = bool function(Object);
alias TraceHandler = Throwable.TraceInfo function( void* ptr );

extern (C) void rt_setCollectHandler( CollectHandler h );
extern (C) CollectHandler rt_getCollectHandler();

extern (C) void rt_setTraceHandler( TraceHandler h );
extern (C) TraceHandler rt_getTraceHandler();

alias void delegate( Throwable ) ExceptionHandler;
alias ExceptionHandler = void delegate( Throwable );

extern (C) void* thread_stackBottom();

Expand Down
48 changes: 24 additions & 24 deletions src/core/simd.d
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,34 @@ template Vector(T)
/* __vector is compiler magic, hide it behind a template.
* The compiler will reject T's that don't work.
*/
alias __vector(T) Vector;
alias Vector = __vector(T);
}

/* Handy aliases
*/
static if (is(Vector!(void[16]))) alias Vector!(void[16]) void16; ///
static if (is(Vector!(double[2]))) alias Vector!(double[2]) double2; ///
static if (is(Vector!(float[4]))) alias Vector!(float[4]) float4; ///
static if (is(Vector!(byte[16]))) alias Vector!(byte[16]) byte16; ///
static if (is(Vector!(ubyte[16]))) alias Vector!(ubyte[16]) ubyte16; ///
static if (is(Vector!(short[8]))) alias Vector!(short[8]) short8; ///
static if (is(Vector!(ushort[8]))) alias Vector!(ushort[8]) ushort8; ///
static if (is(Vector!(int[4]))) alias Vector!(int[4]) int4; ///
static if (is(Vector!(uint[4]))) alias Vector!(uint[4]) uint4; ///
static if (is(Vector!(long[2]))) alias Vector!(long[2]) long2; ///
static if (is(Vector!(ulong[2]))) alias Vector!(ulong[2]) ulong2; ///

static if (is(Vector!(void[32]))) alias Vector!(void[32]) void32; ///
static if (is(Vector!(double[4]))) alias Vector!(double[4]) double4; ///
static if (is(Vector!(float[8]))) alias Vector!(float[8]) float8; ///
static if (is(Vector!(byte[32]))) alias Vector!(byte[32]) byte32; ///
static if (is(Vector!(ubyte[32]))) alias Vector!(ubyte[32]) ubyte32; ///
static if (is(Vector!(short[16]))) alias Vector!(short[16]) short16; ///
static if (is(Vector!(ushort[16]))) alias Vector!(ushort[16]) ushort16; ///
static if (is(Vector!(int[8]))) alias Vector!(int[8]) int8; ///
static if (is(Vector!(uint[8]))) alias Vector!(uint[8]) uint8; ///
static if (is(Vector!(long[4]))) alias Vector!(long[4]) long4; ///
static if (is(Vector!(ulong[4]))) alias Vector!(ulong[4]) ulong4; ///
static if (is(Vector!(void[16]))) alias void16 = Vector!(void[16]); ///
static if (is(Vector!(double[2]))) alias double2 = Vector!(double[2]); ///
static if (is(Vector!(float[4]))) alias float4 = Vector!(float[4]); ///
static if (is(Vector!(byte[16]))) alias byte16 = Vector!(byte[16]); ///
static if (is(Vector!(ubyte[16]))) alias ubyte16 = Vector!(ubyte[16]); ///
static if (is(Vector!(short[8]))) alias short8 = Vector!(short[8]); ///
static if (is(Vector!(ushort[8]))) alias ushort8 = Vector!(ushort[8]); ///
static if (is(Vector!(int[4]))) alias int4 = Vector!(int[4]); ///
static if (is(Vector!(uint[4]))) alias uint4 = Vector!(uint[4]); ///
static if (is(Vector!(long[2]))) alias long2 = Vector!(long[2]); ///
static if (is(Vector!(ulong[2]))) alias ulong2 = Vector!(ulong[2]); ///

static if (is(Vector!(void[32]))) alias void32 = Vector!(void[32]); ///
static if (is(Vector!(double[4]))) alias double4 = Vector!(double[4]); ///
static if (is(Vector!(float[8]))) alias float8 = Vector!(float[8]); ///
static if (is(Vector!(byte[32]))) alias byte32 = Vector!(byte[32]); ///
static if (is(Vector!(ubyte[32]))) alias ubyte32 = Vector!(ubyte[32]); ///
static if (is(Vector!(short[16]))) alias short16 = Vector!(short[16]); ///
static if (is(Vector!(ushort[16]))) alias ushort16 = Vector!(ushort[16]); ///
static if (is(Vector!(int[8]))) alias int8 = Vector!(int[8]); ///
static if (is(Vector!(uint[8]))) alias uint8 = Vector!(uint[8]); ///
static if (is(Vector!(long[4]))) alias long4 = Vector!(long[4]); ///
static if (is(Vector!(ulong[4]))) alias ulong4 = Vector!(ulong[4]); ///

version ( D_SIMD )
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/stdc/complex.d
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ extern (C):
nothrow:
@nogc:

alias creal complex;
alias ireal imaginary;
alias complex = creal;
alias imaginary = ireal;

cdouble cacos(cdouble z);
cfloat cacosf(cfloat z);
Expand Down
40 changes: 20 additions & 20 deletions src/core/stdc/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ version( Windows )
* cpp_xxxx.
*/

alias __c_long cpp_long;
alias __c_ulong cpp_ulong;
alias cpp_long = __c_long;
alias cpp_ulong = __c_ulong;

alias int c_long;
alias uint c_ulong;
alias c_long = int;
alias c_ulong = uint;
}
else
{
static if( (void*).sizeof > int.sizeof )
{
alias long c_long;
alias ulong c_ulong;
alias c_long = long;
alias c_ulong = ulong;
}
else
{
Expand All @@ -78,11 +78,11 @@ else
alias lng this;
}

alias __c_long cpp_long;
alias __c_ulong cpp_ulong;
alias cpp_long = __c_long;
alias cpp_ulong = __c_ulong;

alias int c_long;
alias uint c_ulong;
alias c_long = int;
alias c_ulong = uint;
}
}

Expand All @@ -104,37 +104,37 @@ version( DigitalMars )
alias ld this;
}

alias __c_long_double c_long_double;
alias c_long_double = __c_long_double;
}
else version( X86 )
{
alias real c_long_double;
alias c_long_double = real;
}
else version( X86_64 )
{
version( linux )
alias real c_long_double;
alias c_long_double = real;
else version( FreeBSD )
alias real c_long_double;
alias c_long_double = real;
else version( OSX )
alias real c_long_double;
alias c_long_double = real;
}
}
else version( GNU )
alias real c_long_double;
alias c_long_double = real;
else version( LDC )
{
version( X86 )
alias real c_long_double;
alias c_long_double = real;
else version( X86_64 )
alias real c_long_double;
alias c_long_double = real;
}
else version( SDC )
{
version( X86 )
alias real c_long_double;
alias c_long_double = real;
else version( X86_64 )
alias real c_long_double;
alias c_long_double = real;
}

static assert(is(c_long_double), "c_long_double needs to be declared for this platform/architecture.");
12 changes: 6 additions & 6 deletions src/core/stdc/fenv.d
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ else version ( OSX )
{
version ( BigEndian )
{
alias uint fenv_t;
alias uint fexcept_t;
alias fenv_t = uint;
alias fexcept_t = uint;
}
version ( LittleEndian )
{
Expand All @@ -151,7 +151,7 @@ else version ( OSX )
byte[8] __reserved;
}

alias ushort fexcept_t;
alias fexcept_t = ushort;
}
}
else version ( FreeBSD )
Expand All @@ -166,7 +166,7 @@ else version ( FreeBSD )
byte[16] __other;
}

alias ushort fexcept_t;
alias fexcept_t = ushort;
}
else version( Android )
{
Expand All @@ -182,7 +182,7 @@ else version( Android )
byte[16] __other;
}

alias ushort fexcept_t;
alias fexcept_t = ushort;
}
else
{
Expand All @@ -207,7 +207,7 @@ else version( Solaris )
c_ulong __fsr;
}

alias int fexcept_t;
alias fexcept_t = int;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/stdc/inttypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct imaxdiv_t
rem;
}

private alias immutable(char)* _cstr;
private alias _cstr = immutable(char)*;

enum _cstr PRId8 = "hhd";
enum _cstr PRId16 = "hd";
Expand Down
4 changes: 2 additions & 2 deletions src/core/stdc/math.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ extern (C):
nothrow:
@nogc:

alias float float_t;
alias double double_t;
alias float_t = float;
alias double_t = double;

enum double HUGE_VAL = double.infinity;
enum double HUGE_VALF = float.infinity;
Expand Down
4 changes: 2 additions & 2 deletions src/core/stdc/signal.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ nothrow:
@nogc:

// this should be volatile
alias int sig_atomic_t;
alias sig_atomic_t = int;

private alias void function(int) sigfn_t;
private alias sigfn_t = void function(int);

version( Posix )
{
Expand Down
10 changes: 5 additions & 5 deletions src/core/stdc/stdarg.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ version( X86 )
/*********************
* The argument pointer type.
*/
alias char* va_list;
alias va_list = char*;

/**********
* Initialize ap.
Expand Down Expand Up @@ -87,7 +87,7 @@ else version (Windows) // Win64
/*********************
* The argument pointer type.
*/
alias char* va_list;
alias va_list = char*;

/**********
* Initialize ap.
Expand Down Expand Up @@ -213,7 +213,7 @@ else version (X86_64)
}
else static if (U.length == 1)
{ // Arg is passed in one register
alias U[0] T1;
alias T1 = U[0];
static if (is(T1 == double) || is(T1 == float) || isVectorType!(T1))
{ // Passed in XMM register
if (ap.offset_fpregs < (6 * 8 + 16 * 8))
Expand Down Expand Up @@ -244,8 +244,8 @@ else version (X86_64)
}
else static if (U.length == 2)
{ // Arg is passed in two registers
alias U[0] T1;
alias U[1] T2;
alias T1 = U[0];
alias T2 = U[1];
auto p = cast(void*)&parmn + 8;

// Both must be in registers, or both on stack, hence 4 cases
Expand Down
4 changes: 2 additions & 2 deletions src/core/stdc/stddef.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ nothrow:

version( Windows )
{
alias wchar wchar_t;
alias wchar_t = wchar;
}
else
{
alias dchar wchar_t;
alias wchar_t = dchar;
}
Loading