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
3 changes: 0 additions & 3 deletions src/coreclr/interpreter/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4097,8 +4097,6 @@ void InterpCompiler::EmitCanAccessCallout(CORINFO_RESOLVED_TOKEN *pResolvedToken

void InterpCompiler::EmitCallsiteCallout(CorInfoIsAccessAllowedResult accessAllowed, CORINFO_HELPER_DESC* calloutDesc)
{
// WASM-TODO: https://github.com/dotnet/runtime/issues/121955
#ifndef TARGET_WASM
if (accessAllowed == CORINFO_ACCESS_ILLEGAL)
{
int32_t svars[CORINFO_ACCESS_ALLOWED_MAX_ARGS];
Expand Down Expand Up @@ -4169,7 +4167,6 @@ void InterpCompiler::EmitCallsiteCallout(CorInfoIsAccessAllowedResult accessAllo
}
m_pLastNewIns->data[0] = GetDataForHelperFtn(calloutDesc->helperNum);
}
#endif // !TARGET_WASM
}

static OpcodePeepElement peepRuntimeAsyncCall[] = {
Expand Down
7 changes: 7 additions & 0 deletions src/coreclr/vm/prestub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,14 @@ PCODE MethodDesc::DoPrestub(MethodTable *pDispatchingMT, CallerGCMode callerGCMo
if (helperMD->ShouldCallPrestub())
(void)helperMD->DoPrestub(NULL /* MethodTable */, CallerGCMode::Coop);
void* ilStubInterpData = helperMD->GetInterpreterCode();
_ASSERTE(ilStubInterpData != NULL);
SetInterpreterCode((InterpByteCodeStart*)ilStubInterpData);
Copy link
Member

Choose a reason for hiding this comment

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

Can this line be inside if (ilStubInterpData != NULL) as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can add an assert before this line and do the rest unconditionally.


// Use this method's own PortableEntryPoint rather than the helper's.
// It is required to maintain 1:1 mapping between MethodDesc and its entrypoint.
PCODE entryPoint = GetPortableEntryPoint();
PortableEntryPoint::SetInterpreterData(entryPoint, (PCODE)(TADDR)ilStubInterpData);
pCode = entryPoint;
}
#else // !FEATURE_PORTABLE_ENTRYPOINTS
// FCalls are always wrapped in a precode to enable mapping of the entrypoint back to MethodDesc
Expand Down
Loading