diff options
author | Gleb Balykov <g.balykov@samsung.com> | 2017-06-21 19:48:49 +0300 |
---|---|---|
committer | Gleb Balykov <g.balykov@samsung.com> | 2017-07-10 16:37:05 +0300 |
commit | b4786838985ca249cca04a7d0676ae57ee61ca2b (patch) | |
tree | b6c6bff758708fb709d5f40432fe55b56c1c0f51 /src/vm/ceeload.h | |
parent | 74a3f9691e490e9732da55c46b678159c64fae74 (diff) | |
download | coreclr-b4786838985ca249cca04a7d0676ae57ee61ca2b.tar.gz coreclr-b4786838985ca249cca04a7d0676ae57ee61ca2b.tar.bz2 coreclr-b4786838985ca249cca04a7d0676ae57ee61ca2b.zip |
Remove relocations from SECTION_Readonly for fields not accessed from jit code on ARM
Diffstat (limited to 'src/vm/ceeload.h')
-rw-r--r-- | src/vm/ceeload.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/vm/ceeload.h b/src/vm/ceeload.h index 0896c9b8ab..15d7959433 100644 --- a/src/vm/ceeload.h +++ b/src/vm/ceeload.h @@ -618,7 +618,7 @@ struct ModuleCtorInfo DWORD numElements; DWORD numLastAllocated; DWORD numElementsHot; - DPTR(PTR_MethodTable) ppMT; // size is numElements + DPTR(RelativePointer<PTR_MethodTable>) ppMT; // size is numElements PTR_ClassCtorInfoEntry cctorInfoHot; // size is numElementsHot PTR_ClassCtorInfoEntry cctorInfoCold; // size is numElements-numElementsHot @@ -627,8 +627,8 @@ struct ModuleCtorInfo DWORD numHotHashes; DWORD numColdHashes; - ArrayDPTR(FixupPointer<PTR_MethodTable>) ppHotGCStaticsMTs; // hot table - ArrayDPTR(FixupPointer<PTR_MethodTable>) ppColdGCStaticsMTs; // cold table + ArrayDPTR(RelativeFixupPointer<PTR_MethodTable>) ppHotGCStaticsMTs; // hot table + ArrayDPTR(RelativeFixupPointer<PTR_MethodTable>) ppColdGCStaticsMTs; // cold table DWORD numHotGCStaticsMTs; DWORD numColdGCStaticsMTs; @@ -664,7 +664,13 @@ struct ModuleCtorInfo return hashVal; }; - ArrayDPTR(FixupPointer<PTR_MethodTable>) GetGCStaticMTs(DWORD index); + ArrayDPTR(RelativeFixupPointer<PTR_MethodTable>) GetGCStaticMTs(DWORD index); + + PTR_MethodTable GetMT(DWORD i) + { + LIMITED_METHOD_DAC_CONTRACT; + return ppMT[i].GetValue(dac_cast<TADDR>(ppMT) + i * sizeof(RelativePointer<PTR_MethodTable>)); + } #ifdef FEATURE_PREJIT @@ -675,11 +681,11 @@ struct ModuleCtorInfo class ClassCtorInfoEntryArraySort : public CQuickSort<DWORD> { private: - PTR_MethodTable *m_pBase1; + DPTR(RelativePointer<PTR_MethodTable>) m_pBase1; public: //Constructor - ClassCtorInfoEntryArraySort(DWORD *base, PTR_MethodTable *base1, int count) + ClassCtorInfoEntryArraySort(DWORD *base, DPTR(RelativePointer<PTR_MethodTable>) base1, int count) : CQuickSort<DWORD>(base, count) { WRAPPER_NO_CONTRACT; @@ -700,6 +706,7 @@ struct ModuleCtorInfo return 1; } +#ifndef DACCESS_COMPILE // Swap is overwriten so that we can sort both the MethodTable pointer // array and the ClassCtorInfoEntry array in parrallel. FORCEINLINE void Swap(SSIZE_T iFirst, SSIZE_T iSecond) @@ -715,10 +722,11 @@ struct ModuleCtorInfo m_pBase[iFirst] = m_pBase[iSecond]; m_pBase[iSecond] = sTemp; - sTemp1 = m_pBase1[iFirst]; - m_pBase1[iFirst] = m_pBase1[iSecond]; - m_pBase1[iSecond] = sTemp1; + sTemp1 = m_pBase1[iFirst].GetValueMaybeNull(); + m_pBase1[iFirst].SetValueMaybeNull(m_pBase1[iSecond].GetValueMaybeNull()); + m_pBase1[iSecond].SetValueMaybeNull(sTemp1); } +#endif // !DACCESS_COMPILE }; #endif // FEATURE_PREJIT }; |