summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-09-13 16:36:57 -0700
committerJan Kotas <jkotas@microsoft.com>2017-09-13 19:53:07 -0700
commitc96a8272bb8fad888156ca9194e8280e6f742fdf (patch)
treeb8fbc995582a4cd8785edb06be0ab2ca34460a5b
parent076ad303e467de51e67ec0dc206d7d66c14ed04d (diff)
downloadcoreclr-c96a8272bb8fad888156ca9194e8280e6f742fdf.tar.gz
coreclr-c96a8272bb8fad888156ca9194e8280e6f742fdf.tar.bz2
coreclr-c96a8272bb8fad888156ca9194e8280e6f742fdf.zip
Call the fast generic impl from the non-generic one where possible
-rw-r--r--src/mscorlib/src/System/Array.cs13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/mscorlib/src/System/Array.cs b/src/mscorlib/src/System/Array.cs
index 9a56ee99c7..b3fe489190 100644
--- a/src/mscorlib/src/System/Array.cs
+++ b/src/mscorlib/src/System/Array.cs
@@ -1657,22 +1657,15 @@ namespace System
if (r)
return;
- int i = index;
- int j = index + length - 1;
Object[] objArray = array as Object[];
if (objArray != null)
{
- while (i < j)
- {
- Object temp = objArray[i];
- objArray[i] = objArray[j];
- objArray[j] = temp;
- i++;
- j--;
- }
+ Array.Reverse<object>(objArray, index, length);
}
else
{
+ int i = index;
+ int j = index + length - 1;
while (i < j)
{
Object temp = array.GetValue(i);