getLocationOfThisType does way less work and gives the same result (the part we care about).
unsigned flags,
void* compileTimeHandle);
unsigned flags,
void* compileTimeHandle);
- GenTreePtr getRuntimeContextTree(CORINFO_LOOKUP* pLookup);
+ GenTreePtr getRuntimeContextTree(CORINFO_RUNTIME_LOOKUP_KIND kind);
GenTreePtr impRuntimeLookupToTree(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_LOOKUP* pLookup,
GenTreePtr impRuntimeLookupToTree(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_LOOKUP* pLookup,
// getRuntimeContextTree: find pointer to context for runtime lookup.
//
// Arguments:
// getRuntimeContextTree: find pointer to context for runtime lookup.
//
// Arguments:
-// pLookup - how to do lookup.
//
// Return Value:
// Return GenTree pointer to generic shared context.
//
// Return Value:
// Return GenTree pointer to generic shared context.
// Notes:
// Reports about generic context using.
// Notes:
// Reports about generic context using.
-GenTreePtr Compiler::getRuntimeContextTree(CORINFO_LOOKUP* pLookup)
+GenTreePtr Compiler::getRuntimeContextTree(CORINFO_RUNTIME_LOOKUP_KIND kind)
- GenTreePtr ctxTree = nullptr;
- CORINFO_RUNTIME_LOOKUP_KIND kind = pLookup->lookupKind.runtimeLookupKind;
+ GenTreePtr ctxTree = nullptr;
// Collectible types requires that for shared generic code, if we use the generic context parameter
// that we report it. (This is a conservative approach, we could detect some cases particularly when the
// Collectible types requires that for shared generic code, if we use the generic context parameter
// that we report it. (This is a conservative approach, we could detect some cases particularly when the
// In other word, it cannot be called by the instance of the Compiler for the inlinee.
assert(!compIsForInlining());
// In other word, it cannot be called by the instance of the Compiler for the inlinee.
assert(!compIsForInlining());
- GenTreePtr ctxTree = getRuntimeContextTree(pLookup);
+ GenTreePtr ctxTree = getRuntimeContextTree(pLookup->lookupKind.runtimeLookupKind);
#ifdef FEATURE_READYTORUN_COMPILER
if (opts.IsReadyToRun())
#ifdef FEATURE_READYTORUN_COMPILER
if (opts.IsReadyToRun())
{
#ifdef FEATURE_READYTORUN_COMPILER
noway_assert(opts.IsReadyToRun());
{
#ifdef FEATURE_READYTORUN_COMPILER
noway_assert(opts.IsReadyToRun());
- CORINFO_GENERICHANDLE_RESULT embedInfo;
- info.compCompHnd->embedGenericHandle(pResolvedToken, FALSE, &embedInfo);
- assert(embedInfo.lookup.lookupKind.needsRuntimeLookup);
+ CORINFO_LOOKUP_KIND kind = info.compCompHnd->getLocationOfThisType(info.compMethodHnd);
+ assert(kind.needsRuntimeLookup);
- GenTreePtr ctxTree = getRuntimeContextTree(&embedInfo.lookup);
+ GenTreePtr ctxTree = getRuntimeContextTree(kind.runtimeLookupKind);
GenTreeArgList* args = gtNewArgList(ctxTree);
unsigned callFlags = 0;
GenTreeArgList* args = gtNewArgList(ctxTree);
unsigned callFlags = 0;