diff options
Diffstat (limited to 'src/vm/jitinterface.cpp')
-rw-r--r-- | src/vm/jitinterface.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp index 502b5ada13..e92f875c4c 100644 --- a/src/vm/jitinterface.cpp +++ b/src/vm/jitinterface.cpp @@ -8744,8 +8744,9 @@ void CEEInfo::getMethodVTableOffset (CORINFO_METHOD_HANDLE methodHnd, _ASSERTE(method->GetSlot() < method->GetMethodTable()->GetNumVirtuals()); *pOffsetOfIndirection = MethodTable::GetVtableOffset() + MethodTable::GetIndexOfVtableIndirection(method->GetSlot()) * sizeof(MethodTable::VTableIndir_t); - *pOffsetAfterIndirection = MethodTable::GetIndexAfterVtableIndirection(method->GetSlot()) * sizeof(PCODE); + *pOffsetAfterIndirection = MethodTable::GetIndexAfterVtableIndirection(method->GetSlot()) * sizeof(MethodTable::VTableIndir2_t); *isRelative = MethodTable::VTableIndir_t::isRelative ? 1 : 0; + _ASSERTE(MethodTable::VTableIndir_t::isRelative == MethodTable::VTableIndir2_t::isRelative); EE_TO_JIT_TRANSITION_LEAF(); } @@ -9123,8 +9124,17 @@ void CEEInfo::getFunctionEntryPoint(CORINFO_METHOD_HANDLE ftnHnd, _ASSERTE((accessFlags & CORINFO_ACCESS_THIS) || !ftn->IsRemotingInterceptedViaVirtualDispatch()); - ret = ftn->GetAddrOfSlot(); - accessType = IAT_PVALUE; + ret = (void *)ftn->GetAddrOfSlot(); + + if (MethodTable::VTableIndir2_t::isRelative + && ftn->IsVtableSlot()) + { + accessType = IAT_RELPVALUE; + } + else + { + accessType = IAT_PVALUE; + } } |