Skip to content

Commit

Permalink
Incorporate dotnet#96672
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBrinkley committed Jan 9, 2024
1 parent 6be8e51 commit 0580aae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ public sealed override IEnumerable<CombinedDependencyListEntry> GetConditionalSt
if (!isStaticInterfaceMethod && defaultIntfMethod.IsCanonicalMethod(CanonicalFormKind.Any))
{
// Canonical instance default methods need to go through a thunk that adds the right generic context
defaultIntfMethod = factory.TypeSystemContext.GetDefaultInterfaceMethodImplementationThunk(defaultIntfMethod, _type.ConvertToCanonForm(CanonicalFormKind.Specific), providingInterfaceDefinitionType);
defaultIntfMethod = factory.TypeSystemContext.GetDefaultInterfaceMethodImplementationThunk(defaultIntfMethod, defType.ConvertToCanonForm(CanonicalFormKind.Specific), providingInterfaceDefinitionType);
}
result.Add(new CombinedDependencyListEntry(factory.MethodEntrypoint(defaultIntfMethod), factory.VirtualMethodUse(interfaceMethod), "Interface method"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,11 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly)

if (BuildSealedVTableSlots(factory, relocsOnly))
{
DefType defType = _type.GetClosestDefType();

for (int i = 0; i < _sealedVTableEntries.Count; i++)
{
IMethodNode relocTarget = _sealedVTableEntries[i].GetTarget(factory, _type);
IMethodNode relocTarget = _sealedVTableEntries[i].GetTarget(factory, defType);

if (factory.Target.SupportsRelativePointers)
objData.EmitReloc(relocTarget, RelocType.IMAGE_REL_BASED_RELPTR32);
Expand Down

0 comments on commit 0580aae

Please sign in to comment.