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/vm/instmethhash.cpp | |
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/vm/instmethhash.cpp')
-rw-r--r-- | src/vm/instmethhash.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vm/instmethhash.cpp b/src/vm/instmethhash.cpp index 560e9554be..05378b4450 100644 --- a/src/vm/instmethhash.cpp +++ b/src/vm/instmethhash.cpp @@ -183,12 +183,16 @@ MethodDesc* InstMethodHashTable::FindMethodDesc(TypeHandle declaringType, if ( ((dwKeyFlags & InstMethodHashEntry::UnboxingStub) == 0) != (unboxingStub == 0) ) continue; +#ifdef FEATURE_PREJIT // Note pMD->GetMethodTable() might not be restored at this point. RelativeFixupPointer<PTR_MethodTable> * ppMT = pMD->GetMethodTablePtr(); TADDR pMT = ppMT->GetValueMaybeTagged((TADDR)ppMT); if (!ZapSig::CompareTaggedPointerToTypeHandle(GetModule(), pMT, declaringType)) +#else + if (TypeHandle(pMD->GetMethodTable()) != declaringType) +#endif { continue; // Next iteration of the for loop } @@ -204,11 +208,15 @@ MethodDesc* InstMethodHashTable::FindMethodDesc(TypeHandle declaringType, for (DWORD i = 0; i < inst.GetNumArgs(); i++) { +#ifdef FEATURE_PREJIT // Fetch the type handle as TADDR. It may be may be encoded fixup - TypeHandle debug-only validation // asserts on encoded fixups. TADDR candidateArg = ((FixupPointer<TADDR> *)candidateInst.GetRawArgs())[i].GetValue(); if (!ZapSig::CompareTaggedPointerToTypeHandle(GetModule(), candidateArg, inst[i])) +#else + if (candidateInst[i] != inst[i]) +#endif { match = false; break; |