summaryrefslogtreecommitdiff
path: root/src/vm/commtmemberinfomap.cpp
diff options
context:
space:
mode:
authorDavid Wrighton <davidwr@microsoft.com>2019-05-20 15:15:52 -0700
committerGitHub <noreply@github.com>2019-05-20 15:15:52 -0700
commitadecd858f558489d8f52c9187fca395ec669a715 (patch)
treec2b597b90f4eeace4f5d898462b99f609531e1d7 /src/vm/commtmemberinfomap.cpp
parentf4ae8f0312890a7bc14c28764adb609820d86662 (diff)
downloadcoreclr-adecd858f558489d8f52c9187fca395ec669a715.tar.gz
coreclr-adecd858f558489d8f52c9187fca395ec669a715.tar.bz2
coreclr-adecd858f558489d8f52c9187fca395ec669a715.zip
Cuckoo metadata (#24498)
* Basic infra for cuckoo filter of attributes - Implement cuckoo filter lookup logic - Implement new ready to run section - Add dumper to R2RDump - Parse section on load into data structure - Implement function to query filter - Add concept of enum of well known attributes - So that attribute name hashes themselves may be cached * Wrap all even vaguely perf critical uses of attribute by name parsing with use of R2R data * Update emmintrin.h in the PAL header to contain the needed SSE2 intrinsics for the feature - Disable the presence table for non Corelib cases. Current performance data does not warrant the size increase in other generated binaries
Diffstat (limited to 'src/vm/commtmemberinfomap.cpp')
-rw-r--r--src/vm/commtmemberinfomap.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/vm/commtmemberinfomap.cpp b/src/vm/commtmemberinfomap.cpp
index e53cd2f525..f2a8e33a14 100644
--- a/src/vm/commtmemberinfomap.cpp
+++ b/src/vm/commtmemberinfomap.cpp
@@ -214,24 +214,15 @@ void ComMTMemberInfoMap::Init(size_t sizeOfPtr)
CONTRACTL_END;
HRESULT hr = S_OK;
- mdTypeDef td; // Token for the class.
BYTE const *pData; // Pointer to a custom attribute blob.
ULONG cbData; // Size of a custom attribute blob.
- // Get the TypeDef and some info about it.
- td = m_pMT->GetCl();
-
m_bHadDuplicateDispIds = FALSE;
// See if there is a default property.
m_DefaultProp[0] = 0; // init to 'none'.
- hr = m_pMT->GetMDImport()->GetCustomAttributeByName(
- td, INTEROP_DEFAULTMEMBER_TYPE, reinterpret_cast<const void**>(&pData), &cbData);
- if (hr == S_FALSE)
- {
- hr = m_pMT->GetMDImport()->GetCustomAttributeByName(
- td, "System.Reflection.DefaultMemberAttribute", reinterpret_cast<const void**>(&pData), &cbData);
- }
+ hr = m_pMT->GetCustomAttribute(
+ WellKnownAttribute::DefaultMember, reinterpret_cast<const void**>(&pData), &cbData);
if (hr == S_OK && cbData > 5 && pData[0] == 1 && pData[1] == 0)
{