Skip to content

Commit e888555

Browse files
committed
update compilers
1 parent 41ee85b commit e888555

File tree

5 files changed

+8
-139
lines changed

5 files changed

+8
-139
lines changed

.github/workflows/compilers.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"dmd-master",
33
"dmd-latest",
44
"dmd-beta",
5-
"dmd-2.100.2",
65
"ldc-master",
76
"ldc-latest",
8-
"ldc-beta",
9-
"ldc-1.30.1"
7+
"ldc-beta"
108
]

source/mir/bignum/internal/phobos_kernel.d

+6-9
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,19 @@ Idioms:
3939
*/
4040
module mir.bignum.internal.phobos_kernel;
4141

42-
static if (__VERSION__ > 2100)
43-
version (D_InlineAsm_X86)
44-
static import std.internal.math.biguintx86;
42+
version (D_InlineAsm_X86)
43+
static import std.internal.math.biguintx86;
4544

4645
version (DMD)
4746
{
48-
static if (__VERSION__ > 2100)
49-
version (D_InlineAsm_X86)
50-
version = HaveAsmVersion;
47+
version (D_InlineAsm_X86)
48+
version = HaveAsmVersion;
5149
}
5250

5351
version (LDC)
5452
{
55-
static if (__VERSION__ > 2100)
56-
version (D_InlineAsm_X86)
57-
version = HaveAsmVersion;
53+
version (D_InlineAsm_X86)
54+
version = HaveAsmVersion;
5855

5956
version (ARM)
6057
{

source/mir/serde.d

-30
Original file line numberDiff line numberDiff line change
@@ -417,25 +417,11 @@ immutable(string)[] serdeGetKeysIn(T)(const T value) @trusted pure nothrow @nogc
417417

418418
import std.meta: staticMap;
419419
static immutable ret = [staticMap!(.serdeGetKeysIn, EnumMembers!T)];
420-
static if (__VERSION__ < 2093)
421-
{
422-
final switch (value)
423-
{
424-
foreach (i, member; EnumMembers!T)
425-
{
426-
case member:
427-
return ret[i];
428-
}
429-
}
430-
}
431-
else
432-
{
433420
import mir.enums: getEnumIndex;
434421
uint index = void;
435422
if (getEnumIndex(value, index))
436423
return ret[index];
437424
assert(0);
438-
}
439425
}
440426

441427
///
@@ -527,29 +513,13 @@ string serdeGetKeyOut(T)(const T value)
527513
alias all = __traits(getAttributes, EnumMembers!T[i]);
528514
}}
529515

530-
static if (__VERSION__ < 2093)
531-
{
532-
import std.meta: staticMap;
533-
static immutable ret = [staticMap!(.serdeGetKeyOut, EnumMembers!T)];
534-
final switch (value)
535-
{
536-
foreach (i, member; EnumMembers!T)
537-
{
538-
case member:
539-
return ret[i];
540-
}
541-
}
542-
}
543-
else
544-
{
545516
import std.meta: staticMap;
546517
import mir.enums: getEnumIndex;
547518
static immutable ret = [staticMap!(.serdeGetKeyOut, EnumMembers!T)];
548519
uint index = void;
549520
if (getEnumIndex(value, index))
550521
return ret[index];
551522
assert(0);
552-
}
553523
}
554524

555525
///

source/mir/series.d

