From: Jan Kotas Date: Sun, 14 Apr 2019 03:15:48 +0000 (-0700) Subject: Delete unused AssemblyName._hashForControl and related code (dotnet/coreclr#23972) X-Git-Tag: submit/tizen/20210909.063632~11030^2~1856 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2bba98a2ee6d677af8a4839a6cadf9d6497dd62;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Delete unused AssemblyName._hashForControl and related code (dotnet/coreclr#23972) Commit migrated from https://github.com/dotnet/coreclr/commit/f704d7acd97e4ea691638e98d94588cc8dc5fd85 --- diff --git a/src/coreclr/src/vm/assemblyspec.cpp b/src/coreclr/src/vm/assemblyspec.cpp index b44cd26..ad2ebfd 100644 --- a/src/coreclr/src/vm/assemblyspec.cpp +++ b/src/coreclr/src/vm/assemblyspec.cpp @@ -434,13 +434,6 @@ HRESULT AssemblySpec::InitializeSpec(StackingAllocator* alloc, ASSEMBLYNAMEREF* CloneFieldsToStackingAllocator(alloc); - // Hash for control - // @TODO cts, can we use unsafe in this case!!! - if ((*pName)->GetHashForControl() != NULL) - SetHashForControl((*pName)->GetHashForControl()->GetDataPtr(), - (*pName)->GetHashForControl()->GetNumComponents(), - (*pName)->GetHashAlgorithmForControl()); - // Extract embedded WinRT name, if present. ParseEncodedName(); diff --git a/src/coreclr/src/vm/assemblyspec.hpp b/src/coreclr/src/vm/assemblyspec.hpp index 798f73c..a52c2fc 100644 --- a/src/coreclr/src/vm/assemblyspec.hpp +++ b/src/coreclr/src/vm/assemblyspec.hpp @@ -34,7 +34,6 @@ class AssemblySpec : public BaseAssemblySpec friend class AssemblyNameNative; AppDomain *m_pAppDomain; - SBuffer m_HashForControl; DWORD m_dwHashAlg; DomainAssembly *m_pParentAssembly; @@ -187,7 +186,6 @@ class AssemblySpec : public BaseAssemblySpec SetFallbackLoadContextBinderForRequestingAssembly(pSource->GetFallbackLoadContextBinderForRequestingAssembly()); m_fPreferFallbackLoadContextBinder = pSource->GetPreferFallbackLoadContextBinder(); - m_HashForControl = pSource->m_HashForControl; m_dwHashAlg = pSource->m_dwHashAlg; } @@ -248,21 +246,6 @@ class AssemblySpec : public BaseAssemblySpec return m_pAppDomain; } - HRESULT SetHashForControl(PBYTE pHashForControl, DWORD dwHashForControl, DWORD dwHashAlg) - { - CONTRACTL - { - THROWS; - GC_NOTRIGGER; - PRECONDITION(CheckPointer(pHashForControl)); - } - CONTRACTL_END; - - m_HashForControl.Set(pHashForControl, dwHashForControl); - m_dwHashAlg=dwHashAlg; - return S_OK; - } - void ParseEncodedName(); void SetWindowsRuntimeType(LPCUTF8 szNamespace, LPCUTF8 szClassName); diff --git a/src/coreclr/src/vm/mscorlib.h b/src/coreclr/src/vm/mscorlib.h index ccdec0f..ec96d5e 100644 --- a/src/coreclr/src/vm/mscorlib.h +++ b/src/coreclr/src/vm/mscorlib.h @@ -114,9 +114,7 @@ DEFINE_FIELD_U(_publicKeyToken, AssemblyNameBaseObject, _publicKeyTok DEFINE_FIELD_U(_cultureInfo, AssemblyNameBaseObject, _cultureInfo) DEFINE_FIELD_U(_codeBase, AssemblyNameBaseObject, _codeBase) DEFINE_FIELD_U(_version, AssemblyNameBaseObject, _version) -DEFINE_FIELD_U(_hashForControl, AssemblyNameBaseObject, _hashForControl) DEFINE_FIELD_U(_hashAlgorithm, AssemblyNameBaseObject, _hashAlgorithm) -DEFINE_FIELD_U(_hashAlgorithmForControl, AssemblyNameBaseObject, _hashAlgorithmForControl) DEFINE_FIELD_U(_versionCompatibility, AssemblyNameBaseObject, _versionCompatibility) DEFINE_FIELD_U(_flags, AssemblyNameBaseObject, _flags) DEFINE_CLASS(ASSEMBLY_NAME, Reflection, AssemblyName) diff --git a/src/coreclr/src/vm/object.h b/src/coreclr/src/vm/object.h index b9b7b3a..173036d 100644 --- a/src/coreclr/src/vm/object.h +++ b/src/coreclr/src/vm/object.h @@ -1678,9 +1678,7 @@ class AssemblyNameBaseObject : public Object OBJECTREF _codeBase; OBJECTREF _version; OBJECTREF _strongNameKeyPair; - U1ARRAYREF _hashForControl; DWORD _hashAlgorithm; - DWORD _hashAlgorithmForControl; DWORD _versionCompatibility; DWORD _flags; @@ -1698,8 +1696,6 @@ class AssemblyNameBaseObject : public Object OBJECTREF GetVersion() { LIMITED_METHOD_CONTRACT; return _version; } DWORD GetAssemblyHashAlgorithm() { LIMITED_METHOD_CONTRACT; return _hashAlgorithm; } DWORD GetFlags() { LIMITED_METHOD_CONTRACT; return _flags; } - U1ARRAYREF GetHashForControl() { LIMITED_METHOD_CONTRACT; return _hashForControl;} - DWORD GetHashAlgorithmForControl() { LIMITED_METHOD_CONTRACT; return _hashAlgorithmForControl; } }; // VersionBaseObject diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs index 89a6217..498a368 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs @@ -23,9 +23,7 @@ namespace System.Reflection private StrongNameKeyPair _strongNameKeyPair; - private byte[] _hashForControl; private AssemblyHashAlgorithm _hashAlgorithm; - private AssemblyHashAlgorithm _hashAlgorithmForControl; private AssemblyVersionCompatibility _versionCompatibility; private AssemblyNameFlags _flags; @@ -142,8 +140,6 @@ namespace System.Reflection _codeBase = _codeBase, _hashAlgorithm = _hashAlgorithm, _versionCompatibility = _versionCompatibility, - _hashForControl = _hashForControl, - _hashAlgorithmForControl = _hashAlgorithmForControl }; return name; }