Move memory/package.d into memory.allocator
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* Event loop implementation for Linux.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
@ -30,7 +30,7 @@ import tanya.async.protocol;
|
||||
import tanya.async.transport;
|
||||
import tanya.async.watcher;
|
||||
import tanya.container.array;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.network.socket;
|
||||
|
||||
extern (C) nothrow @nogc
|
||||
|
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* Event loop implementation for Windows.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
@ -26,7 +26,7 @@ import tanya.async.protocol;
|
||||
import tanya.async.transport;
|
||||
import tanya.async.watcher;
|
||||
import tanya.container.buffer;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.network.socket;
|
||||
import tanya.sys.windows.winbase;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
/*
|
||||
* Event loop implementation for *BSD.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
@ -58,7 +58,7 @@ import tanya.async.loop;
|
||||
import tanya.async.transport;
|
||||
import tanya.async.watcher;
|
||||
import tanya.container.array;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.network.socket;
|
||||
|
||||
void EV_SET(kevent_t* kevp, typeof(kevent_t.tupleof) args) pure nothrow @nogc
|
||||
|
@ -5,7 +5,7 @@
|
||||
/*
|
||||
* This module contains base implementations for reactor event loops.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
@ -25,7 +25,7 @@ import tanya.async.transport;
|
||||
import tanya.async.watcher;
|
||||
import tanya.container.array;
|
||||
import tanya.container.buffer;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.network.socket;
|
||||
|
||||
/**
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* Note: Available only on Windows.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
|
@ -62,7 +62,7 @@
|
||||
* }
|
||||
* ---
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
@ -77,7 +77,7 @@ import tanya.async.watcher;
|
||||
import tanya.bitmanip;
|
||||
import tanya.container.buffer;
|
||||
import tanya.container.list;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.network.socket;
|
||||
|
||||
version (DisableBackends)
|
||||
|
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* This package provides asynchronous capabilities.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
|
@ -9,7 +9,7 @@
|
||||
* When an event from the network arrives, a protocol method gets
|
||||
* called and can respond to the event.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
|
@ -6,7 +6,7 @@
|
||||
* This module contains transports which are responsible for data dilvery
|
||||
* between two parties of an asynchronous communication.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
|
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* Watchers register user's interest in some event.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
@ -19,7 +19,7 @@ import tanya.async.protocol;
|
||||
import tanya.async.transport;
|
||||
import tanya.container.buffer;
|
||||
import tanya.container.list;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.network.socket;
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,8 @@ module tanya.container.array;
|
||||
import core.checkedint;
|
||||
import tanya.algorithm.comparison;
|
||||
import tanya.algorithm.mutation;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.range;
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
module tanya.container.buffer;
|
||||
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.meta.trait;
|
||||
|
||||
version (unittest)
|
||||
|
@ -18,7 +18,8 @@ import tanya.algorithm.mutation;
|
||||
import tanya.container.array;
|
||||
import tanya.container.entry;
|
||||
import tanya.hash.lookup;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.range.primitive;
|
||||
|
@ -17,7 +17,8 @@ module tanya.container.list;
|
||||
|
||||
import tanya.algorithm.comparison;
|
||||
import tanya.container.entry;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.range.array;
|
||||
|
@ -18,7 +18,8 @@ module tanya.container.set;
|
||||
import tanya.container.array;
|
||||
import tanya.container.entry;
|
||||
import tanya.hash.lookup;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.range.primitive;
|
||||
|
@ -29,7 +29,8 @@ module tanya.container.string;
|
||||
import tanya.algorithm.comparison;
|
||||
import tanya.algorithm.mutation;
|
||||
import tanya.hash.lookup;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.range.array;
|
||||
|
@ -15,7 +15,7 @@
|
||||
module tanya.conv;
|
||||
|
||||
import tanya.container.string;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
deprecated("Use tanya.memory.lifetime.emplace instead")
|
||||
public import tanya.memory.lifetime : emplace;
|
||||
import tanya.meta.trait;
|
||||
@ -64,12 +64,8 @@ if (isInputRange!R
|
||||
&& isSomeChar!(ElementType!R)
|
||||
&& isIntegral!T
|
||||
&& isUnsigned!T)
|
||||
in
|
||||
{
|
||||
assert(base >= 2);
|
||||
assert(base <= 36);
|
||||
}
|
||||
do
|
||||
in (base >= 2)
|
||||
in (base <= 36)
|
||||
{
|
||||
T boundary = cast(T) (T.max / base);
|
||||
if (range.empty)
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Source: $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/exception.d,
|
||||
* tanya/exception.d)
|
||||
*/
|
||||
deprecated("Use tanya.memory.lifetimeinstead")
|
||||
deprecated("Use tanya.memory.allocator instead")
|
||||
module tanya.exception;
|
||||
|
||||
public import tanya.memory.lifetime : onOutOfMemoryError, OutOfMemoryError;
|
||||
public import tanya.memory.allocator : onOutOfMemoryError, OutOfMemoryError;
|
||||
|
@ -1175,11 +1175,7 @@ private struct uint128
|
||||
}
|
||||
|
||||
Tuple!(uint128, uint128) divMod(ulong rhs) const @nogc nothrow pure @safe
|
||||
in
|
||||
{
|
||||
assert(rhs != uint128(), "Division by 0");
|
||||
}
|
||||
do
|
||||
in (rhs != uint128(), "Division by 0")
|
||||
{
|
||||
if (rhs == 1)
|
||||
{
|
||||
@ -1279,11 +1275,7 @@ private int indexMismatch(ulong low, ulong high) @nogc nothrow pure @safe
|
||||
private char[] errol2(double value,
|
||||
return ref char[512] buffer,
|
||||
out int exponent) @nogc nothrow pure @safe
|
||||
in
|
||||
{
|
||||
assert(value > 9.007199254740992e15 && value < 3.40282366920938e38);
|
||||
}
|
||||
do
|
||||
in (value > 9.007199254740992e15 && value < 3.40282366920938e38)
|
||||
{
|
||||
auto v = uint128(value);
|
||||
auto leftBoundary = v + raise2ToExp((value - previous(value)) / 2.0);
|
||||
@ -1368,11 +1360,7 @@ do
|
||||
private char[] errolFixed(double value,
|
||||
return ref char[512] buffer,
|
||||
out int exponent) @nogc nothrow pure @safe
|
||||
in
|
||||
{
|
||||
assert(value >= 16.0 && value <= 9.007199254740992e15);
|
||||
}
|
||||
do
|
||||
in (value >= 16.0 && value <= 9.007199254740992e15)
|
||||
{
|
||||
auto decimal = cast(ulong) value;
|
||||
auto n = cast(double) decimal;
|
||||
|
@ -19,7 +19,8 @@ import tanya.algorithm.iteration;
|
||||
import tanya.algorithm.mutation;
|
||||
import tanya.container.array;
|
||||
import tanya.encoding.ascii;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.range;
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
module tanya.math.random;
|
||||
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.typecons;
|
||||
|
||||
/// Maximum amount gathered from the entropy sources.
|
||||
|
@ -16,7 +16,7 @@ module tanya.net.uri;
|
||||
|
||||
import tanya.conv;
|
||||
import tanya.encoding.ascii;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
|
||||
/**
|
||||
* Thrown if an invalid URI was specified.
|
||||
|
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* Network programming.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
|
@ -41,7 +41,7 @@
|
||||
* For an example of an asynchronous server refer to the documentation of the
|
||||
* $(D_PSYMBOL tanya.async.loop) module.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
@ -55,7 +55,7 @@ import core.time;
|
||||
public import std.socket : SocketOption, SocketOptionLevel;
|
||||
import tanya.algorithm.comparison;
|
||||
import tanya.bitmanip;
|
||||
import tanya.memory;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.meta.trait;
|
||||
import tanya.os.error;
|
||||
|
||||
|
@ -296,11 +296,7 @@ struct Option(T)
|
||||
/// ditto
|
||||
bool opEquals(U)(auto ref const U that) const
|
||||
if (ifTestable!(U, a => a == T.init) && !is(U == Option))
|
||||
in
|
||||
{
|
||||
assert(!isNothing);
|
||||
}
|
||||
do
|
||||
in (!isNothing)
|
||||
{
|
||||
return get == that;
|
||||
}
|
||||
|
Reference in New Issue
Block a user