@@ -31,7 +31,7 @@ public abstract class APersistentMap: AFn, IPersistentMap, IDictionary, IEnumera
3131 /// Caches the hash code, when computed.
3232 /// </summary>
3333 /// <remarks>The default value indicates that the hash code has not been computed yet.</remarks>
34- int _hash ;
34+ // int _hash;
3535
3636 /// <summary>
3737 /// Caches the hashseq code, when computed.
@@ -104,24 +104,25 @@ public static bool mapEquals(IPersistentMap m1, Object obj)
104104 /// <remarks>Valud-based = relies on all entries. Once computed, it is cached.</remarks>
105105 public override int GetHashCode ( )
106106 {
107- int cached = _hash ;
108- if ( cached == 0 )
109- _hash = cached = mapHash ( this ) ;
110- return cached ;
111- }
112-
113- [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Style" , "IDE1006:Naming Styles" , Justification = "ClojureJVM name match" ) ]
114- public static int mapHash ( IPersistentMap m )
115- {
116- int hash = 0 ;
117- for ( ISeq s = m . seq ( ) ; s != null ; s = s . next ( ) )
118- {
119- IMapEntry me = ( IMapEntry ) s . first ( ) ;
120- hash += ( me . key ( ) == null ? 0 : me . key ( ) . GetHashCode ( ) )
121- ^ ( me . val ( ) == null ? 0 : me . val ( ) . GetHashCode ( ) ) ;
122- }
123- return hash ;
124- }
107+ return hasheq ( ) ;
108+ //int cached = _hash;
109+ //if ( cached == 0 )
110+ // _hash = cached = mapHash(this);
111+ //return cached;
112+ }
113+
114+ //[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
115+ //public static int mapHash(IPersistentMap m)
116+ //{
117+ // int hash = 0;
118+ // for (ISeq s = m.seq(); s != null; s = s.next())
119+ // {
120+ // IMapEntry me = (IMapEntry)s.first();
121+ // hash += (me.key() == null ? 0 : me.key().GetHashCode())
122+ // ^ (me.val() == null ? 0 : me.val().GetHashCode());
123+ // }
124+ // return hash;
125+ //}
125126
126127
127128 #endregion
0 commit comments