summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2016-03-18 23:37:56 +0100
committerJan Vorlicek <janvorli@microsoft.com>2016-03-18 23:37:56 +0100
commit639f185ea0f6c3d6900b57a417a0aebaaf42d5c5 (patch)
treebd00f0765a917c85caa5eaf2869a4d442841ba31 /src/vm
parent6932907a2953436eadbb5f698f43efc9a523781c (diff)
parentfde6f26b140c5fcfa9a01267565686efcfff361f (diff)
downloadcoreclr-639f185ea0f6c3d6900b57a417a0aebaaf42d5c5.tar.gz
coreclr-639f185ea0f6c3d6900b57a417a0aebaaf42d5c5.tar.bz2
coreclr-639f185ea0f6c3d6900b57a417a0aebaaf42d5c5.zip
Merge pull request #3812 from janvorli/fix-stub
Fix instantiating stub for methods of value types
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/prestub.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vm/prestub.cpp b/src/vm/prestub.cpp
index 2bedb83571..aeb9c3063a 100644
--- a/src/vm/prestub.cpp
+++ b/src/vm/prestub.cpp
@@ -780,15 +780,19 @@ Stub * CreateInstantiatingILStub(MethodDesc* pTargetMD, void* pHiddenArg)
CONTRACT_END;
SigTypeContext typeContext;
+ MethodTable* pStubMT;
if (pTargetMD->HasMethodInstantiation())
{
// The pHiddenArg shall be a MethodDesc*
- SigTypeContext::InitTypeContext(static_cast<MethodDesc *>(pHiddenArg), &typeContext);
+ MethodDesc* pMD = static_cast<MethodDesc *>(pHiddenArg);
+ SigTypeContext::InitTypeContext(pMD, &typeContext);
+ pStubMT = pMD->GetMethodTable();
}
else
{
// The pHiddenArg shall be a MethodTable*
SigTypeContext::InitTypeContext(TypeHandle::FromPtr(pHiddenArg), &typeContext);
+ pStubMT = static_cast<MethodTable *>(pHiddenArg);
}
MetaSig msig(pTargetMD);
@@ -837,7 +841,7 @@ Stub * CreateInstantiatingILStub(MethodDesc* pTargetMD, void* pHiddenArg)
pTargetMD->GetSig(&pSig,&cbSig);
PTR_Module pLoaderModule = pTargetMD->GetLoaderModule();
MethodDesc * pStubMD = ILStubCache::CreateAndLinkNewILStubMethodDesc(pTargetMD->GetLoaderAllocator(),
- pLoaderModule->GetILStubCache()->GetOrCreateStubMethodTable(pLoaderModule),
+ pStubMT,
ILSTUB_INSTANTIATINGSTUB,
pTargetMD->GetModule(),
pSig, cbSig,