#define SELECTANY extern __declspec(selectany)
#endif
-SELECTANY const GUID JITEEVersionIdentifier = { /* 09F7AAE2-07DF-4433-B8C5-BA864CCABDA3 */
- 0x9f7aae2,
- 0x7df,
- 0x4433,
- {0xb8, 0xc5, 0xba, 0x86, 0x4c, 0xca, 0xbd, 0xa3}
+SELECTANY const GUID JITEEVersionIdentifier = { /* FF09DB9F-26A8-4A0B-AF2C-78E32A516FE1 */
+ 0xff09db9f,
+ 0x26a8,
+ 0x4a0b,
+ {0xaf, 0x2c, 0x78, 0xe3, 0x2a, 0x51, 0x6f, 0xe1}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////
) = 0;
// Return method name as in metadata, or nullptr if there is none,
- // and optionally return the class and namespace names as in metadata.
+ // and optionally return the class, enclosing class, and namespace names
+ // as in metadata.
// Suitable for non-debugging use.
virtual const char* getMethodNameFromMetadata(
- CORINFO_METHOD_HANDLE ftn, /* IN */
- const char **className, /* OUT */
- const char **namespaceName /* OUT */
+ CORINFO_METHOD_HANDLE ftn, /* IN */
+ const char **className, /* OUT */
+ const char **namespaceName, /* OUT */
+ const char **enclosingClassName /* OUT */
) = 0;
// this function is for debugging only. It returns a value that
}
const char* WrapICorJitInfo::getMethodNameFromMetadata(
- CORINFO_METHOD_HANDLE ftn, /* IN */
- const char **className, /* OUT */
- const char **namespaceName /* OUT */)
+ CORINFO_METHOD_HANDLE ftn, /* IN */
+ const char **className, /* OUT */
+ const char **namespaceName, /* OUT */
+ const char **enclosingClassName /* OUT */)
{
API_ENTER(getMethodNameFromMetadata);
- const char* temp = wrapHnd->getMethodNameFromMetaData(ftn, moduleName, namespaceName);
+ const char* temp = wrapHnd->getMethodNameFromMetaData(ftn, className, namespaceName, enclosingClassName);
API_LEAVE(getMethodNameFromMetadata);
return temp;
}
// SIMD intrinsics are recognized by name.
const char* namespaceName = NULL;
const char* className = NULL;
- const char* methodName = m_interpCeeInfo.getMethodNameFromMetadata((CORINFO_METHOD_HANDLE)methToCall, &className, &namespaceName);
+ const char* methodName = m_interpCeeInfo.getMethodNameFromMetadata((CORINFO_METHOD_HANDLE)methToCall, &className, &namespaceName, NULL);
if (strcmp(methodName, "get_IsHardwareAccelerated") == 0)
{
GCX_COOP();
return result;
}
-const char* CEEInfo::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftnHnd, const char** className, const char** namespaceName)
+const char* CEEInfo::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftnHnd, const char** className, const char** namespaceName, const char **enclosingClassName)
{
CONTRACTL {
SO_TOLERANT;
const char* result = NULL;
const char* classResult = NULL;
const char* namespaceResult = NULL;
+ const char* enclosingResult = NULL;
JIT_TO_EE_TRANSITION();
if (!IsNilToken(token))
{
- if (!FAILED(ftn->GetMDImport()->GetNameOfMethodDef(token, &result)))
+ MethodTable* pMT = ftn->GetMethodTable();
+ IMDInternalImport* pMDImport = pMT->GetMDImport();
+
+ IfFailThrow(pMDImport->GetNameOfMethodDef(token, &result));
+ IfFailThrow(pMDImport->GetNameOfTypeDef(pMT->GetCl(), &classResult, &namespaceResult));
+ // Query enclosingClassName when the method is in a nested class
+ // and get the namespace of enclosing classes (nested class's namespace is empty)
+ if (pMT->GetClass()->IsNested())
{
- MethodTable* pMT = ftn->GetMethodTable();
- classResult = pMT->GetFullyQualifiedNameInfo(&namespaceResult);
+ IfFailThrow(pMDImport->GetNameOfTypeDef(pMT->GetEnclosingCl(), &enclosingResult, &namespaceResult));
}
}
*namespaceName = namespaceResult;
}
+ if (enclosingClassName != NULL)
+ {
+ *enclosingClassName = enclosingResult;
+ }
+
EE_TO_JIT_TRANSITION();
return result;
// ICorMethodInfo stuff
const char* getMethodName (CORINFO_METHOD_HANDLE ftnHnd, const char** scopeName);
- const char* getMethodNameFromMetadata (CORINFO_METHOD_HANDLE ftnHnd, const char** className, const char** namespaceName);
+ const char* getMethodNameFromMetadata (CORINFO_METHOD_HANDLE ftnHnd, const char** className, const char** namespaceName, const char **enclosingClassName);
unsigned getMethodHash (CORINFO_METHOD_HANDLE ftnHnd);
DWORD getMethodAttribs (CORINFO_METHOD_HANDLE ftnHnd);
return m_pEEJitInfo->getMethodName(ftn, moduleName);
}
-const char* ZapInfo::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, const char **className, const char** namespaceName)
+const char* ZapInfo::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, const char **className, const char** namespaceName, const char **enclosingClassName)
{
- return m_pEEJitInfo->getMethodNameFromMetadata(ftn, className, namespaceName);
+ return m_pEEJitInfo->getMethodNameFromMetadata(ftn, className, namespaceName, enclosingClassName);
}
unsigned ZapInfo::getMethodHash(CORINFO_METHOD_HANDLE ftn)
const char **moduleName);
const char* getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn,
const char **className,
- const char **namespaceName);
+ const char **namespaceName,
+ const char **enclosingClassName);
unsigned getMethodHash(CORINFO_METHOD_HANDLE ftn);
DWORD getMethodAttribs(CORINFO_METHOD_HANDLE ftn);