From: Jonghyun Park Date: Thu, 9 Feb 2017 06:36:55 +0000 (+0900) Subject: Clean up EECodeManager::GetParamContextType (dotnet/coreclr#9428) X-Git-Tag: submit/tizen/20210909.063632~11030^2~8153 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fa74bc1794a50e9211d4b929975cfd0c7bbab2b;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Clean up EECodeManager::GetParamContextType (dotnet/coreclr#9428) Commit migrated from https://github.com/dotnet/coreclr/commit/9c37052c23fa45e2fb228b73e1a44b08de242635 --- diff --git a/src/coreclr/src/vm/eetwain.cpp b/src/coreclr/src/vm/eetwain.cpp index 46cff26..50b421e 100644 --- a/src/coreclr/src/vm/eetwain.cpp +++ b/src/coreclr/src/vm/eetwain.cpp @@ -5260,7 +5260,7 @@ GenericParamContextType EECodeManager::GetParamContextType(PREGDISPLAY pCont { LIMITED_METHOD_DAC_CONTRACT; -#ifdef _TARGET_X86_ +#ifndef USE_GC_INFO_DECODER /* Extract the necessary information from the info block header */ GCInfoToken gcInfoToken = pCodeInfo->GetGCInfoToken(); PTR_VOID methodInfoPtr = pCodeInfo->GetGCInfo(); @@ -5278,16 +5278,16 @@ GenericParamContextType EECodeManager::GetParamContextType(PREGDISPLAY pCont { return GENERIC_PARAM_CONTEXT_NONE; } - else if (info.genericsContextIsMethodDesc) + + if (info.genericsContextIsMethodDesc) { return GENERIC_PARAM_CONTEXT_METHODDESC; } - else - { - return GENERIC_PARAM_CONTEXT_METHODTABLE; - } + + return GENERIC_PARAM_CONTEXT_METHODTABLE; + // On x86 the generic param context parameter is never this. -#elif defined(USE_GC_INFO_DECODER) +#else // !USE_GC_INFO_DECODER GCInfoToken gcInfoToken = pCodeInfo->GetGCInfoToken(); GcInfoDecoder gcInfoDecoder( @@ -5309,10 +5309,7 @@ GenericParamContextType EECodeManager::GetParamContextType(PREGDISPLAY pCont return GENERIC_PARAM_CONTEXT_THIS; } return GENERIC_PARAM_CONTEXT_NONE; -#else // !_TARGET_X86_ && !USE_GC_INFO_DECODER - PORTABILITY_ASSERT("Port: EECodeManager::GetParamContextType is not implemented on this platform."); - return GENERIC_PARAM_CONTEXT_NONE; -#endif // _TARGET_X86_ +#endif // USE_GC_INFO_DECODER } #ifndef CROSSGEN_COMPILE