Skip to content
Open
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
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ os:
- linux
language: d
d:
- ldc
- dmd
matrix:
include:
- d: dmd-nightly
- d: dmd
script:
- dub test --compiler=$DC --build=unittest-cov
#- dub build -b ddox
Expand Down
5 changes: 4 additions & 1 deletion dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"--unittest-examples",
"--min-protection=Protected"
],
"-ddoxTool": "scod"
"-ddoxTool": "scod",
"dependencies": {
"phobos:allocator": "~master"
}
}
6 changes: 6 additions & 0 deletions dub.selections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"fileVersion": 1,
"versions": {
"phobos": "~master"
}
}
16 changes: 8 additions & 8 deletions source/stdx/collections/array.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ debug(CollectionArray) import std.stdio;

version(unittest)
{
import std.experimental.allocator.mallocator;
import std.experimental.allocator.building_blocks.stats_collector;
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator.mallocator;
import stdx.allocator.building_blocks.stats_collector;
import stdx.allocator : RCIAllocator, RCISharedAllocator,
allocatorObject, sharedAllocatorObject;
import std.stdio;

Expand All @@ -19,9 +19,9 @@ version(unittest)
///
struct Array(T)
{
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator : RCIAllocator, RCISharedAllocator,
make, dispose, stateSize;
import std.experimental.allocator.building_blocks.affix_allocator;
import stdx.allocator.building_blocks.affix_allocator;
import std.traits : isImplicitlyConvertible, Unqual, isArray;
import std.range.primitives : isInputRange, isInfinite, ElementType, hasLength;
import std.conv : emplace;
Expand Down Expand Up @@ -137,7 +137,7 @@ public:
static if (is(T == int))
@safe unittest
{
import std.experimental.allocator : theAllocator, processAllocator;
import stdx.allocator : theAllocator, processAllocator;

auto a = Array!int(theAllocator);
auto ca = const Array!int(processAllocator);
Expand Down Expand Up @@ -1782,7 +1782,7 @@ void testConstness(RCISharedAllocator allocator)
@safe unittest
{
import std.conv;
import std.experimental.allocator : processAllocator;
import stdx.allocator : processAllocator;
SCAlloc statsCollectorAlloc;
// TODO: StatsCollector needs to be made shareable
//auto _allocator = sharedAllocatorObject(&statsCollectorAlloc);
Expand Down Expand Up @@ -1819,7 +1819,7 @@ void testWithStruct(RCIAllocator allocator, RCISharedAllocator sharedAlloc)
@safe unittest
{
import std.conv;
import std.experimental.allocator : processAllocator;
import stdx.allocator : processAllocator;
SCAlloc statsCollectorAlloc;
{
auto _allocator = (() @trusted => allocatorObject(&statsCollectorAlloc))();
Expand Down
28 changes: 14 additions & 14 deletions source/stdx/collections/common.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ if (isInputRange!Collection)

package static auto threadAllocatorObject()
{
import std.experimental.allocator : RCIAllocator;
import stdx.allocator : RCIAllocator;

static @nogc nothrow
RCIAllocator wrapAllocatorObject()
{
import std.experimental.allocator.gc_allocator : GCAllocator;
import std.experimental.allocator : allocatorObject;
import stdx.allocator.gc_allocator : GCAllocator;
import stdx.allocator : allocatorObject;

return allocatorObject(GCAllocator.instance);
}
Expand All @@ -30,13 +30,13 @@ package static auto threadAllocatorObject()

package static auto processAllocatorObject()
{
import std.experimental.allocator : RCISharedAllocator;
import stdx.allocator : RCISharedAllocator;

static @nogc nothrow
RCISharedAllocator wrapAllocatorObject()
{
import std.experimental.allocator.gc_allocator : GCAllocator;
import std.experimental.allocator : sharedAllocatorObject;
import stdx.allocator.gc_allocator : GCAllocator;
import stdx.allocator : sharedAllocatorObject;

return sharedAllocatorObject(GCAllocator.instance);
}
Expand All @@ -47,9 +47,9 @@ package static auto processAllocatorObject()

package struct AllocatorHandler
{
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator : RCIAllocator, RCISharedAllocator,
dispose, stateSize, theAllocator, processAllocator;
import std.experimental.allocator.building_blocks.affix_allocator;
import stdx.allocator.building_blocks.affix_allocator;
import std.conv : emplace;
import core.atomic : atomicOp;
import std.algorithm.mutation : move;
Expand Down Expand Up @@ -403,14 +403,14 @@ version(unittest)

package static struct Impure
{
import std.experimental.allocator : RCIAllocator, theAllocator;
import stdx.allocator : RCIAllocator, theAllocator;
RCIAllocator _a;
@safe this(int id) { _a = theAllocator; }
}

package static struct ImpureDtor
{
import std.experimental.allocator : RCIAllocator, theAllocator;
import stdx.allocator : RCIAllocator, theAllocator;
RCIAllocator _a;
@nogc nothrow pure @safe this(int x) {}
@safe ~this() { _a = theAllocator; }
Expand All @@ -434,9 +434,9 @@ version(unittest)

unittest
{
import std.experimental.allocator.mallocator;
import std.experimental.allocator.building_blocks.stats_collector;
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator.mallocator;
import stdx.allocator.building_blocks.stats_collector;
import stdx.allocator : RCIAllocator, RCISharedAllocator,
allocatorObject, sharedAllocatorObject, processAllocator, theAllocator;
import std.conv : to;
import std.stdio;
Expand Down Expand Up @@ -492,7 +492,7 @@ unittest

unittest
{
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator : RCIAllocator, RCISharedAllocator,
allocatorObject, sharedAllocatorObject, processAllocator, theAllocator;
import std.stdio;

Expand Down
14 changes: 7 additions & 7 deletions source/stdx/collections/dlist.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ debug(CollectionDList) import std.stdio;

version(unittest)
{
import std.experimental.allocator.mallocator;
import std.experimental.allocator.building_blocks.stats_collector;
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator.mallocator;
import stdx.allocator.building_blocks.stats_collector;
import stdx.allocator : RCIAllocator, RCISharedAllocator,
allocatorObject, sharedAllocatorObject;

private alias SCAlloc = StatsCollector!(Mallocator, Options.bytesUsed);
Expand All @@ -18,9 +18,9 @@ version(unittest)
///
struct DList(T)
{
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator : RCIAllocator, RCISharedAllocator,
theAllocator, processAllocator, make, dispose, stateSize;
import std.experimental.allocator.building_blocks.affix_allocator;
import stdx.allocator.building_blocks.affix_allocator;
import std.traits : isImplicitlyConvertible;
import std.range.primitives : isInputRange, ElementType;
import std.variant : Algebraic;
Expand Down Expand Up @@ -1684,7 +1684,7 @@ void testConstness(RCISharedAllocator allocator)
@safe unittest
{
import std.conv;
import std.experimental.allocator : processAllocator;
import stdx.allocator : processAllocator;
SCAlloc statsCollectorAlloc;
{
// TODO: StatsCollector need to be made shareable
Expand Down Expand Up @@ -1804,7 +1804,7 @@ void testWithStruct(RCIAllocator allocator, RCISharedAllocator sharedAlloc)
@safe unittest
{
import std.conv;
import std.experimental.allocator : processAllocator;
import stdx.allocator : processAllocator;
SCAlloc statsCollectorAlloc;
{
auto _allocator = (() @trusted => allocatorObject(&statsCollectorAlloc))();
Expand Down
10 changes: 5 additions & 5 deletions source/stdx/collections/hashtable.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ debug(CollectionHashtable) import std.stdio;

version(unittest)
{
import std.experimental.allocator.mallocator;
import std.experimental.allocator.building_blocks.stats_collector;
import std.experimental.allocator : allocatorObject,
import stdx.allocator.mallocator;
import stdx.allocator.building_blocks.stats_collector;
import stdx.allocator : allocatorObject,
RCIAllocator, RCISharedAllocator;

private alias SCAlloc = StatsCollector!(Mallocator, Options.bytesUsed);
Expand All @@ -18,7 +18,7 @@ version(unittest)
///
struct Hashtable(K, V)
{
import std.experimental.allocator : RCIAllocator, RCISharedAllocator;
import stdx.allocator : RCIAllocator, RCISharedAllocator;
import std.traits : isImplicitlyConvertible;
import std.typecons : Tuple, Nullable;
import std.algorithm.mutation : move;
Expand Down Expand Up @@ -92,7 +92,7 @@ public:
static if (is(K == int))
@safe unittest
{
import std.experimental.allocator : theAllocator, processAllocator;
import stdx.allocator : theAllocator, processAllocator;

auto h = Hashtable!(int, int)(theAllocator);
auto ch = const Hashtable!(int, int)(processAllocator);
Expand Down
10 changes: 5 additions & 5 deletions source/stdx/collections/rcstring.d
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ debug(CollectionRCString) import std.stdio;

version(unittest)
{
import std.experimental.allocator.mallocator;
import std.experimental.allocator.building_blocks.stats_collector;
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator.mallocator;
import stdx.allocator.building_blocks.stats_collector;
import stdx.allocator : RCIAllocator, RCISharedAllocator,
allocatorObject, sharedAllocatorObject;
import std.algorithm.mutation : move;
import std.stdio;
Expand Down Expand Up @@ -76,7 +76,7 @@ public:
///
@safe unittest
{
import std.experimental.allocator : theAllocator, processAllocator;
import stdx.allocator : theAllocator, processAllocator;

auto a = RCString(theAllocator);
auto ca = const RCString(processAllocator);
Expand Down Expand Up @@ -154,7 +154,7 @@ public:
///
@safe unittest
{
import std.experimental.allocator : theAllocator, processAllocator;
import stdx.allocator : theAllocator, processAllocator;

// Create a list from a list of ints
auto a = RCString(theAllocator, '1', '2', '3');
Expand Down
14 changes: 7 additions & 7 deletions source/stdx/collections/slist.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ debug(CollectionSList) import std.stdio;

version(unittest)
{
import std.experimental.allocator.mallocator;
import std.experimental.allocator.building_blocks.stats_collector;
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator.mallocator;
import stdx.allocator.building_blocks.stats_collector;
import stdx.allocator : RCIAllocator, RCISharedAllocator,
allocatorObject, sharedAllocatorObject;

private alias SCAlloc = StatsCollector!(Mallocator, Options.bytesUsed);
Expand All @@ -18,9 +18,9 @@ version(unittest)
///
struct SList(T)
{
import std.experimental.allocator : RCIAllocator, RCISharedAllocator,
import stdx.allocator : RCIAllocator, RCISharedAllocator,
theAllocator, processAllocator, make, dispose, stateSize;
import std.experimental.allocator.building_blocks.affix_allocator;
import stdx.allocator.building_blocks.affix_allocator;
import std.traits : isImplicitlyConvertible;
import std.range.primitives : isInputRange, ElementType;
import std.variant : Algebraic;
Expand Down Expand Up @@ -1189,7 +1189,7 @@ void testConstness(RCISharedAllocator allocator)
@safe unittest
{
import std.conv;
import std.experimental.allocator : processAllocator;
import stdx.allocator : processAllocator;
SCAlloc statsCollectorAlloc;
{
// TODO: StatsCollector need to be made shareable
Expand Down Expand Up @@ -1454,7 +1454,7 @@ void testWithStruct(RCIAllocator allocator, RCISharedAllocator sharedAlloc)
@safe unittest
{
import std.conv;
import std.experimental.allocator : processAllocator;
import stdx.allocator : processAllocator;
SCAlloc statsCollectorAlloc;
{
auto _allocator = (() @trusted => allocatorObject(&statsCollectorAlloc))();
Expand Down