Skip to content

Commit 4b809c8

Browse files
committed
Disallow InstParam
1 parent fe5cc42 commit 4b809c8

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

src/coreclr/jit/importercalls.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8234,17 +8234,17 @@ void Compiler::impDevirtualizeCall(GenTreeCall* call,
82348234

82358235
if (dvInfo.isInstantiatingStub)
82368236
{
8237-
// We should only end up with generic methods for array interface devirt.
8237+
// We should only end up with generic methods for array interface or GVM devirt.
82388238
//
82398239
assert(dvInfo.wasArrayInterfaceOrGvmDevirt);
82408240

82418241
// We don't expect NAOT to end up here, since it has Array<T>
8242-
// and normal devirtualization.
8242+
// and normal devirtualization, and it does not (yet) support GVM devirtualization.
82438243
//
82448244
assert(!IsTargetAbi(CORINFO_NATIVEAOT_ABI));
82458245

82468246
// We don't expect R2R to end up here, since it does not (yet) support
8247-
// array interface devirtualization.
8247+
// array interface or GVM devirtualization.
82488248
//
82498249
assert(!opts.IsReadyToRun());
82508250

src/coreclr/vm/jitinterface.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8750,7 +8750,7 @@ bool CEEInfo::resolveVirtualMethodHelper(CORINFO_DEVIRTUALIZATION_INFO * info)
87508750

87518751
if (pDevirtMD->HasMethodInstantiation())
87528752
{
8753-
pDevirtMD = pDevirtMD->FindOrCreateAssociatedMethodDesc(pDevirtMD, pDevirtMD->GetMethodTable(), false, pBaseMD->GetMethodInstantiation(), true);
8753+
pDevirtMD = pDevirtMD->FindOrCreateAssociatedMethodDesc(pDevirtMD, pDevirtMD->GetMethodTable(), false, pBaseMD->GetMethodInstantiation(), false);
87548754
}
87558755

87568756
// Determine the exact class.
@@ -8783,7 +8783,7 @@ bool CEEInfo::resolveVirtualMethodHelper(CORINFO_DEVIRTUALIZATION_INFO * info)
87838783

87848784
// Success! Pass back the results.
87858785
//
8786-
if (isArray)
8786+
if (isArray || pDevirtMD->HasMethodInstantiation())
87878787
{
87888788
// Note if array devirtualization produced an instantiation stub
87898789
// so jit can try and inline it.
@@ -8794,16 +8794,8 @@ bool CEEInfo::resolveVirtualMethodHelper(CORINFO_DEVIRTUALIZATION_INFO * info)
87948794
}
87958795
else
87968796
{
8797-
if (pDevirtMD->HasMethodInstantiation())
8798-
{
8799-
info->exactContext = MAKE_METHODCONTEXT((CORINFO_METHOD_HANDLE) pDevirtMD);
8800-
info->wasArrayInterfaceOrGvmDevirt = true;
8801-
}
8802-
else
8803-
{
8804-
info->exactContext = MAKE_CLASSCONTEXT((CORINFO_CLASS_HANDLE) pExactMT);
8805-
info->wasArrayInterfaceOrGvmDevirt = false;
8806-
}
8797+
info->exactContext = MAKE_CLASSCONTEXT((CORINFO_CLASS_HANDLE) pExactMT);
8798+
info->wasArrayInterfaceOrGvmDevirt = false;
88078799
info->isInstantiatingStub = false;
88088800
}
88098801

0 commit comments

Comments
 (0)