Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/coreclr/vm/class.h
Original file line number Diff line number Diff line change
Expand Up @@ -1518,15 +1518,15 @@ class EEClass // DO NOT CREATE A NEW EEClass USING NEW!
{
SUPPORTS_DAC;
WRAPPER_NO_CONTRACT;
return HasOptionalFields() ? GetOptionalFields()->m_pDictLayout : NULL;
return HasOptionalFields() ? VolatileLoad(&GetOptionalFields()->m_pDictLayout) : NULL;
}

void SetDictionaryLayout(PTR_DictionaryLayout pLayout)
{
SUPPORTS_DAC;
WRAPPER_NO_CONTRACT;
_ASSERTE(HasOptionalFields());
GetOptionalFields()->m_pDictLayout = pLayout;
VolatileStore(&GetOptionalFields()->m_pDictLayout, pLayout);
}

#ifndef DACCESS_COMPILE
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/vm/method.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3799,7 +3799,7 @@ class InstantiatedMethodDesc final : public MethodDesc
PTR_DictionaryLayout GetDictLayoutRaw()
{
LIMITED_METHOD_DAC_CONTRACT;
return m_pDictLayout;
return VolatileLoad(&m_pDictLayout);
}

PTR_MethodDesc IMD_GetWrappedMethodDesc()
Expand All @@ -3818,10 +3818,10 @@ class InstantiatedMethodDesc final : public MethodDesc
if (IMD_IsWrapperStubWithInstantiations() && IMD_HasMethodInstantiation())
{
InstantiatedMethodDesc* pIMD = IMD_GetWrappedMethodDesc()->AsInstantiatedMethodDesc();
return pIMD->m_pDictLayout;
return VolatileLoad(&pIMD->m_pDictLayout);
}
else if (IMD_IsSharedByGenericMethodInstantiations())
return m_pDictLayout;
return VolatileLoad(&m_pDictLayout);
else
return NULL;
}
Expand All @@ -3832,11 +3832,11 @@ class InstantiatedMethodDesc final : public MethodDesc
if (IMD_IsWrapperStubWithInstantiations() && IMD_HasMethodInstantiation())
{
InstantiatedMethodDesc* pIMD = IMD_GetWrappedMethodDesc()->AsInstantiatedMethodDesc();
pIMD->m_pDictLayout = pNewLayout;
VolatileStore(&pIMD->m_pDictLayout, pNewLayout);
}
else if (IMD_IsSharedByGenericMethodInstantiations())
{
m_pDictLayout = pNewLayout;
VolatileStore(&m_pDictLayout, pNewLayout);
}
}
#endif // !DACCESS_COMPILE
Expand Down
Loading