Get rid of "#if FEATURE_RANDOMIZED_STRING_HASHING" in shared partition. (dotnet/corec...
authorAtsushi Kanamori <AtsushiKan@users.noreply.github.com>
Mon, 10 Apr 2017 17:14:09 +0000 (10:14 -0700)
committerJan Kotas <jkotas@microsoft.com>
Mon, 10 Apr 2017 17:14:09 +0000 (10:14 -0700)
commit6b2d0175d98d3853b51d90c760630cbac1fad556
tree48ebf004a1c72c0451b7b8800686aea1484ade14
parentf98ca2a9253cc63b0f5b8aa5a8567b071d3b50b2
Get rid of "#if FEATURE_RANDOMIZED_STRING_HASHING" in shared partition. (dotnet/coreclr#10851)

Since CoreCLR defines it (for now) and CoreRT doesn't, let's not have
"#if's" on this in shared code. It just creates confusion.

The only ones are in StringComparer.cs and fortunately, they are quite
expendable as...

1. It's only purpose is serialize Hashtables and Dictionaries in
   a way that CLR 1.1 can deserialize them. We don't care about that in
   .NET Core.

2. In CoreCLR as of today, this infrastructure is not changing the serialization
   blob one iota since all the GetEqualityComparerForSerialization() methods
   return "this."

So this removes the appearance of downgrading the comparers to non-randomized
versions for serialization purposes (and yes, we could go on and remove
all the other "let's do it for Everett and RTM" stuff in Hashtable.cs, but
I want to keep this PR on topic. Hashtable.cs is not going to be imported
into CoreRT so it's low priority for me.)

Commit migrated from https://github.com/dotnet/coreclr/commit/1a32d7f2c1be31741c3e71fe35eb2fd22664d12c
src/coreclr/src/mscorlib/shared/System/StringComparer.cs
src/coreclr/src/mscorlib/src/System/Collections/Generic/Dictionary.cs
src/coreclr/src/mscorlib/src/System/Collections/Hashtable.cs