Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2350,6 +2350,11 @@ private void ceeInfoGetCallInfo(
(_compilation.NodeFactory.Target.IsWasm &&
targetMethod.OwningType.IsInterface))
{
if (!targetMethod.HasInstantiation)
{
// If it is also a default interface method call, it should go through instantiating stub.
useInstantiatingStub = useInstantiatingStub || (targetMethod.OwningType.IsInterface && !originalMethod.IsAbstract);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason why we need instantiating stubs on wasm ? They are always in danger of being interpreted and I'm wondering why would they even be needed. Isn't any method able to obtain its method context directly from the PEP.

}
pResult->kind = CORINFO_CALL_KIND.CORINFO_VIRTUALCALL_LDVIRTFTN; // stub dispatch can't handle generic method calls yet
pResult->nullInstanceCheck = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public class Test
{
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/88689", TestRuntimes.Mono)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/133466", typeof(TestLibrary.PlatformDetection), nameof(TestLibrary.PlatformDetection.IsWasmReadyToRun))]
public static void TestEntryPoint()
{
Console.WriteLine("Test cases");
Expand Down
Loading