diff options
author | Jan Kotas <jkotas@microsoft.com> | 2019-04-18 19:57:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 19:57:17 -0700 |
commit | b7167889bc94c084527f184f852b867b2a1c1d56 (patch) | |
tree | 2e1a66620de41a35e72e0da27038121f6c0e3acf /src/utilcode | |
parent | 4686029068df93a6a54ae27d3363ff62b1e5515b (diff) | |
download | coreclr-b7167889bc94c084527f184f852b867b2a1c1d56.tar.gz coreclr-b7167889bc94c084527f184f852b867b2a1c1d56.tar.bz2 coreclr-b7167889bc94c084527f184f852b867b2a1c1d56.zip |
Move R2R-specific code to be outside FEATURE_PREJIT (#24075)
This refactoring is preparation for disabling fragile NGen support in the runtime. It keeps fragile-NGen specific code under FEATURE_PREJIT and moves the code required to support R2R to be outside FEATURE_PREJIT.
The eventual goal is to compile the runtime without FEATURE_PREJIT defined to avoid fragile-NGen specific overhead.
Diffstat (limited to 'src/utilcode')
-rw-r--r-- | src/utilcode/pedecoder.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/utilcode/pedecoder.cpp b/src/utilcode/pedecoder.cpp index 13d1d27b32..24cde95441 100644 --- a/src/utilcode/pedecoder.cpp +++ b/src/utilcode/pedecoder.cpp @@ -2559,7 +2559,7 @@ CORCOMPILE_METHOD_PROFILE_LIST *PEDecoder::GetNativeProfileDataList(COUNT_T * pS RETURN PTR_CORCOMPILE_METHOD_PROFILE_LIST(GetDirectoryData(pDir)); } - +#endif // FEATURE_PREJIT PTR_CVOID PEDecoder::GetNativeManifestMetadata(COUNT_T *pSize) const { @@ -2574,7 +2574,13 @@ PTR_CVOID PEDecoder::GetNativeManifestMetadata(COUNT_T *pSize) const CONTRACT_END; IMAGE_DATA_DIRECTORY *pDir; - if (HasReadyToRunHeader()) +#ifdef FEATURE_PREJIT + if (!HasReadyToRunHeader()) + { + pDir = GetMetaDataHelper(METADATA_SECTION_MANIFEST); + } + else +#endif { READYTORUN_HEADER * pHeader = GetReadyToRunHeader(); @@ -2590,10 +2596,6 @@ PTR_CVOID PEDecoder::GetNativeManifestMetadata(COUNT_T *pSize) const pDir = &pSection->Section; } } - else - { - pDir = GetMetaDataHelper(METADATA_SECTION_MANIFEST); - } if (pSize != NULL) *pSize = VAL32(pDir->Size); @@ -2601,6 +2603,8 @@ PTR_CVOID PEDecoder::GetNativeManifestMetadata(COUNT_T *pSize) const RETURN dac_cast<PTR_VOID>(GetDirectoryData(pDir)); } +#ifdef FEATURE_PREJIT + PTR_CORCOMPILE_IMPORT_SECTION PEDecoder::GetNativeImportSections(COUNT_T *pCount) const { CONTRACT(PTR_CORCOMPILE_IMPORT_SECTION) |