diff options
Diffstat (limited to 'src/vm/method.cpp')
-rw-r--r-- | src/vm/method.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/vm/method.cpp b/src/vm/method.cpp index ca0ecc178d..241a0ccee0 100644 --- a/src/vm/method.cpp +++ b/src/vm/method.cpp @@ -3496,7 +3496,14 @@ MethodDesc::Fixup( } } - image->FixupPointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo)); + if (decltype(InstantiatedMethodDesc::m_pPerInstInfo)::isRelative) + { + image->FixupRelativePointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo)); + } + else + { + image->FixupPointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo)); + } // Generic methods are dealt with specially to avoid encoding the formal method type parameters if (IsTypicalMethodDefinition()) @@ -3575,7 +3582,14 @@ MethodDesc::Fixup( NDirectMethodDesc *pNMD = (NDirectMethodDesc *)this; - image->FixupPointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData)); + if (decltype(NDirectMethodDesc::ndirect.m_pWriteableData)::isRelative) + { + image->FixupRelativePointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData)); + } + else + { + image->FixupPointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData)); + } NDirectWriteableData *pWriteableData = pNMD->GetWriteableData(); NDirectImportThunkGlue *pImportThunkGlue = pNMD->GetNDirectImportThunkGlue(); |