-93
Original file line numberDiff line numberDiff line change
@@ -2598,96 +2598,3 @@ ref V[K] insert(V, K, IndexIterator, Iterator, size_t N, SliceKind kind)(return
25982598
a.insert = s;
25992599
assert(a.series == series([1, 2, 3, 4], [3.0, 20, 30, 2]));
26002600
}
2601-
2602-
2603-
static if (__VERSION__ < 2078)
2604-
//////////////////// OBJECT.d
2605-
{
2606-
2607-
private:
2608-
2609-
extern (C)
2610-
{
2611-
// from druntime/src/rt/aaA.d
2612-
2613-
// size_t _aaLen(in void* p) pure nothrow @nogc;
2614-
private void* _aaGetY(void** paa, const TypeInfo_AssociativeArray ti, in size_t valuesize, in void* pkey) pure nothrow;
2615-
// inout(void)* _aaGetRvalueX(inout void* p, in TypeInfo keyti, in size_t valuesize, in void* pkey);
2616-
inout(void)[] _aaValues(inout void* p, in size_t keysize, in size_t valuesize, const TypeInfo tiValArray) pure nothrow;
2617-
inout(void)[] _aaKeys(inout void* p, in size_t keysize, const TypeInfo tiKeyArray) pure nothrow;
2618-
void* _aaRehash(void** pp, in TypeInfo keyti) pure nothrow;
2619-
void _aaClear(void* p) pure nothrow;
2620-
2621-
// alias _dg_t = extern(D) int delegate(void*);
2622-
// int _aaApply(void* aa, size_t keysize, _dg_t dg);
2623-
2624-
// alias _dg2_t = extern(D) int delegate(void*, void*);
2625-
// int _aaApply2(void* aa, size_t keysize, _dg2_t dg);
2626-
2627-
// private struct AARange { void* impl; size_t idx; }
2628-
alias AARange = ReturnType!(object._aaRange);
2629-
AARange _aaRange(void* aa) pure nothrow @nogc @safe;
2630-
bool _aaRangeEmpty(AARange r) pure nothrow @nogc @safe;
2631-
void* _aaRangeFrontKey(AARange r) pure nothrow @nogc @safe;
2632-
void* _aaRangeFrontValue(AARange r) pure nothrow @nogc @safe;
2633-
void _aaRangePopFront(ref AARange r) pure nothrow @nogc @safe;
2634-
2635-
}
2636-
2637-
auto byKeyValue(T : V[K], K, V)(T aa) pure nothrow @nogc @safe
2638-
{
2639-
import core.internal.traits : substInout;
2640-
2641-
static struct Result
2642-
{
2643-
AARange r;
2644-
2645-
pure nothrow @nogc:
2646-
@property bool empty() @safe { return _aaRangeEmpty(r); }
2647-
@property auto front()
2648-
{
2649-
static struct Pair
2650-
{
2651-
// We save the pointers here so that the Pair we return
2652-
// won't mutate when Result.popFront is called afterwards.
2653-
private void* keyp;
2654-
private void* valp;
2655-
2656-
@property ref key() inout
2657-
{
2658-
auto p = (() @trusted => cast(substInout!K*) keyp) ();
2659-
return *p;
2660-
};
2661-
@property ref value() inout
2662-
{
2663-
auto p = (() @trusted => cast(substInout!V*) valp) ();
2664-
return *p;
2665-
};
2666-
}
2667-
return Pair(_aaRangeFrontKey(r),
2668-
_aaRangeFrontValue(r));
2669-
}
2670-
void popFront() @safe { return _aaRangePopFront(r); }
2671-
@property Result save() { return this; }
2672-
}
2673-
2674-
return Result(_aaToRange(aa));
2675-
}
2676-
2677-
auto byKeyValue(T : V[K], K, V)(T* aa) pure nothrow @nogc
2678-
{
2679-
return (*aa).byKeyValue();
2680-
}
2681-
2682-
// this should never be made public.
2683-
private AARange _aaToRange(T: V[K], K, V)(ref T aa) pure nothrow @nogc @safe
2684-
{
2685-
// ensure we are dealing with a genuine AA.
2686-
static if (is(const(V[K]) == const(T)))
2687-
alias realAA = aa;
2688-
else
2689-
const(V[K]) realAA = aa;
2690-
return _aaRange(() @trusted { return cast(void*)realAA; } ());
2691-
}
2692-
2693-
}

source/mir/string_map.d

+1-4
Original file line numberDiff line numberDiff line change
@@ -1142,10 +1142,7 @@ version(mir_test)
11421142
table["0"] = v0;
11431143
table["1"] = v1;
11441144
assert(table.keys == ["0", "1"]);
1145-
static if (__VERSION__ > 2098) // See https://github.com/libmir/mir-algorithm/runs/6809888795?check_suite_focus=true#step:5:17
1146-
{
1147-
assert(table.values == [v0, v1]); // TODO: qualify unittest as `pure` when this is inferred `pure`
1148-
}
1145+
assert(table.values == [v0, v1]); // TODO: qualify unittest as `pure` when this is inferred `pure`
11491146
static assert(is(typeof(table.values) == const(C)[]));
11501147
}
11511148

0 commit comments

Comments
 (0)