Skip to content

Commit cc60a66

Browse files
AndyAyersMSCopilot
andcommitted
[Wasm R2R] Allow LDVIRTFTN call sigs to carry a type arg (MD-array methods)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1358624 commit cc60a66

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2670,7 +2670,10 @@ private void getCallInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESO
26702670
ComputeMethodWithToken(targetMethod, ref pResolvedToken, constrainedType: null, unboxing: false),
26712671
useInstantiatingStub));
26722672

2673-
Debug.Assert(!pResult->sig.hasTypeArg());
2673+
// Wasm routes all virtual calls through LDVIRTFTN (stub dispatch is unsupported),
2674+
// so the call sig may carry a type arg (e.g., MD-array intrinsics); instParamLookup
2675+
// is set up by the post-switch block below.
2676+
Debug.Assert(!pResult->sig.hasTypeArg() || _compilation.NodeFactory.Target.IsWasm);
26742677
}
26752678
break;
26762679

0 commit comments

Comments
 (0)