diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp index 7cd7f9b543e96f..dc04a800a02153 100644 --- a/src/coreclr/vm/jitinterface.cpp +++ b/src/coreclr/vm/jitinterface.cpp @@ -7593,12 +7593,6 @@ static void getMethodInfoHelper( (ftn->RequiresInstMethodTableArg() ? CORINFO_GENERICS_CTXT_FROM_METHODTABLE : 0) | (ftn->RequiresInstMethodDescArg() ? CORINFO_GENERICS_CTXT_FROM_METHODDESC : 0))); - // EEJitManager::ResolveEHClause and CrawlFrame::GetExactGenericInstantiations - // need to be able to get to CORINFO_GENERICS_CTXT_MASK if there are any - // catch clauses like "try {} catch(MyException e) {}". - // Such constructs are rare, and having to extend the lifetime of variable - // for such cases is reasonable - if (methInfo->options & CORINFO_GENERICS_CTXT_MASK) { #if defined(PROFILING_SUPPORTED) diff --git a/src/coreclr/vm/stackwalk.cpp b/src/coreclr/vm/stackwalk.cpp index b333249637d37e..8a0d2e4eb8e634 100644 --- a/src/coreclr/vm/stackwalk.cpp +++ b/src/coreclr/vm/stackwalk.cpp @@ -229,39 +229,6 @@ PTR_VOID CrawlFrame::GetParamTypeArg() } } - - -// [pClassInstantiation] : Always filled in, though may be set to NULL if no inst. -// [pMethodInst] : Always filled in, though may be set to NULL if no inst. -void CrawlFrame::GetExactGenericInstantiations(Instantiation *pClassInst, - Instantiation *pMethodInst) -{ - - CONTRACTL { - NOTHROW; - GC_NOTRIGGER; - PRECONDITION(CheckPointer(pClassInst)); - PRECONDITION(CheckPointer(pMethodInst)); - } CONTRACTL_END; - - TypeHandle specificClass; - MethodDesc* specificMethod; - - BOOL ret = Generics::GetExactInstantiationsOfMethodAndItsClassFromCallInformation( - GetFunction(), - GetExactGenericArgsToken(), - &specificClass, - &specificMethod); - - if (!ret) - { - _ASSERTE(!"Cannot return exact class instantiation when we are requested to."); - } - - *pClassInst = specificMethod->GetExactClassInstantiation(specificClass); - *pMethodInst = specificMethod->GetMethodInstantiation(); -} - PTR_VOID CrawlFrame::GetExactGenericArgsToken() { @@ -1696,7 +1663,7 @@ StackWalkAction StackFrameIterator::Filter(void) m_fFuncletNotSeen = true; STRESS_LOG3(LF_GCROOTS, LL_INFO100, "STACKWALK: Moved over first ExInfo @ %p in second pass, SP: %p, Enclosing clause: %p\n", - pExInfo, (void*)m_crawl.GetRegisterSet()->SP, (void*)m_sfFuncletParent.SP); + pExInfo, (void*)m_crawl.GetRegisterSet()->SP, (void*)m_sfFuncletParent.SP); } m_movedPastFirstExInfo = true; } @@ -1907,7 +1874,7 @@ StackWalkAction StackFrameIterator::Filter(void) { if (!ExecutionManager::IsManagedCode(GetIP(m_crawl.GetRegisterSet()->pCallerContext))) { - // Initiate force reporting of references in the new managed exception handling code frames. + // Initiate force reporting of references in the new managed exception handling code frames. // These frames are still alive when we are in a finally funclet. m_forceReportingWhileSkipping = ForceGCReportingStage::LookForManagedFrame; STRESS_LOG0(LF_GCROOTS, LL_INFO100, "STACKWALK: Setting m_forceReportingWhileSkipping = ForceGCReportingStage::LookForManagedFrame while processing filter funclet\n"); @@ -1968,7 +1935,7 @@ StackWalkAction StackFrameIterator::Filter(void) if (!fFrameWasUnwound && !ExecutionManager::IsManagedCode(GetIP(m_crawl.GetRegisterSet()->pCallerContext))) { - // Initiate force reporting of references in the new managed exception handling code frames. + // Initiate force reporting of references in the new managed exception handling code frames. // These frames are still alive when we are in a finally funclet. m_forceReportingWhileSkipping = ForceGCReportingStage::LookForManagedFrame; STRESS_LOG0(LF_GCROOTS, LL_INFO100, "STACKWALK: Setting m_forceReportingWhileSkipping = ForceGCReportingStage::LookForManagedFrame\n"); @@ -2160,7 +2127,7 @@ StackWalkAction StackFrameIterator::Filter(void) // would report garbage values as live objects. So instead parent can use the IP of the resume // address of catch funclet to report live GC references. m_crawl.fShouldParentFrameUseUnwindTargetPCforGCReporting = true; - + if (g_isNewExceptionHandlingEnabled) { m_crawl.ehClauseForCatch = pExInfo->m_ClauseForCatch; @@ -2181,7 +2148,7 @@ StackWalkAction StackFrameIterator::Filter(void) "(EH handler range [%x, %x) ), so we need to specially report roots to ensure variables alive" " in its handler stay live.\n", pTracker->GetCatchToCallPC(), m_crawl.ehClauseForCatch.HandlerStartPC, - m_crawl.ehClauseForCatch.HandlerEndPC); + m_crawl.ehClauseForCatch.HandlerEndPC); } } else if (!m_crawl.IsFunclet()) @@ -2291,14 +2258,14 @@ StackWalkAction StackFrameIterator::Filter(void) STRESS_LOG0(LF_GCROOTS, LL_INFO100, "STACKWALK: Setting m_forceReportingWhileSkipping = ForceGCReportingStage::LookForMarkerFrame\n"); } -#ifdef _DEBUG +#ifdef _DEBUG if (m_forceReportingWhileSkipping != ForceGCReportingStage::Off) { STRESS_LOG3(LF_GCROOTS, LL_INFO100, "STACKWALK: Force callback for skipped function m_crawl.pFunc = %pM (%s.%s)\n", m_crawl.pFunc, m_crawl.pFunc->m_pszDebugClassName, m_crawl.pFunc->m_pszDebugMethodName); _ASSERTE((m_crawl.pFunc->GetMethodTable() == g_pEHClass) || (strcmp(m_crawl.pFunc->m_pszDebugClassName, "ILStubClass") == 0) || (strcmp(m_crawl.pFunc->m_pszDebugMethodName, "CallFinallyFunclet") == 0) || (m_crawl.pFunc->GetMethodTable() == g_pExceptionServicesInternalCallsClass)); } -#endif +#endif } } } diff --git a/src/coreclr/vm/stackwalk.h b/src/coreclr/vm/stackwalk.h index eda0f70bda0477..b795a6e69b3459 100644 --- a/src/coreclr/vm/stackwalk.h +++ b/src/coreclr/vm/stackwalk.h @@ -130,9 +130,6 @@ class CrawlFrame */ TADDR GetAmbientSPFromCrawlFrame(); - void GetExactGenericInstantiations(Instantiation *pClassInst, - Instantiation *pMethodInst); - /* Returns extra information required to reconstruct exact generic parameters, if any. Returns NULL if @@ -666,7 +663,7 @@ class StackFrameIterator enum class ForceGCReportingStage : BYTE { Off = 0, - // The stack walker has hit a funclet, we are looking for the first managed + // The stack walker has hit a funclet, we are looking for the first managed // frame that would be one of the managed exception handling code frames LookForManagedFrame = 1, // The stack walker has already hit a managed exception handling code frame,