Memmove(ref*(pDest+(uint)destIndex),refUnsafe.Add(refMemoryMarshal.GetArrayDataReference(src),(nint)(uint)srcIndex/* force zero-extension */),(uint)len);
returnnewSpan<T>(refUnsafe.Add(refMemoryMarshal.GetArrayDataReference(array),(nint)(uint)actualIndex/* force zero-extension */),array.Length-actualIndex);
}
}
/// <summary>
/// <summary>
...
@@ -79,7 +79,7 @@ public static Span<T> AsSpan<T>(this T[]? array, Range range)
...
@@ -79,7 +79,7 @@ public static Span<T> AsSpan<T>(this T[]? array, Range range)
((nuint)length)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.
((uint)length)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.
((nuint)length)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this API in such a case so we choose not to take the overhead of checking.
((uint)length)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this API in such a case so we choose not to take the overhead of checking.
((nuint)span.Length)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this API in such a case so we choose not to take the overhead of checking.
((uint)span.Length)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this API in such a case so we choose not to take the overhead of checking.
}
}
// Otherwise, compare each element using EqualityComparer<T>.Default.Equals in a way that will enable it to devirtualize.
// Otherwise, compare each element using EqualityComparer<T>.Default.Equals in a way that will enable it to devirtualize.
...
@@ -1024,7 +1024,7 @@ public static int SequenceCompareTo<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T
...
@@ -1024,7 +1024,7 @@ public static int SequenceCompareTo<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T
((nuint)valueLength)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.
((uint)valueLength)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.
((nuint)valueLength)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.
((uint)valueLength)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.
((nuint)valueLength)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.
((uint)valueLength)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.
((nuint)valueLength)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.
((uint)valueLength)*size);// If this multiplication overflows, the Span we got overflows the entire address range. There's no happy outcome for this api in such a case so we choose not to take the overhead of checking.