Reorder fields to improve object layout since the runtime can't do it for corlib...
[mono.git] / mcs / class / corlib / System.Collections / Hashtable.cs
index 9e297fef6d12d84cc922b85c56f4871cf3c603fd..ddb8d3fc9d0ddf1724a35e68ee47a33fc8f3ca21 100644 (file)
@@ -78,25 +78,22 @@ namespace System.Collections {
                const int CHAIN_MARKER  = ~Int32.MaxValue;
 
 
-               private int inUse;
-               private int modificationCount;
-               private float loadFactor;
                private Slot [] table;
                // Hashcodes of the corresponding entries in the slot table. Kept separate to
                // help the GC
                private int [] hashes;
-
-               private int threshold;
-       
                private HashKeys hashKeys;
                private HashValues hashValues;
-
                private IHashCodeProvider hcpRef;
                private IComparer comparerRef;
                private SerializationInfo serializationInfo;
-
                private IEqualityComparer equalityComparer;
 
+               private int inUse;
+               private int modificationCount;
+               private float loadFactor;
+               private int threshold;
+
                private static readonly int [] primeTbl = {
                        11,
                        19,
@@ -859,14 +856,14 @@ namespace System.Collections {
                private sealed class Enumerator : IDictionaryEnumerator, IEnumerator {
 
                        private Hashtable host;
+                       private Object currentKey;
+                       private Object currentValue;
+
                        private int stamp;
                        private int pos;
                        private int size;
                        private EnumeratorMode mode;
 
-                       private Object currentKey;
-                       private Object currentValue;
-
                        private readonly static string xstr = "Hashtable.Enumerator: snapshot out of sync.";
 
                        public Enumerator (Hashtable host, EnumeratorMode mode) {