From 1d8486e845c84ab2b08e8624723f6ade12be0948 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Sun, 15 Sep 2019 20:45:13 -0400 Subject: [PATCH] [netcore] Change an ArrayList to a List. (mono/mono#16842) * [netcore] Change an ArrayList to a List. * [netcore] Call the generic version of Array.IndexOf () in the ICollection wrappers. Update exclusions file. Commit migrated from https://github.com/mono/mono/commit/cdb04c042f1e57053047e28373ef35fe2a898270 --- .../src/LinkerDescriptor/System.Private.CoreLib.xml | 21 +++++++++++++++++---- .../src/System.Reflection.Emit/ILGenerator.cs | 5 ++--- .../System.Private.CoreLib/src/System/Array.cs | 4 ++-- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/mono/netcore/System.Private.CoreLib/src/LinkerDescriptor/System.Private.CoreLib.xml b/src/mono/netcore/System.Private.CoreLib/src/LinkerDescriptor/System.Private.CoreLib.xml index 8ab7011..548692c 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/LinkerDescriptor/System.Private.CoreLib.xml +++ b/src/mono/netcore/System.Private.CoreLib/src/LinkerDescriptor/System.Private.CoreLib.xml @@ -63,6 +63,11 @@ + + + + + @@ -136,6 +141,10 @@ + + + + @@ -153,7 +162,7 @@ --> - + @@ -185,7 +194,7 @@ - + @@ -267,7 +276,7 @@ - + @@ -350,7 +359,10 @@ - + + + + @@ -760,6 +772,7 @@ + diff --git a/src/mono/netcore/System.Private.CoreLib/src/System.Reflection.Emit/ILGenerator.cs b/src/mono/netcore/System.Private.CoreLib/src/System.Reflection.Emit/ILGenerator.cs index 5f19d65..4a513c5 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System.Reflection.Emit/ILGenerator.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System.Reflection.Emit/ILGenerator.cs @@ -34,7 +34,6 @@ #if MONO_FEATURE_SRE using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics.SymbolStore; using System.Runtime.InteropServices; @@ -231,7 +230,7 @@ namespace System.Reflection.Emit { const int defaultLabelsSize = 4; const int defaultExceptionStackSize = 2; - ArrayList sequencePointLists; + List sequencePointLists; SequencePointList currentSequence; internal ILGenerator (Module m, TokenGenerator token_gen, int size) @@ -908,7 +907,7 @@ namespace System.Reflection.Emit { { if (currentSequence == null || currentSequence.Document != document) { if (sequencePointLists == null) - sequencePointLists = new ArrayList (); + sequencePointLists = new List (); currentSequence = new SequencePointList (document); sequencePointLists.Add (currentSequence); } diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Array.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Array.cs index a9b2015..403fccf 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System/Array.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System/Array.cs @@ -553,7 +553,7 @@ namespace System internal bool InternalArray__ICollection_Contains (T item) { - return IndexOf (this, item, 0, Length) >= 0; + return IndexOf ((T[])this, item, 0, Length) >= 0; } internal void InternalArray__ICollection_CopyTo (T[] array, int arrayIndex) @@ -588,7 +588,7 @@ namespace System internal int InternalArray__IndexOf (T item) { - return IndexOf (this, item, 0, Length); + return IndexOf ((T[])this, item, 0, Length); } internal T InternalArray__get_Item (int index) -- 2.7.4