Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
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
17 changes: 0 additions & 17 deletions src/core/internal/array/equality.d
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@

module core.internal.array.equality;

// compiler frontend lowers dynamic array comparison to this
bool __ArrayEq(T1, T2)(T1[] a, T2[] b)
{
if (a.length != b.length)
return false;
foreach (size_t i; 0 .. a.length)
{
if (a[i] != b[i])
return false;
}
return true;
}

// `lhs == rhs` lowers to `__equals(lhs, rhs)` for dynamic arrays
bool __equals(T1, T2)(T1[] lhs, T2[] rhs)
{
Expand Down Expand Up @@ -53,10 +40,6 @@ bool __equals(T1, T2)(T1[] lhs, T2[] rhs)
}
else static if (!is(U1 == U2))
{
// This should replace src/object.d _ArrayEq which
// compares arrays of different types such as long & int,
// char & wchar.
// Compiler lowers to __ArrayEq in dmd/src/opover.d
foreach (const u; 0 .. lhs.length)
{
if (at(lhs, u) != at(rhs, u))
Expand Down
1 change: 0 additions & 1 deletion src/object.d
Original file line number Diff line number Diff line change
Expand Up @@ -4003,7 +4003,6 @@ public import core.internal.array.appending : _d_arrayappendTImpl;
public import core.internal.array.appending : _d_arrayappendcTXImpl;
public import core.internal.array.comparison : __cmp;
public import core.internal.array.equality : __equals;
public import core.internal.array.equality : __ArrayEq;
public import core.internal.array.casting: __ArrayCast;
public import core.internal.array.concatenation : _d_arraycatnTXImpl;
public import core.internal.array.construction : _d_arrayctor;
Expand Down