Unify LazyInitializers with CoreRT (dotnet/coreclr#12697)
authorJan Kotas <jkotas@microsoft.com>
Sun, 9 Jul 2017 18:22:23 +0000 (20:22 +0200)
committerGitHub <noreply@github.com>
Sun, 9 Jul 2017 18:22:23 +0000 (20:22 +0200)
commit65057bd7d170ca36b7e43bad0a617dfe8202ea92
tree3cf56805aecb0f85d5b82344f20316b6f81a8b51
parent592dfd1ee4aa4be086285ad41928930bc4cb2ba2
Unify LazyInitializers with CoreRT (dotnet/coreclr#12697)

CoreCLR implementation cached s_activatorFactorySelector delegate, but CoreRT did not cache it - it got commented out during earlier AOT binary size optimization efforts. I have unified it by avoiding s_activatorFactorySelector delegate altogether to keep the best of both.

Commit migrated from https://github.com/dotnet/coreclr/commit/19042a92989904d1502d1f14798ade735ee1836a
src/coreclr/src/mscorlib/System.Private.CoreLib.csproj
src/coreclr/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems
src/coreclr/src/mscorlib/shared/System/Threading/LazyInitializer.cs [new file with mode: 0644]
src/coreclr/src/mscorlib/src/System/Threading/LazyInitializer.cs
src/coreclr/src/vm/appdomain.cpp
src/coreclr/src/vm/mscorlib.h