diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2016-05-12 12:57:13 -0700 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2016-05-12 12:57:13 -0700 |
commit | 8a972e65990b962613b474c11639245d90be5079 (patch) | |
tree | eefc17d371ea17abd3941e771bcda558df326cf3 | |
parent | 7100aeb91649f7f1f8cd552419a38d51c7402927 (diff) | |
download | coreclr-8a972e65990b962613b474c11639245d90be5079.tar.gz coreclr-8a972e65990b962613b474c11639245d90be5079.tar.bz2 coreclr-8a972e65990b962613b474c11639245d90be5079.zip |
Apply the JIT interface changes needed for Fadi's upcoming shared generics change.
[tfs-changeset: 1604316]
-rw-r--r-- | src/inc/corinfo.h | 40 | ||||
-rw-r--r-- | src/inc/jithelpers.h | 1 | ||||
-rw-r--r-- | src/jit/importer.cpp | 4 | ||||
-rw-r--r-- | src/vm/jitinterface.cpp | 5 | ||||
-rw-r--r-- | src/vm/jitinterface.h | 3 | ||||
-rw-r--r-- | src/zap/zapinfo.cpp | 7 | ||||
-rw-r--r-- | src/zap/zapinfo.h | 3 |
7 files changed, 50 insertions, 13 deletions
diff --git a/src/inc/corinfo.h b/src/inc/corinfo.h index d3c18d9898..bd4a086dea 100644 --- a/src/inc/corinfo.h +++ b/src/inc/corinfo.h @@ -231,11 +231,11 @@ TODO: Talk about initializing strutures before use #if COR_JIT_EE_VERSION > 460 // Update this one -SELECTANY const GUID JITEEVersionIdentifier = { /* 7fe8ebd7-2f61-41fc-8aac-2be394620be0 */ - 0x7fe8ebd7, - 0x2f61, - 0x41fc, - { 0x8a, 0xac, 0x2b, 0xe3, 0x94, 0x62, 0xb, 0xe0 } +SELECTANY const GUID JITEEVersionIdentifier = { /* 7a6aa61a-78b1-4dfb-9e06-655fb4774d7f */ + 0x7a6aa61a, + 0x78b1, + 0x4dfb, + { 0x9e, 0x6, 0x65, 0x5f, 0xb4, 0x77, 0x4d, 0x7f } }; #else @@ -641,6 +641,7 @@ enum CorInfoHelpFunc CORINFO_HELP_READYTORUN_VIRTUAL_FUNC_PTR, #if COR_JIT_EE_VERSION > 460 + CORINFO_HELP_READYTORUN_GENERIC_HANDLE, CORINFO_HELP_READYTORUN_DELEGATE_CTOR, #else #define CORINFO_HELP_READYTORUN_DELEGATE_CTOR CORINFO_HELP_EE_PRESTUB @@ -1309,12 +1310,29 @@ enum CORINFO_RUNTIME_LOOKUP_KIND CORINFO_LOOKUP_CLASSPARAM, }; +#if COR_JIT_EE_VERSION > 460 + +struct CORINFO_LOOKUP_KIND +{ + bool needsRuntimeLookup; + CORINFO_RUNTIME_LOOKUP_KIND runtimeLookupKind; + + // The 'runtimeLookupFlags' field is just for internal VM / ZAP communication, + // not to be used by the JIT. + WORD runtimeLookupFlags; +} ; + +#else + struct CORINFO_LOOKUP_KIND { bool needsRuntimeLookup; CORINFO_RUNTIME_LOOKUP_KIND runtimeLookupKind; } ; +#endif + + // CORINFO_RUNTIME_LOOKUP indicates the details of the runtime lookup // operation to be performed. // @@ -2405,20 +2423,28 @@ public: CORINFO_CLASS_HANDLE cls ) = 0; - virtual void getReadyToRunHelper( +#if COR_JIT_EE_VERSION > 460 + virtual bool getReadyToRunHelper( CORINFO_RESOLVED_TOKEN * pResolvedToken, + CORINFO_LOOKUP_KIND * pGenericLookupKind, CorInfoHelpFunc id, CORINFO_CONST_LOOKUP * pLookup ) = 0; -#if COR_JIT_EE_VERSION > 460 virtual void getReadyToRunDelegateCtorHelper( CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, CORINFO_CONST_LOOKUP * pLookup ) = 0; +#else + virtual void getReadyToRunHelper( + CORINFO_RESOLVED_TOKEN * pResolvedToken, + CorInfoHelpFunc id, + CORINFO_CONST_LOOKUP * pLookup + ) = 0; #endif + virtual const char* getHelperName( CorInfoHelpFunc ) = 0; diff --git a/src/inc/jithelpers.h b/src/inc/jithelpers.h index 371143d556..b8521bffc1 100644 --- a/src/inc/jithelpers.h +++ b/src/inc/jithelpers.h @@ -309,6 +309,7 @@ JITHELPER(CORINFO_HELP_READYTORUN_STATIC_BASE, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB) JITHELPER(CORINFO_HELP_READYTORUN_VIRTUAL_FUNC_PTR, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB) #if COR_JIT_EE_VERSION > 460 + JITHELPER(CORINFO_HELP_READYTORUN_GENERIC_HANDLE, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB) JITHELPER(CORINFO_HELP_READYTORUN_DELEGATE_CTOR, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB) #endif // COR_JIT_EE_VERSION diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index 3ba0cd01f3..2aba8ceab9 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -1633,7 +1633,11 @@ GenTreePtr Compiler::impReadyToRunHelperToTree(CORINFO_RESOLVED_TOKEN * GenTreePtr arg) { CORINFO_CONST_LOOKUP lookup; +#if COR_JIT_EE_VERSION > 460 + info.compCompHnd->getReadyToRunHelper(pResolvedToken, nullptr, helper, &lookup); +#else info.compCompHnd->getReadyToRunHelper(pResolvedToken, helper, &lookup); +#endif GenTreeArgList* args = NULL; diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp index 28f41c62f8..e94cb0dbf7 100644 --- a/src/vm/jitinterface.cpp +++ b/src/vm/jitinterface.cpp @@ -6196,8 +6196,9 @@ CorInfoHelpFunc CEEInfo::getUnBoxHelper(CORINFO_CLASS_HANDLE clsHnd) } /***********************************************************************/ -void CEEInfo::getReadyToRunHelper( +bool CEEInfo::getReadyToRunHelper( CORINFO_RESOLVED_TOKEN * pResolvedToken, + CORINFO_LOOKUP_KIND * pGenericLookupKind, CorInfoHelpFunc id, CORINFO_CONST_LOOKUP * pLookup ) @@ -10096,7 +10097,7 @@ bool CEEInfo::runWithErrorTrap(void (*function)(void*), void* param) // No dynamic contract here because SEH is used STATIC_CONTRACT_THROWS; STATIC_CONTRACT_GC_TRIGGERS; - STATIC_CONTRACT_SO_INTOLERANT; + STATIC_CONTRACT_SO_TOLERANT; STATIC_CONTRACT_MODE_PREEMPTIVE; // NOTE: the lack of JIT/EE transition markers in this method is intentional. Any diff --git a/src/vm/jitinterface.h b/src/vm/jitinterface.h index ace9608f0e..0df1884935 100644 --- a/src/vm/jitinterface.h +++ b/src/vm/jitinterface.h @@ -543,8 +543,9 @@ public: CorInfoHelpFunc getBoxHelper(CORINFO_CLASS_HANDLE cls); CorInfoHelpFunc getUnBoxHelper(CORINFO_CLASS_HANDLE cls); - void getReadyToRunHelper( + bool getReadyToRunHelper( CORINFO_RESOLVED_TOKEN * pResolvedToken, + CORINFO_LOOKUP_KIND * pGenericLookupKind, CorInfoHelpFunc id, CORINFO_CONST_LOOKUP * pLookup ); diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp index 8b6e216de4..79abbf7bc1 100644 --- a/src/zap/zapinfo.cpp +++ b/src/zap/zapinfo.cpp @@ -1582,7 +1582,6 @@ ZapInfo::getLocationOfThisType(CORINFO_METHOD_HANDLE context) return m_pEEJitInfo->getLocationOfThisType(context); } - void ZapInfo::embedGenericHandle(CORINFO_RESOLVED_TOKEN * pResolvedToken, BOOL fEmbedParent, @@ -3394,8 +3393,9 @@ CorInfoHelpFunc ZapInfo::getNewArrHelper(CORINFO_CLASS_HANDLE arrayCls) return m_pEEJitInfo->getNewArrHelper(arrayCls); } -void ZapInfo::getReadyToRunHelper( +bool ZapInfo::getReadyToRunHelper( CORINFO_RESOLVED_TOKEN * pResolvedToken, + CORINFO_LOOKUP_KIND * pGenericLookupKind, CorInfoHelpFunc id, CORINFO_CONST_LOOKUP * pLookup ) @@ -3481,6 +3481,9 @@ void ZapInfo::getReadyToRunHelper( pLookup->accessType = IAT_PVALUE; pLookup->addr = pImport; + return true; +#else + return false; #endif } diff --git a/src/zap/zapinfo.h b/src/zap/zapinfo.h index b472d4870b..059917acfb 100644 --- a/src/zap/zapinfo.h +++ b/src/zap/zapinfo.h @@ -546,8 +546,9 @@ public: CorInfoHelpFunc getBoxHelper(CORINFO_CLASS_HANDLE cls); CorInfoHelpFunc getUnBoxHelper(CORINFO_CLASS_HANDLE cls); - void getReadyToRunHelper( + bool getReadyToRunHelper( CORINFO_RESOLVED_TOKEN * pResolvedToken, + CORINFO_LOOKUP_KIND * pGenericLookupKind, CorInfoHelpFunc id, CORINFO_CONST_LOOKUP * pLookup ); |