The was an error in the assert because I checked pointers that were
obvious different.
The actual values could not be different because they are created from
the same token in the same place (importer.cpp DO_LDFTN:
impMethodPointer saved resolvedToken as gtLdftnResolvedToken ,
CORINFO_RESOLVED_TOKEN* heapToken = impAllocateToken(resolvedToken);
impPushOnStack(op1, typeInfo(heapToken)); saved the token on the stack.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4475fd6f34bfbfd1d416d06fdea2dff8ee227150
call = gtNewHelperCallNode(CORINFO_HELP_READYTORUN_DELEGATE_CTOR, TYP_VOID, GTF_EXCEPT, helperArgs);
- assert(ldftnToken == targetMethod->gtFptrVal.gtLdftnResolvedToken);
CORINFO_LOOKUP entryPoint;
info.compCompHnd->getReadyToRunDelegateCtorHelper(ldftnToken, clsHnd, &entryPoint);
assert(!entryPoint.lookupKind.needsRuntimeLookup);
copy = new (this, oper) GenTreeFptrVal(tree->gtType, tree->gtFptrVal.gtFptrMethod);
#ifdef FEATURE_READYTORUN_COMPILER
- copy->gtFptrVal.gtEntryPoint = tree->gtFptrVal.gtEntryPoint;
- copy->gtFptrVal.gtLdftnResolvedToken = tree->gtFptrVal.gtLdftnResolvedToken;
+ copy->gtFptrVal.gtEntryPoint = tree->gtFptrVal.gtEntryPoint;
#endif
goto DONE;
CORINFO_METHOD_HANDLE gtFptrMethod;
#ifdef FEATURE_READYTORUN_COMPILER
- CORINFO_CONST_LOOKUP gtEntryPoint;
- CORINFO_RESOLVED_TOKEN* gtLdftnResolvedToken;
+ CORINFO_CONST_LOOKUP gtEntryPoint;
#endif
GenTreeFptrVal(var_types type, CORINFO_METHOD_HANDLE meth) : GenTree(GT_FTN_ADDR, type), gtFptrMethod(meth)
#ifdef FEATURE_READYTORUN_COMPILER
if (opts.IsReadyToRun())
{
- op1->gtFptrVal.gtEntryPoint = pCallInfo->codePointerLookup.constLookup;
- op1->gtFptrVal.gtLdftnResolvedToken = new (this, CMK_Unknown) CORINFO_RESOLVED_TOKEN;
- *op1->gtFptrVal.gtLdftnResolvedToken = *pResolvedToken;
+ op1->gtFptrVal.gtEntryPoint = pCallInfo->codePointerLookup.constLookup;
}
else
{