diff --git a/.github/workflows/compilers.json b/.github/workflows/compilers.json index a737cdb0..b2ecda9c 100644 --- a/.github/workflows/compilers.json +++ b/.github/workflows/compilers.json @@ -2,9 +2,7 @@ "dmd-master", "dmd-latest", "dmd-beta", - "dmd-2.100.2", "ldc-master", "ldc-latest", - "ldc-beta", - "ldc-1.30.1" + "ldc-beta" ] \ No newline at end of file diff --git a/source/mir/bignum/internal/phobos_kernel.d b/source/mir/bignum/internal/phobos_kernel.d index 3457fc4f..4a77b30e 100644 --- a/source/mir/bignum/internal/phobos_kernel.d +++ b/source/mir/bignum/internal/phobos_kernel.d @@ -39,22 +39,19 @@ Idioms: */ module mir.bignum.internal.phobos_kernel; -static if (__VERSION__ > 2100) - version (D_InlineAsm_X86) - static import std.internal.math.biguintx86; +version (D_InlineAsm_X86) + static import std.internal.math.biguintx86; version (DMD) { - static if (__VERSION__ > 2100) - version (D_InlineAsm_X86) - version = HaveAsmVersion; + version (D_InlineAsm_X86) + version = HaveAsmVersion; } version (LDC) { - static if (__VERSION__ > 2100) - version (D_InlineAsm_X86) - version = HaveAsmVersion; + version (D_InlineAsm_X86) + version = HaveAsmVersion; version (ARM) { diff --git a/source/mir/serde.d b/source/mir/serde.d index 488bec3f..326242dd 100644 --- a/source/mir/serde.d +++ b/source/mir/serde.d @@ -417,25 +417,11 @@ immutable(string)[] serdeGetKeysIn(T)(const T value) @trusted pure nothrow @nogc import std.meta: staticMap; static immutable ret = [staticMap!(.serdeGetKeysIn, EnumMembers!T)]; - static if (__VERSION__ < 2093) - { - final switch (value) - { - foreach (i, member; EnumMembers!T) - { - case member: - return ret[i]; - } - } - } - else - { import mir.enums: getEnumIndex; uint index = void; if (getEnumIndex(value, index)) return ret[index]; assert(0); - } } /// @@ -527,21 +513,6 @@ string serdeGetKeyOut(T)(const T value) alias all = __traits(getAttributes, EnumMembers!T[i]); }} - static if (__VERSION__ < 2093) - { - import std.meta: staticMap; - static immutable ret = [staticMap!(.serdeGetKeyOut, EnumMembers!T)]; - final switch (value) - { - foreach (i, member; EnumMembers!T) - { - case member: - return ret[i]; - } - } - } - else - { import std.meta: staticMap; import mir.enums: getEnumIndex; static immutable ret = [staticMap!(.serdeGetKeyOut, EnumMembers!T)]; @@ -549,7 +520,6 @@ string serdeGetKeyOut(T)(const T value) if (getEnumIndex(value, index)) return ret[index]; assert(0); - } } /// diff --git a/source/mir/series.d b/source/mir/series.d index 1d2ad74d..87ca3bce 100644 --- a/source/mir/series.d +++ b/source/mir/series.d @@ -2598,96 +2598,3 @@ ref V[K] insert(V, K, IndexIterator, Iterator, size_t N, SliceKind kind)(return a.insert = s; assert(a.series == series([1, 2, 3, 4], [3.0, 20, 30, 2])); } - - -static if (__VERSION__ < 2078) -//////////////////// OBJECT.d -{ - -private: - -extern (C) -{ - // from druntime/src/rt/aaA.d - - // size_t _aaLen(in void* p) pure nothrow @nogc; - private void* _aaGetY(void** paa, const TypeInfo_AssociativeArray ti, in size_t valuesize, in void* pkey) pure nothrow; - // inout(void)* _aaGetRvalueX(inout void* p, in TypeInfo keyti, in size_t valuesize, in void* pkey); - inout(void)[] _aaValues(inout void* p, in size_t keysize, in size_t valuesize, const TypeInfo tiValArray) pure nothrow; - inout(void)[] _aaKeys(inout void* p, in size_t keysize, const TypeInfo tiKeyArray) pure nothrow; - void* _aaRehash(void** pp, in TypeInfo keyti) pure nothrow; - void _aaClear(void* p) pure nothrow; - - // alias _dg_t = extern(D) int delegate(void*); - // int _aaApply(void* aa, size_t keysize, _dg_t dg); - - // alias _dg2_t = extern(D) int delegate(void*, void*); - // int _aaApply2(void* aa, size_t keysize, _dg2_t dg); - - // private struct AARange { void* impl; size_t idx; } - alias AARange = ReturnType!(object._aaRange); - AARange _aaRange(void* aa) pure nothrow @nogc @safe; - bool _aaRangeEmpty(AARange r) pure nothrow @nogc @safe; - void* _aaRangeFrontKey(AARange r) pure nothrow @nogc @safe; - void* _aaRangeFrontValue(AARange r) pure nothrow @nogc @safe; - void _aaRangePopFront(ref AARange r) pure nothrow @nogc @safe; - -} - -auto byKeyValue(T : V[K], K, V)(T aa) pure nothrow @nogc @safe -{ - import core.internal.traits : substInout; - - static struct Result - { - AARange r; - - pure nothrow @nogc: - @property bool empty() @safe { return _aaRangeEmpty(r); } - @property auto front() - { - static struct Pair - { - // We save the pointers here so that the Pair we return - // won't mutate when Result.popFront is called afterwards. - private void* keyp; - private void* valp; - - @property ref key() inout - { - auto p = (() @trusted => cast(substInout!K*) keyp) (); - return *p; - }; - @property ref value() inout - { - auto p = (() @trusted => cast(substInout!V*) valp) (); - return *p; - }; - } - return Pair(_aaRangeFrontKey(r), - _aaRangeFrontValue(r)); - } - void popFront() @safe { return _aaRangePopFront(r); } - @property Result save() { return this; } - } - - return Result(_aaToRange(aa)); -} - -auto byKeyValue(T : V[K], K, V)(T* aa) pure nothrow @nogc -{ - return (*aa).byKeyValue(); -} - -// this should never be made public. -private AARange _aaToRange(T: V[K], K, V)(ref T aa) pure nothrow @nogc @safe -{ - // ensure we are dealing with a genuine AA. - static if (is(const(V[K]) == const(T))) - alias realAA = aa; - else - const(V[K]) realAA = aa; - return _aaRange(() @trusted { return cast(void*)realAA; } ()); -} - -} diff --git a/source/mir/string_map.d b/source/mir/string_map.d index 91668112..c05cb11b 100644 --- a/source/mir/string_map.d +++ b/source/mir/string_map.d @@ -1142,10 +1142,7 @@ version(mir_test) table["0"] = v0; table["1"] = v1; assert(table.keys == ["0", "1"]); - static if (__VERSION__ > 2098) // See https://github.com/libmir/mir-algorithm/runs/6809888795?check_suite_focus=true#step:5:17 - { - assert(table.values == [v0, v1]); // TODO: qualify unittest as `pure` when this is inferred `pure` - } + assert(table.values == [v0, v1]); // TODO: qualify unittest as `pure` when this is inferred `pure` static assert(is(typeof(table.values) == const(C)[])); }