Skip to content
Merged
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
10 changes: 7 additions & 3 deletions src/coreclr/interpreter/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4139,14 +4139,14 @@ void InterpCompiler::EmitCall(CORINFO_RESOLVED_TOKEN* pConstrainedToken, bool re
bool isMarshaledPInvoke = isPInvoke && m_compHnd->pInvokeMarshalingRequired(callInfo.hMethod, &callInfo.sig);

// Process sVars
int numArgsFromStack = callInfo.sig.numArgs + (newObj ? 0 : callInfo.sig.hasThis());
int numArgsFromStack = callInfo.sig.numArgs + (newObj ? 0 : callInfo.sig.hasImplicitThis());
int newObjThisArgLocation = newObj && !doCallInsteadOfNew ? 0 : INT_MAX;
int numArgs = numArgsFromStack + (newObjThisArgLocation == 0);

int extraParamArgLocation = INT_MAX;
if (callInfo.sig.hasTypeArg())
{
extraParamArgLocation = callInfo.sig.hasThis() ? 1 : 0;
extraParamArgLocation = callInfo.sig.hasImplicitThis() ? 1 : 0;
numArgs++;
}

Expand Down Expand Up @@ -4179,7 +4179,7 @@ void InterpCompiler::EmitCall(CORINFO_RESOLVED_TOKEN* pConstrainedToken, bool re
else
{
int iCurrentStackArg = iLogicalArg - numArgsFromStack;
if (iLogicalArg != 0 || !callInfo.sig.hasThis() || newObj)
if (iLogicalArg != 0 || !callInfo.sig.hasImplicitThis() || newObj)
{
CORINFO_CLASS_HANDLE classHandle;

Expand Down Expand Up @@ -5889,6 +5889,10 @@ void InterpCompiler::GenerateCode(CORINFO_METHOD_INFO* methodInfo)
CORINFO_RESOLVED_TOKEN constrainedToken;
CORINFO_CALL_INFO callInfo;
const uint8_t *codeEnd;
if (m_methodInfo->args.hasExplicitThis())
{
BADCODE("Explicit this is only supported for calls");
}
int numArgs = m_methodInfo->args.hasThis() + m_methodInfo->args.numArgs;
bool emittedBBlocks, linkBBlocks, needsRetryEmit;
m_pILCode = methodInfo->ILCode;
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/interpreter/naming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void AppendMethodName(COMP_HANDLE comp,

// Does it have a 'this' pointer? Don't count explicit this, which has
// the this pointer type as the first element of the arg type list
if (includeThisSpecifier && sig->hasThis() && !sig->hasExplicitThis())
if (includeThisSpecifier && sig->hasImplicitThis())
{
printer->Append(":this", 5);
}
Expand Down
Loading