From: Sergey Andreenko Date: Tue, 28 Mar 2017 23:25:58 +0000 (-0700) Subject: Ctor Jit-EE interface change (dotnet/coreclr#10512) X-Git-Tag: submit/tizen/20210909.063632~11030^2~7523 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=590c8f2e8fd42d80004c31fbfdce2cba23dea93c;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Ctor Jit-EE interface change (dotnet/coreclr#10512) Change JIT-EE interface for getReadyToRunDelegateCtorHelper. Update GUID. Commit migrated from https://github.com/dotnet/coreclr/commit/9afde0a2de16b0df63f77847c29e88613cb96ff4 --- diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h index 3590318..0c5b269 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h @@ -475,7 +475,7 @@ public: void getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ); const char* getHelperName( diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp index 4524e50..8638e0d 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp @@ -2283,7 +2283,7 @@ bool MethodContext::repGetReadyToRunHelper( void MethodContext::recGetReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ) { LogError("GetReadyToRunDelegateCtorHelper NYI"); @@ -2302,7 +2302,7 @@ void MethodContext::dmpGetReadyToRunDelegateCtorHelper(DWORDLONG key, DWORD valu void MethodContext::repGetReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ) { LogError("getReadyToRunDelegateCtorHelper NYI"); diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.h b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.h index 5827fff..b2224d9 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.h +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.h @@ -639,9 +639,9 @@ public: void dmpGetReadyToRunHelper(DWORDLONG key, DWORD value); bool repGetReadyToRunHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_LOOKUP_KIND* pGenericLookupKind, CorInfoHelpFunc id, CORINFO_CONST_LOOKUP* pLookup); - void recGetReadyToRunDelegateCtorHelper(CORINFO_RESOLVED_TOKEN* pTargetMethod, CORINFO_CLASS_HANDLE delegateType, CORINFO_CONST_LOOKUP* pLookup); + void recGetReadyToRunDelegateCtorHelper(CORINFO_RESOLVED_TOKEN* pTargetMethod, CORINFO_CLASS_HANDLE delegateType, CORINFO_LOOKUP* pLookup); void dmpGetReadyToRunDelegateCtorHelper(DWORDLONG key, DWORD value); - void repGetReadyToRunDelegateCtorHelper(CORINFO_RESOLVED_TOKEN* pTargetMethod, CORINFO_CLASS_HANDLE delegateType, CORINFO_CONST_LOOKUP* pLookup); + void repGetReadyToRunDelegateCtorHelper(CORINFO_RESOLVED_TOKEN* pTargetMethod, CORINFO_CLASS_HANDLE delegateType, CORINFO_LOOKUP* pLookup); void recGetHelperFtn(CorInfoHelpFunc ftnNum, void **ppIndirection, void *result); void dmpGetHelperFtn(DWORD key, DLDL value); diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp index 0952a95..6d64442 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp @@ -884,7 +884,7 @@ bool interceptor_ICJI::getReadyToRunHelper( void interceptor_ICJI::getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ) { mc->cr->AddCall("getReadyToRunDelegateCtorHelper"); diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp index c3a101e..492d089 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp @@ -712,7 +712,7 @@ bool interceptor_ICJI::getReadyToRunHelper( void interceptor_ICJI::getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ) { mcs->AddCall("getReadyToRunDelegateCtorHelper"); diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp index 81e2e44..8941685 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp @@ -647,7 +647,7 @@ bool interceptor_ICJI::getReadyToRunHelper( void interceptor_ICJI::getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ) { original_ICorJitInfo->getReadyToRunDelegateCtorHelper(pTargetMethod, delegateType, pLookup); diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp index e0aebd6..6478b3c 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp @@ -769,7 +769,7 @@ bool MyICJI::getReadyToRunHelper( void MyICJI::getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ) { jitInstance->mc->cr->AddCall("getReadyToRunDelegateCtorHelper"); diff --git a/src/coreclr/src/inc/corinfo.h b/src/coreclr/src/inc/corinfo.h index ccb1929..f7560b2 100644 --- a/src/coreclr/src/inc/corinfo.h +++ b/src/coreclr/src/inc/corinfo.h @@ -214,12 +214,12 @@ TODO: Talk about initializing strutures before use #endif // Update this one -SELECTANY const GUID JITEEVersionIdentifier = { /* 3d43decb-a611-4413-a0af-a24278a00e2d */ - 0x3d43decb, - 0xa611, - 0x4413, - {0xa0, 0xaf, 0xa2, 0x42, 0x78, 0xa0, 0x0e, 0x2d} - }; +SELECTANY const GUID JITEEVersionIdentifier = { /* 61783541-8fc0-44ce-80f7-7789b93a3309 */ + 0x61783541, + 0x8fc0, + 0x44ce, + { 0x80, 0xf7, 0x77, 0x89, 0xb9, 0x3a, 0x33, 0x09 } +}; ////////////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -2394,7 +2394,7 @@ public: virtual void getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ) = 0; virtual const char* getHelperName( diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index 79c9550..720cc50 100644 --- a/src/coreclr/src/jit/flowgraph.cpp +++ b/src/coreclr/src/jit/flowgraph.cpp @@ -7133,9 +7133,10 @@ GenTreePtr Compiler::fgOptimizeDelegateConstructor(GenTreeCall* call, CORINFO_CO call = gtNewHelperCallNode(CORINFO_HELP_READYTORUN_DELEGATE_CTOR, TYP_VOID, GTF_EXCEPT, helperArgs); CORINFO_RESOLVED_TOKEN* ldftnToken = targetMethod->gtFptrVal.gtLdftnResolvedToken; - CORINFO_CONST_LOOKUP entryPoint; + CORINFO_LOOKUP entryPoint; info.compCompHnd->getReadyToRunDelegateCtorHelper(ldftnToken, clsHnd, &entryPoint); - call->setEntryPoint(entryPoint); + assert(!entryPoint.lookupKind.needsRuntimeLookup); + call->setEntryPoint(entryPoint.constLookup); } } else diff --git a/src/coreclr/src/vm/jitinterface.cpp b/src/coreclr/src/vm/jitinterface.cpp index 1f8ebfc..248deac 100644 --- a/src/coreclr/src/vm/jitinterface.cpp +++ b/src/coreclr/src/vm/jitinterface.cpp @@ -6338,7 +6338,7 @@ bool CEEInfo::getReadyToRunHelper( void CEEInfo::getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ) { LIMITED_METHOD_CONTRACT; diff --git a/src/coreclr/src/vm/jitinterface.h b/src/coreclr/src/vm/jitinterface.h index 14a4f70..d287248 100644 --- a/src/coreclr/src/vm/jitinterface.h +++ b/src/coreclr/src/vm/jitinterface.h @@ -520,7 +520,7 @@ public: void getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ); CorInfoInitClassResult initClass( diff --git a/src/coreclr/src/zap/zapinfo.cpp b/src/coreclr/src/zap/zapinfo.cpp index 4cc7e9f..9713ce5 100644 --- a/src/coreclr/src/zap/zapinfo.cpp +++ b/src/coreclr/src/zap/zapinfo.cpp @@ -3500,14 +3500,14 @@ bool ZapInfo::getReadyToRunHelper(CORINFO_RESOLVED_TOKEN * pResolvedToken, void ZapInfo::getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ) { #ifdef FEATURE_READYTORUN_COMPILER _ASSERTE(IsReadyToRunCompilation()); - - pLookup->accessType = IAT_PVALUE; - pLookup->addr = m_pImage->GetImportTable()->GetDynamicHelperCell( + pLookup->lookupKind.needsRuntimeLookup = false; + pLookup->constLookup.accessType = IAT_PVALUE; + pLookup->constLookup.addr = m_pImage->GetImportTable()->GetDynamicHelperCell( (CORCOMPILE_FIXUP_BLOB_KIND)(ENCODE_DELEGATE_CTOR), pTargetMethod->hMethod, pTargetMethod, delegateType); #endif } diff --git a/src/coreclr/src/zap/zapinfo.h b/src/coreclr/src/zap/zapinfo.h index 973170f..6e83657 100644 --- a/src/coreclr/src/zap/zapinfo.h +++ b/src/coreclr/src/zap/zapinfo.h @@ -558,7 +558,7 @@ public: void getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, - CORINFO_CONST_LOOKUP * pLookup + CORINFO_LOOKUP * pLookup ); CorInfoInitClassResult initClass(