new JitEE interface method: expandRawHandleIntrinsic (dotnet/coreclr#12071)
authorSergey Andreenko <seandree@microsoft.com>
Tue, 6 Jun 2017 17:19:11 +0000 (10:19 -0700)
committerGitHub <noreply@github.com>
Tue, 6 Jun 2017 17:19:11 +0000 (10:19 -0700)
Create a new JitEE method expandRawHandleIntrinsic. Delete old isDelegateCreationAllowed and getAddrModuleDomainID.

Support CORINFO_INTRINSIC_GetRawHandle.
Change JITEEVersionIdentifier.
fix MEASURE_CLRAPI_CALLS: add resolveVirtualMethod and expandRawHandleIntrinsic there.

Commit migrated from https://github.com/dotnet/coreclr/commit/b23a11e834074e3e030b42fc8d93083e15b7545d

13 files changed:
src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h
src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp
src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp
src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp
src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp
src/coreclr/src/inc/corinfo.h
src/coreclr/src/jit/ICorJitInfo_API_names.h
src/coreclr/src/jit/ICorJitInfo_API_wrapper.hpp
src/coreclr/src/jit/importer.cpp
src/coreclr/src/vm/jitinterface.cpp
src/coreclr/src/vm/jitinterface.h
src/coreclr/src/zap/zapinfo.cpp
src/coreclr/src/zap/zapinfo.h

index 19feffa..00b5c1b 100644 (file)
@@ -118,6 +118,10 @@ CORINFO_METHOD_HANDLE resolveVirtualMethod(CORINFO_METHOD_HANDLE  virtualMethod,
                                            CORINFO_CLASS_HANDLE   implementingClass,
                                            CORINFO_CONTEXT_HANDLE ownerType);
 
+void expandRawHandleIntrinsic(
+    CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+    CORINFO_GENERICHANDLE_RESULT *  pResult);
+
 // If a method's attributes have (getMethodAttribs) CORINFO_FLG_INTRINSIC set,
 // getIntrinsicID() returns the intrinsic ID.
 // *pMustExpand tells whether or not JIT must expand the intrinsic.
@@ -150,9 +154,6 @@ BOOL isCompatibleDelegate(CORINFO_CLASS_HANDLE  objCls,          /* type of the
                           BOOL*                 pfIsOpenDelegate /* is the delegate open */
                           );
 
-// Determines whether the delegate creation obeys security transparency rules
-BOOL isDelegateCreationAllowed(CORINFO_CLASS_HANDLE delegateHnd, CORINFO_METHOD_HANDLE calleeHnd);
-
 // Indicates if the method is an instance of the generic
 // method that passes (or has passed) verification
 CorInfoInstantiationVerification isInstantiationOfVerifiedGeneric(CORINFO_METHOD_HANDLE method /* IN  */
@@ -720,8 +721,6 @@ const void* getInlinedCallFrameVptr(void** ppIndirection = NULL);
 
 LONG* getAddrOfCaptureThreadGlobal(void** ppIndirection = NULL);
 
-SIZE_T* getAddrModuleDomainID(CORINFO_MODULE_HANDLE module);
-
 // return the native entry point to an EE helper (see CorInfoHelpFunc)
 void* getHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection = NULL);
 
index 4741cf1..1ba0ed2 100644 (file)
@@ -235,6 +235,14 @@ CORINFO_METHOD_HANDLE interceptor_ICJI::resolveVirtualMethod(CORINFO_METHOD_HAND
     return result;
 }
 
+void interceptor_ICJI::expandRawHandleIntrinsic(
+    CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+    CORINFO_GENERICHANDLE_RESULT *  pResult)
+{
+    mc->cr->AddCall("expandRawHandleIntrinsic");
+    original_ICorJitInfo->expandRawHandleIntrinsic(pResolvedToken, pResult);
+}
+
 // If a method's attributes have (getMethodAttribs) CORINFO_FLG_INTRINSIC set,
 // getIntrinsicID() returns the intrinsic ID.
 CorInfoIntrinsics interceptor_ICJI::getIntrinsicID(CORINFO_METHOD_HANDLE method, bool* pMustExpand /* OUT */
@@ -303,15 +311,6 @@ BOOL interceptor_ICJI::isCompatibleDelegate(
     return temp;
 }
 
-// Determines whether the delegate creation obeys security transparency rules
-BOOL interceptor_ICJI::isDelegateCreationAllowed(CORINFO_CLASS_HANDLE delegateHnd, CORINFO_METHOD_HANDLE calleeHnd)
-{
-    mc->cr->AddCall("isDelegateCreationAllowed");
-    BOOL temp = original_ICorJitInfo->isDelegateCreationAllowed(delegateHnd, calleeHnd);
-    mc->recIsDelegateCreationAllowed(delegateHnd, calleeHnd, temp);
-    return temp;
-}
-
 // Indicates if the method is an instance of the generic
 // method that passes (or has passed) verification
 CorInfoInstantiationVerification interceptor_ICJI::isInstantiationOfVerifiedGeneric(CORINFO_METHOD_HANDLE method /* IN
@@ -1428,12 +1427,6 @@ LONG* interceptor_ICJI::getAddrOfCaptureThreadGlobal(void** ppIndirection)
     return temp;
 }
 
-SIZE_T* interceptor_ICJI::getAddrModuleDomainID(CORINFO_MODULE_HANDLE module)
-{
-    mc->cr->AddCall("getAddrModuleDomainID");
-    return original_ICorJitInfo->getAddrModuleDomainID(module);
-}
-
 // return the native entry point to an EE helper (see CorInfoHelpFunc)
 void* interceptor_ICJI::getHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection)
 {
index 1d45229..6760800 100644 (file)
@@ -162,6 +162,14 @@ CORINFO_METHOD_HANDLE interceptor_ICJI::resolveVirtualMethod(CORINFO_METHOD_HAND
     return original_ICorJitInfo->resolveVirtualMethod(virtualMethod, implementingClass, ownerType);
 }
 
+void interceptor_ICJI::expandRawHandleIntrinsic(
+    CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+    CORINFO_GENERICHANDLE_RESULT *  pResult)
+{
+    mcs->AddCall("expandRawHandleIntrinsic");
+    original_ICorJitInfo->expandRawHandleIntrinsic(pResolvedToken, pResult);
+}
+
 // If a method's attributes have (getMethodAttribs) CORINFO_FLG_INTRINSIC set,
 // getIntrinsicID() returns the intrinsic ID.
 CorInfoIntrinsics interceptor_ICJI::getIntrinsicID(CORINFO_METHOD_HANDLE method, bool* pMustExpand /* OUT */
@@ -217,13 +225,6 @@ BOOL interceptor_ICJI::isCompatibleDelegate(
     return original_ICorJitInfo->isCompatibleDelegate(objCls, methodParentCls, method, delegateCls, pfIsOpenDelegate);
 }
 
-// Determines whether the delegate creation obeys security transparency rules
-BOOL interceptor_ICJI::isDelegateCreationAllowed(CORINFO_CLASS_HANDLE delegateHnd, CORINFO_METHOD_HANDLE calleeHnd)
-{
-    mcs->AddCall("isDelegateCreationAllowed");
-    return original_ICorJitInfo->isDelegateCreationAllowed(delegateHnd, calleeHnd);
-}
-
 // Indicates if the method is an instance of the generic
 // method that passes (or has passed) verification
 CorInfoInstantiationVerification interceptor_ICJI::isInstantiationOfVerifiedGeneric(CORINFO_METHOD_HANDLE method /* IN
@@ -1126,12 +1127,6 @@ LONG* interceptor_ICJI::getAddrOfCaptureThreadGlobal(void** ppIndirection)
     return original_ICorJitInfo->getAddrOfCaptureThreadGlobal(ppIndirection);
 }
 
-SIZE_T* interceptor_ICJI::getAddrModuleDomainID(CORINFO_MODULE_HANDLE module)
-{
-    mcs->AddCall("getAddrModuleDomainID");
-    return original_ICorJitInfo->getAddrModuleDomainID(module);
-}
-
 // return the native entry point to an EE helper (see CorInfoHelpFunc)
 void* interceptor_ICJI::getHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection)
 {
index aca7536..b098eb6 100644 (file)
@@ -149,6 +149,13 @@ CORINFO_METHOD_HANDLE interceptor_ICJI::resolveVirtualMethod(CORINFO_METHOD_HAND
     return original_ICorJitInfo->resolveVirtualMethod(virtualMethod, implementingClass, ownerType);
 }
 
+void interceptor_ICJI::expandRawHandleIntrinsic(
+    CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+    CORINFO_GENERICHANDLE_RESULT *  pResult)
+{
+    return original_ICorJitInfo->expandRawHandleIntrinsic(pResolvedToken, pResult);
+}
+
 // If a method's attributes have (getMethodAttribs) CORINFO_FLG_INTRINSIC set,
 // getIntrinsicID() returns the intrinsic ID.
 CorInfoIntrinsics interceptor_ICJI::getIntrinsicID(CORINFO_METHOD_HANDLE method, bool* pMustExpand /* OUT */
@@ -198,12 +205,6 @@ BOOL interceptor_ICJI::isCompatibleDelegate(
     return original_ICorJitInfo->isCompatibleDelegate(objCls, methodParentCls, method, delegateCls, pfIsOpenDelegate);
 }
 
-// Determines whether the delegate creation obeys security transparency rules
-BOOL interceptor_ICJI::isDelegateCreationAllowed(CORINFO_CLASS_HANDLE delegateHnd, CORINFO_METHOD_HANDLE calleeHnd)
-{
-    return original_ICorJitInfo->isDelegateCreationAllowed(delegateHnd, calleeHnd);
-}
-
 // Indicates if the method is an instance of the generic
 // method that passes (or has passed) verification
 CorInfoInstantiationVerification interceptor_ICJI::isInstantiationOfVerifiedGeneric(CORINFO_METHOD_HANDLE method /* IN
@@ -1014,11 +1015,6 @@ LONG* interceptor_ICJI::getAddrOfCaptureThreadGlobal(void** ppIndirection)
     return original_ICorJitInfo->getAddrOfCaptureThreadGlobal(ppIndirection);
 }
 
-SIZE_T* interceptor_ICJI::getAddrModuleDomainID(CORINFO_MODULE_HANDLE module)
-{
-    return original_ICorJitInfo->getAddrModuleDomainID(module);
-}
-
 // return the native entry point to an EE helper (see CorInfoHelpFunc)
 void* interceptor_ICJI::getHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection)
 {
index 59ad3c5..d88e352 100644 (file)
@@ -184,6 +184,15 @@ CORINFO_METHOD_HANDLE MyICJI::resolveVirtualMethod(CORINFO_METHOD_HANDLE  virtua
     return result;
 }
 
+void MyICJI::expandRawHandleIntrinsic(
+    CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+    CORINFO_GENERICHANDLE_RESULT *  pResult)
+{
+    jitInstance->mc->cr->AddCall("expandRawHandleIntrinsic");
+    LogError("Hit unimplemented expandRawHandleIntrinsic");
+    DebugBreakorAV(129);
+}
+
 // If a method's attributes have (getMethodAttribs) CORINFO_FLG_INTRINSIC set,
 // getIntrinsicID() returns the intrinsic ID.
 CorInfoIntrinsics MyICJI::getIntrinsicID(CORINFO_METHOD_HANDLE method, bool* pMustExpand /* OUT */
@@ -238,13 +247,6 @@ BOOL MyICJI::isCompatibleDelegate(CORINFO_CLASS_HANDLE  objCls,          /* type
     return jitInstance->mc->repIsCompatibleDelegate(objCls, methodParentCls, method, delegateCls, pfIsOpenDelegate);
 }
 
-// Determines whether the delegate creation obeys security transparency rules
-BOOL MyICJI::isDelegateCreationAllowed(CORINFO_CLASS_HANDLE delegateHnd, CORINFO_METHOD_HANDLE calleeHnd)
-{
-    jitInstance->mc->cr->AddCall("isDelegateCreationAllowed");
-    return jitInstance->mc->repIsDelegateCreationAllowed(delegateHnd, calleeHnd);
-}
-
 // Indicates if the method is an instance of the generic
 // method that passes (or has passed) verification
 CorInfoInstantiationVerification MyICJI::isInstantiationOfVerifiedGeneric(CORINFO_METHOD_HANDLE method /* IN  */
@@ -1228,14 +1230,6 @@ LONG* MyICJI::getAddrOfCaptureThreadGlobal(void** ppIndirection)
     return jitInstance->mc->repGetAddrOfCaptureThreadGlobal(ppIndirection);
 }
 
-SIZE_T* MyICJI::getAddrModuleDomainID(CORINFO_MODULE_HANDLE module)
-{
-    jitInstance->mc->cr->AddCall("getAddrModuleDomainID");
-    LogError("Hit unimplemented getAddrModuleDomainID");
-    DebugBreakorAV(88);
-    return 0;
-}
-
 // return the native entry point to an EE helper (see CorInfoHelpFunc)
 void* MyICJI::getHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection)
 {
index 0620994..e27283c 100644 (file)
@@ -213,11 +213,11 @@ TODO: Talk about initializing strutures before use
     #define SELECTANY extern __declspec(selectany)
 #endif
 
-SELECTANY const GUID JITEEVersionIdentifier = { /* f00b3f49-ddd2-49be-ba43-6e49ffa66959 */
-    0xf00b3f49,
-    0xddd2,
-    0x49be,
-    { 0xba, 0x43, 0x6e, 0x49, 0xff, 0xa6, 0x69, 0x59 }
+SELECTANY const GUID JITEEVersionIdentifier = { /* e5708e9e-dd18-4287-8745-5d10ff2697cf */
+    0xe5708e9e,
+    0xdd18,
+    0x4287,
+    { 0x87, 0x45, 0x5d, 0x10, 0xff, 0x26, 0x97, 0xcf }
 };
 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -960,6 +960,7 @@ enum CorInfoIntrinsics
     CORINFO_INTRINSIC_ByReference_Value,
     CORINFO_INTRINSIC_Span_GetItem,
     CORINFO_INTRINSIC_ReadOnlySpan_GetItem,
+    CORINFO_INTRINSIC_GetRawHandle,
 
     CORINFO_INTRINSIC_Count,
     CORINFO_INTRINSIC_Illegal = -1,         // Not a true intrinsic,
@@ -2075,6 +2076,15 @@ public:
             CORINFO_CONTEXT_HANDLE      ownerType = NULL        /* IN */
             ) = 0;
 
+    // Given resolved token that corresponds to an intrinsic classified as
+    // a CORINFO_INTRINSIC_GetRawHandle intrinsic, fetch the handle associated
+    // with the token. If this is not possible at compile-time (because the current method's 
+    // code is shared and the token contains generic parameters) then indicate 
+    // how the handle should be looked up at runtime.
+    virtual void expandRawHandleIntrinsic(
+        CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+        CORINFO_GENERICHANDLE_RESULT *  pResult) = 0;
+
     // If a method's attributes have (getMethodAttribs) CORINFO_FLG_INTRINSIC set,
     // getIntrinsicID() returns the intrinsic ID.
     // *pMustExpand tells whether or not JIT must expand the intrinsic.
@@ -2119,13 +2129,6 @@ public:
             BOOL                        *pfIsOpenDelegate /* is the delegate open */
             ) = 0;
 
-    // Determines whether the delegate creation obeys security transparency rules
-    virtual BOOL isDelegateCreationAllowed (
-            CORINFO_CLASS_HANDLE        delegateHnd,
-            CORINFO_METHOD_HANDLE       calleeHnd
-            ) = 0;
-
-
     // Indicates if the method is an instance of the generic
     // method that passes (or has passed) verification
     virtual CorInfoInstantiationVerification isInstantiationOfVerifiedGeneric (
@@ -2846,8 +2849,6 @@ public:
                     void                  **ppIndirection = NULL
                     ) = 0;
 
-    virtual SIZE_T*       getAddrModuleDomainID(CORINFO_MODULE_HANDLE   module) = 0;
-
     // return the native entry point to an EE helper (see CorInfoHelpFunc)
     virtual void* getHelperFtn (
                     CorInfoHelpFunc         ftnNum,
index 601afbd..1330f81 100644 (file)
@@ -20,7 +20,6 @@ DEF_CLR_API(getUnmanagedCallConv)
 DEF_CLR_API(pInvokeMarshalingRequired)
 DEF_CLR_API(satisfiesMethodConstraints)
 DEF_CLR_API(isCompatibleDelegate)
-DEF_CLR_API(isDelegateCreationAllowed)
 DEF_CLR_API(isInstantiationOfVerifiedGeneric)
 DEF_CLR_API(initConstraintsForVerification)
 DEF_CLR_API(canSkipMethodVerification)
@@ -113,7 +112,6 @@ DEF_CLR_API(getSystemVAmd64PassStructInRegisterDescriptor)
 DEF_CLR_API(getThreadTLSIndex)
 DEF_CLR_API(getInlinedCallFrameVptr)
 DEF_CLR_API(getAddrOfCaptureThreadGlobal)
-DEF_CLR_API(getAddrModuleDomainID)
 DEF_CLR_API(getHelperFtn)
 DEF_CLR_API(getFunctionEntryPoint)
 DEF_CLR_API(getFunctionFixedEntryPoint)
@@ -167,5 +165,7 @@ DEF_CLR_API(recordRelocation)
 DEF_CLR_API(getRelocTypeHint)
 DEF_CLR_API(getModuleNativeEntryPointRange)
 DEF_CLR_API(getExpectedTargetArchitecture)
+DEF_CLR_API(resolveVirtualMethod)
+DEF_CLR_API(expandRawHandleIntrinsic)
 
 #undef DEF_CLR_API
index a3ad211..b9fd876 100644 (file)
@@ -189,17 +189,6 @@ BOOL WrapICorJitInfo::isCompatibleDelegate(
     return temp;
 }
 
-BOOL WrapICorJitInfo::isDelegateCreationAllowed(
-            CORINFO_CLASS_HANDLE        delegateHnd,
-            CORINFO_METHOD_HANDLE       calleeHnd)
-{
-    API_ENTER(isDelegateCreationAllowed);
-    BOOL temp = wrapHnd->isDelegateCreationAllowed(delegateHnd, calleeHnd);
-    API_LEAVE(isDelegateCreationAllowed);
-    return temp;
-}
-
-
 CorInfoInstantiationVerification WrapICorJitInfo::isInstantiationOfVerifiedGeneric(
             CORINFO_METHOD_HANDLE   method /* IN  */)
 {
@@ -1097,14 +1086,6 @@ LONG * WrapICorJitInfo::getAddrOfCaptureThreadGlobal(
     return temp;
 }
 
-SIZE_T*       WrapICorJitInfo::getAddrModuleDomainID(CORINFO_MODULE_HANDLE   module)
-{
-    API_ENTER(getAddrModuleDomainID);
-    SIZE_T* result = wrapHnd->getAddrModuleDomainID(module);
-    API_LEAVE(getAddrModuleDomainID);
-    return result;
-}
-
 void* WrapICorJitInfo::getHelperFtn(
                 CorInfoHelpFunc         ftnNum,
                 void                  **ppIndirection)
@@ -1615,6 +1596,27 @@ DWORD WrapICorJitInfo::getExpectedTargetArchitecture()
     return result;
 }
 
+CORINFO_METHOD_HANDLE WrapICorJitInfo::resolveVirtualMethod(
+    CORINFO_METHOD_HANDLE       virtualMethod,          /* IN */
+    CORINFO_CLASS_HANDLE        implementingClass,      /* IN */
+    CORINFO_CONTEXT_HANDLE      ownerType = NULL        /* IN */
+)
+{
+    API_ENTER(resolveVirtualMethod);
+    CORINFO_METHOD_HANDLE result = wrapHnd->resolveVirtualMethod(virtualMethod, implementingClass, ownerType);
+    API_LEAVE(resolveVirtualMethod);
+    return result;
+}
+
+void WrapICorJitInfo::expandRawHandleIntrinsic(
+    CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+    CORINFO_GENERICHANDLE_RESULT *  pResult)
+{
+    API_ENTER(expandRawHandleIntrinsic);
+    wrapHnd->expandRawHandleIntrinsic(pResolvedToken, pResult);
+    API_LEAVE(expandRawHandleIntrinsic);
+}
+
 /**********************************************************************************/
 // clang-format on
 /**********************************************************************************/
index 5cc5e4e..4f5aec0 100644 (file)
@@ -3728,6 +3728,38 @@ GenTreePtr Compiler::impIntrinsic(GenTreePtr            newobjThis,
             break;
         }
 
+        case CORINFO_INTRINSIC_GetRawHandle:
+        {
+            noway_assert(IsTargetAbi(CORINFO_CORERT_ABI)); // Only CoreRT supports it.
+            CORINFO_RESOLVED_TOKEN resolvedToken;
+            resolvedToken.tokenContext = MAKE_METHODCONTEXT(info.compMethodHnd);
+            resolvedToken.tokenScope   = info.compScopeHnd;
+            resolvedToken.token        = memberRef;
+            resolvedToken.tokenType    = CORINFO_TOKENKIND_Method;
+
+            CORINFO_GENERICHANDLE_RESULT embedInfo;
+            info.compCompHnd->expandRawHandleIntrinsic(&resolvedToken, &embedInfo);
+
+            GenTreePtr rawHandle = impLookupToTree(&resolvedToken, &embedInfo.lookup, gtTokenToIconFlags(memberRef),
+                                                   embedInfo.compileTimeHandle);
+            if (rawHandle == nullptr)
+            {
+                return nullptr;
+            }
+
+            noway_assert(genTypeSize(rawHandle->TypeGet()) == genTypeSize(TYP_I_IMPL));
+
+            unsigned rawHandleSlot = lvaGrabTemp(true DEBUGARG("rawHandle"));
+            impAssignTempGen(rawHandleSlot, rawHandle, clsHnd, (unsigned)CHECK_SPILL_NONE);
+
+            GenTreePtr lclVar     = gtNewLclvNode(rawHandleSlot, TYP_I_IMPL);
+            GenTreePtr lclVarAddr = gtNewOperNode(GT_ADDR, TYP_I_IMPL, lclVar);
+            var_types  resultType = JITtype2varType(sig->retType);
+            retNode               = gtNewOperNode(GT_IND, resultType, lclVarAddr);
+
+            break;
+        }
+
         default:
             /* Unknown intrinsic */
             break;
@@ -6689,6 +6721,11 @@ var_types Compiler::impImportCall(OPCODE                  opcode,
             call = impIntrinsic(newobjThis, clsHnd, methHnd, sig, pResolvedToken->token, readonlyCall,
                                 (canTailCall && (tailCall != 0)), &intrinsicID);
 
+            if (compIsForInlining() && compInlineResult->IsFailure())
+            {
+                return callRetTyp;
+            }
+
             if (call != nullptr)
             {
                 assert(!(mflags & CORINFO_FLG_VIRTUAL) || (mflags & CORINFO_FLG_FINAL) ||
index c28d6e1..e5d6efe 100644 (file)
@@ -8743,6 +8743,14 @@ CORINFO_METHOD_HANDLE CEEInfo::resolveVirtualMethod(CORINFO_METHOD_HANDLE method
     return result;
 }
 
+void CEEInfo::expandRawHandleIntrinsic(
+    CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+    CORINFO_GENERICHANDLE_RESULT *  pResult)
+{
+    LIMITED_METHOD_CONTRACT;
+    UNREACHABLE();      // only called with CoreRT.
+}
+
 /*********************************************************************/
 void CEEInfo::getFunctionEntryPoint(CORINFO_METHOD_HANDLE  ftnHnd,
                                     CORINFO_CONST_LOOKUP * pResult,
@@ -9591,21 +9599,6 @@ BOOL CEEInfo::isCompatibleDelegate(
     return result;
 }
 
-// Determines whether the delegate creation obeys security transparency rules
-BOOL CEEInfo::isDelegateCreationAllowed (
-        CORINFO_CLASS_HANDLE        delegateHnd,
-        CORINFO_METHOD_HANDLE       calleeHnd)
-{
-    CONTRACTL {
-        SO_TOLERANT;
-        THROWS;
-        GC_TRIGGERS;
-        MODE_PREEMPTIVE;
-    } CONTRACTL_END;
-
-    return TRUE;
-}
-
 /*********************************************************************/
     // return the unmanaged target *if method has already been prelinked.*
 void* CEEInfo::getPInvokeUnmanagedTarget(CORINFO_METHOD_HANDLE method,
@@ -9866,29 +9859,6 @@ const void * CEEInfo::getInlinedCallFrameVptr(void **ppIndirection)
     return result;
 }
 
-
-SIZE_T * CEEInfo::getAddrModuleDomainID(CORINFO_MODULE_HANDLE   module)
-{
-    CONTRACTL {
-        SO_TOLERANT;
-        NOTHROW;
-        GC_NOTRIGGER;
-        MODE_PREEMPTIVE;
-    } CONTRACTL_END;
-
-    SIZE_T * result = NULL;
-
-    JIT_TO_EE_TRANSITION_LEAF();
-
-    Module* pModule = GetModule(module);
-
-    result = pModule->GetAddrModuleID();
-
-    EE_TO_JIT_TRANSITION_LEAF();
-
-    return result;
-}
-
 LONG * CEEInfo::getAddrOfCaptureThreadGlobal(void **ppIndirection)
 {
     CONTRACTL {
index d287248..182e797 100644 (file)
@@ -741,6 +741,10 @@ public:
         CORINFO_CONTEXT_HANDLE ownerType
         );
 
+    void expandRawHandleIntrinsic(
+        CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+        CORINFO_GENERICHANDLE_RESULT *  pResult);
+
     CorInfoIntrinsics getIntrinsicID(CORINFO_METHOD_HANDLE method,
                                      bool * pMustExpand = NULL);
 
@@ -777,11 +781,6 @@ public:
             CORINFO_CLASS_HANDLE        delegateCls,
             BOOL*                       pfIsOpenDelegate);
 
-    // Determines whether the delegate creation obeys security transparency rules
-    BOOL isDelegateCreationAllowed (
-            CORINFO_CLASS_HANDLE        delegateHnd,
-            CORINFO_METHOD_HANDLE       calleeHnd);
-
     // ICorFieldInfo stuff
     const char* getFieldName (CORINFO_FIELD_HANDLE field,
                               const char** scopeName);
@@ -898,10 +897,6 @@ public:
     DWORD getThreadTLSIndex(void **ppIndirection);
     const void * getInlinedCallFrameVptr(void **ppIndirection);
 
-    // Returns the address of the domain neutral module id. This only makes sense for domain neutral (shared)
-    // modules
-    SIZE_T* getAddrModuleDomainID(CORINFO_MODULE_HANDLE   module);
-
     LONG * getAddrOfCaptureThreadGlobal(void **ppIndirection);
     void* getHelperFtn(CorInfoHelpFunc    ftnNum,                 /* IN  */
                        void **            ppIndirection);         /* OUT */
index 60e03af..554783f 100644 (file)
@@ -1411,11 +1411,6 @@ const void * ZapInfo::getInlinedCallFrameVptr(void **ppIndirection)
     return NULL;
 }
 
-SIZE_T* ZapInfo::getAddrModuleDomainID(CORINFO_MODULE_HANDLE   module)
-{
-    return m_pEEJitInfo->getAddrModuleDomainID(module);
-}
-
 LONG * ZapInfo::getAddrOfCaptureThreadGlobal(void **ppIndirection)
 {
     _ASSERTE(ppIndirection != NULL);
@@ -3723,6 +3718,13 @@ CORINFO_METHOD_HANDLE ZapInfo::resolveVirtualMethod(
     return m_pEEJitInfo->resolveVirtualMethod(virtualMethod, implementingClass, ownerType);
 }
 
+void ZapInfo::expandRawHandleIntrinsic(
+    CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+    CORINFO_GENERICHANDLE_RESULT *  pResult)
+{
+    m_pEEJitInfo->expandRawHandleIntrinsic(pResolvedToken, pResult);
+}
+
 CorInfoIntrinsics ZapInfo::getIntrinsicID(CORINFO_METHOD_HANDLE method,
                                           bool * pMustExpand)
 {
@@ -3778,13 +3780,6 @@ BOOL ZapInfo::isCompatibleDelegate(
     return m_pEEJitInfo->isCompatibleDelegate(objCls, methodParentCls, method, delegateCls, pfIsOpenDelegate);
 }
 
-BOOL ZapInfo::isDelegateCreationAllowed (
-        CORINFO_CLASS_HANDLE        delegateHnd,
-        CORINFO_METHOD_HANDLE       calleeHnd)
-{
-    return m_pEEJitInfo->isDelegateCreationAllowed(delegateHnd, calleeHnd);
-}
-
 //
 // ICorErrorInfo
 //
index 6e83657..44ad5de 100644 (file)
@@ -326,7 +326,6 @@ public:
     DWORD getThreadTLSIndex(void **ppIndirection);
     const void * getInlinedCallFrameVptr(void **ppIndirection);
     LONG * getAddrOfCaptureThreadGlobal(void **ppIndirection);
-    SIZE_T* getAddrModuleDomainID(CORINFO_MODULE_HANDLE   module);
 
     // get slow lazy string literal helper to use (CORINFO_HELP_STRCNS*). 
     // Returns CORINFO_HELP_UNDEF if lazy string literal helper cannot be used.
@@ -671,6 +670,10 @@ public:
         CORINFO_CONTEXT_HANDLE ownerType
         );
 
+    void expandRawHandleIntrinsic(
+        CORINFO_RESOLVED_TOKEN *        pResolvedToken,
+        CORINFO_GENERICHANDLE_RESULT *  pResult);
+
     CorInfoIntrinsics getIntrinsicID(CORINFO_METHOD_HANDLE method,
                                      bool * pMustExpand = NULL);
     bool isInSIMDModule(CORINFO_CLASS_HANDLE classHnd);
@@ -688,9 +691,6 @@ public:
                               CORINFO_CLASS_HANDLE delegateCls,
                               BOOL* pfIsOpenDelegate);
 
-    BOOL isDelegateCreationAllowed(CORINFO_CLASS_HANDLE        delegateHnd,
-                                   CORINFO_METHOD_HANDLE       calleeHnd);
-
     void getGSCookie(GSCookie * pCookieVal, 
                      GSCookie** ppCookieVal);
     // ICorErrorInfo