Skip to content

Commit 0580aae

Browse files
committed
Incorporate dotnet#96672
1 parent 6be8e51 commit 0580aae

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ public sealed override IEnumerable<CombinedDependencyListEntry> GetConditionalSt
531531
if (!isStaticInterfaceMethod && defaultIntfMethod.IsCanonicalMethod(CanonicalFormKind.Any))
532532
{
533533
// Canonical instance default methods need to go through a thunk that adds the right generic context
534-
defaultIntfMethod = factory.TypeSystemContext.GetDefaultInterfaceMethodImplementationThunk(defaultIntfMethod, _type.ConvertToCanonForm(CanonicalFormKind.Specific), providingInterfaceDefinitionType);
534+
defaultIntfMethod = factory.TypeSystemContext.GetDefaultInterfaceMethodImplementationThunk(defaultIntfMethod, defType.ConvertToCanonForm(CanonicalFormKind.Specific), providingInterfaceDefinitionType);
535535
}
536536
result.Add(new CombinedDependencyListEntry(factory.MethodEntrypoint(defaultIntfMethod), factory.VirtualMethodUse(interfaceMethod), "Interface method"));
537537

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/SealedVTableNode.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,11 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly)
216216

217217
if (BuildSealedVTableSlots(factory, relocsOnly))
218218
{
219+
DefType defType = _type.GetClosestDefType();
220+
219221
for (int i = 0; i < _sealedVTableEntries.Count; i++)
220222
{
221-
IMethodNode relocTarget = _sealedVTableEntries[i].GetTarget(factory, _type);
223+
IMethodNode relocTarget = _sealedVTableEntries[i].GetTarget(factory, defType);
222224

223225
if (factory.Target.SupportsRelativePointers)
224226
objData.EmitReloc(relocTarget, RelocType.IMAGE_REL_BASED_RELPTR32);

0 commit comments

Comments
 (0)