// Creates a new expression with a given debuggee value and frame
-ExpressionNode::ExpressionNode(__in_z WCHAR* pExpression, ICorDebugValue* pValue, ICorDebugILFrame* pFrame)
+ExpressionNode::ExpressionNode(__in_z const WCHAR* pExpression, ICorDebugValue* pValue, ICorDebugILFrame* pFrame)
{
Init(pValue, NULL, pFrame);
_snwprintf_s(pAbsoluteExpression, MAX_EXPRESSION, _TRUNCATE, L"%s", pExpression);
}
// Creates a new expression that has an error and no value
-ExpressionNode::ExpressionNode(__in_z WCHAR* pExpression, __in_z WCHAR* pErrorMessage)
+ExpressionNode::ExpressionNode(__in_z const WCHAR* pExpression, __in_z const WCHAR* pErrorMessage)
{
Init(NULL, NULL, NULL);
_snwprintf_s(pAbsoluteExpression, MAX_EXPRESSION, _TRUNCATE, L"%s", pExpression);
}
// Creates a new child expression
-ExpressionNode::ExpressionNode(__in_z WCHAR* pParentExpression, ChildKind ck, __in_z WCHAR* pRelativeExpression, ICorDebugValue* pValue, ICorDebugType* pType, ICorDebugILFrame* pFrame, UVCP_CONSTANT pDefaultValue, ULONG cchDefaultValue)
+ExpressionNode::ExpressionNode(__in_z const WCHAR* pParentExpression, ChildKind ck, __in_z const WCHAR* pRelativeExpression, ICorDebugValue* pValue, ICorDebugType* pType, ICorDebugILFrame* pFrame, UVCP_CONSTANT pDefaultValue, ULONG cchDefaultValue)
{
Init(pValue, pType, pFrame);
if(ck == ChildKind_BaseClass)
// Searches the debuggee for any ICorDebugType that matches the given fully qualified name
// This will search across all AppDomains and Assemblies
-HRESULT ExpressionNode::FindTypeByName(__in_z WCHAR* pTypeName, ICorDebugType** ppType)
+HRESULT ExpressionNode::FindTypeByName(__in_z const WCHAR* pTypeName, ICorDebugType** ppType)
{
HRESULT Status = S_OK;
ToRelease<ICorDebugAppDomainEnum> pAppDomainEnum;
// Searches the debuggee for any ICorDebugType that matches the given fully qualified name
// This will search across all Assemblies in the given AppDomain
-HRESULT ExpressionNode::FindTypeByName(ICorDebugAppDomain* pAppDomain, __in_z WCHAR* pTypeName, ICorDebugType** ppType)
+HRESULT ExpressionNode::FindTypeByName(ICorDebugAppDomain* pAppDomain, __in_z const WCHAR* pTypeName, ICorDebugType** ppType)
{
HRESULT Status = S_OK;
ToRelease<ICorDebugAssemblyEnum> pAssemblyEnum;
}
// Searches the assembly for any ICorDebugType that matches the given fully qualified name
-HRESULT ExpressionNode::FindTypeByName(ICorDebugAssembly* pAssembly, __in_z WCHAR* pTypeName, ICorDebugType** ppType)
+HRESULT ExpressionNode::FindTypeByName(ICorDebugAssembly* pAssembly, __in_z const WCHAR* pTypeName, ICorDebugType** ppType)
{
HRESULT Status = S_OK;
ToRelease<ICorDebugModuleEnum> pModuleEnum;
}
// Searches a given module for any ICorDebugType that matches the given fully qualified type name
-HRESULT ExpressionNode::FindTypeByName(ICorDebugModule* pModule, __in_z WCHAR* pTypeName, ICorDebugType** ppType)
+HRESULT ExpressionNode::FindTypeByName(ICorDebugModule* pModule, __in_z const WCHAR* pTypeName, ICorDebugType** ppType)
{
HRESULT Status = S_OK;
ToRelease<IUnknown> pMDUnknown;
// If the name contains a generic argument list, extract the type name from
// before the list
WCHAR rootName[mdNameLen];
- WCHAR* pRootName = NULL;
+ const WCHAR* pRootName = NULL;
int typeNameLen = (int) _wcslen(pTypeName);
int genericParamListStart = (int) _wcscspn(pTypeName, L"<");
if(genericParamListStart != typeNameLen)
}
typeParams = new ToRelease<ICorDebugType>[countTypeParams];
- WCHAR* pCurName = pTypeName + genericParamListStart+1;
+ const WCHAR* pCurName = pTypeName + genericParamListStart+1;
for(int i = 0; i < countTypeParams; i++)
{
WCHAR typeParamName[mdNameLen];
- WCHAR* pNextComma = _wcschr(pCurName, L',');
+ const WCHAR* pNextComma = _wcschr(pCurName, L',');
int len = (pNextComma != NULL) ? (int)(pNextComma - pCurName) : (int)_wcslen(pCurName)-1;
if(len > mdNameLen)
return E_FAIL;
};
// Creates a new expression with a given debuggee value and frame
- ExpressionNode(__in_z WCHAR* pExpression, ICorDebugValue* pValue, ICorDebugILFrame* pFrame);
+ ExpressionNode(__in_z const WCHAR* pExpression, ICorDebugValue* pValue, ICorDebugILFrame* pFrame);
// Creates a new expression that has an error and no value
- ExpressionNode(__in_z WCHAR* pExpression, __in_z WCHAR* pErrorMessage);
+ ExpressionNode(__in_z const WCHAR* pExpression, __in_z const WCHAR* pErrorMessage);
// Creates a new child expression
- ExpressionNode(__in_z WCHAR* pParentExpression, ChildKind ck, __in_z WCHAR* pRelativeExpression, ICorDebugValue* pValue, ICorDebugType* pType, ICorDebugILFrame* pFrame, UVCP_CONSTANT pDefaultValue = NULL, ULONG cchDefaultValue = 0);
+ ExpressionNode(__in_z const WCHAR* pParentExpression, ChildKind ck, __in_z const WCHAR* pRelativeExpression, ICorDebugValue* pValue, ICorDebugType* pType, ICorDebugILFrame* pFrame, UVCP_CONSTANT pDefaultValue = NULL, ULONG cchDefaultValue = 0);
// Common member initialization for the constructors
VOID Init(ICorDebugValue* pValue, ICorDebugType* pTypeCast, ICorDebugILFrame* pFrame);
// Searches the debuggee for any ICorDebugType that matches the given fully qualified name
// This will search across all AppDomains and Assemblies
- static HRESULT FindTypeByName(__in_z WCHAR* pTypeName, ICorDebugType** ppType);
+ static HRESULT FindTypeByName(__in_z const WCHAR* pTypeName, ICorDebugType** ppType);
// Searches the debuggee for any ICorDebugType that matches the given fully qualified name
// This will search across all Assemblies in the given AppDomain
- static HRESULT FindTypeByName(ICorDebugAppDomain* pAppDomain, __in_z WCHAR* pTypeName, ICorDebugType** ppType);
+ static HRESULT FindTypeByName(ICorDebugAppDomain* pAppDomain, __in_z const WCHAR* pTypeName, ICorDebugType** ppType);
// Searches the assembly for any ICorDebugType that matches the given fully qualified name
- static HRESULT FindTypeByName(ICorDebugAssembly* pAssembly, __in_z WCHAR* pTypeName, ICorDebugType** ppType);
+ static HRESULT FindTypeByName(ICorDebugAssembly* pAssembly, __in_z const WCHAR* pTypeName, ICorDebugType** ppType);
// Searches a given module for any ICorDebugType that matches the given fully qualified type name
- static HRESULT FindTypeByName(ICorDebugModule* pModule, __in_z WCHAR* pTypeName, ICorDebugType** ppType);
+ static HRESULT FindTypeByName(ICorDebugModule* pModule, __in_z const WCHAR* pTypeName, ICorDebugType** ppType);
// Checks whether the given token is or refers to type System.ValueType or System.Enum
static HRESULT IsTokenValueTypeOrEnum(mdToken token, IMetaDataImport* pMetadata, BOOL* pResult);
if (pFntGetProcessTimes && pFntGetProcessTimes (hProcess,&CreationTime,&ExitTime,&KernelTime,&UserTime)) {
ExtOut("---------------------------------------\n");
ExtOut("Process Times\n");
- static char *Month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
+ static const char *Month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec"};
SYSTEMTIME SystemTime;
FILETIME LocalFileTime;
typedef struct PROTECT_MASK
{
DWORD Bit;
- PSTR Name;
+ PCSTR Name;
} PROTECT_MASK, *PPROTECT_MASK;
VOID
PrintIndividualStat(
- ___in __in_z IN PSTR Name,
+ ___in __in_z IN PCSTR Name,
IN PINDIVIDUAL_STAT Stat
)
{
VOID
PrintVmStats(
- ___in __in_z IN PSTR Name,
+ ___in __in_z IN PCSTR Name,
IN PVM_STATS Stats
)
{
size_t capacity_Buffer
)
{
- PSTR result;
+ PCSTR result;
CHAR invalidStr[sizeof("12345678")];
switch( State )
size_t capacity_Buffer
)
{
- PSTR result;
+ PCSTR result;
CHAR invalidStr[sizeof("12345678")];
switch( Type )
void recReportInliningDecision(CORINFO_METHOD_HANDLE inlinerHnd, CORINFO_METHOD_HANDLE inlineeHnd, CorInfoInline inlineResult, const char * reason);
void dmpReportInliningDecision(DWORD key, const Agnostic_ReportInliningDecision& value);
- CorInfoInline CompileResult::repReportInliningDecision(CORINFO_METHOD_HANDLE inlinerHnd, CORINFO_METHOD_HANDLE inlineeHnd);
+ CorInfoInline repReportInliningDecision(CORINFO_METHOD_HANDLE inlinerHnd, CORINFO_METHOD_HANDLE inlineeHnd);
void recSetEHcount(unsigned cEH);
void dmpSetEHcount(DWORD key, DWORD value);
void dmpGetMethodName(DLD key, DD value);
const char *repGetMethodName(CORINFO_METHOD_HANDLE ftn, const char **moduleName);
- void MethodContext::recGetJitFlags(CORJIT_FLAGS *jitFlags, DWORD sizeInBytes, DWORD result);
- void MethodContext::dmpGetJitFlags(DWORD key, DD value);
- DWORD MethodContext::repGetJitFlags(CORJIT_FLAGS *jitFlags, DWORD sizeInBytes);
+ void recGetJitFlags(CORJIT_FLAGS *jitFlags, DWORD sizeInBytes, DWORD result);
+ void dmpGetJitFlags(DWORD key, DD value);
+ DWORD repGetJitFlags(CORJIT_FLAGS *jitFlags, DWORD sizeInBytes);
void recGetJitTimeLogFilename(LPCWSTR tempFileName);
void dmpGetJitTimeLogFilename(DWORD key, DWORD value);
#define CULTURETYPES_FRAMEWORKCULTURES 0x0040
-const LPWSTR WHIDBEY_FRAMEWORK_CULTURE_LIST [] =
+const LPCWSTR WHIDBEY_FRAMEWORK_CULTURE_LIST [] =
{
W(""),
W("af"),
}
}
- bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions)
+ bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions)
{
if (!m_tpaList.CStr()) return false;
}
}
- void AddFilesFromDirectoryToTPAList(_In_z_ wchar_t* targetPath, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions)
+ void AddFilesFromDirectoryToTPAList(_In_z_ wchar_t* targetPath, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions)
{
*m_log << W("Adding assemblies from ") << targetPath << W(" to the TPA list") << Logger::endl;
wchar_t assemblyPath[MAX_LONGPATH];
// On first call, scans the coreclr directory for dlls and adds them all to the list.
const wchar_t * GetTpaList() {
if (!m_tpaList.CStr()) {
- wchar_t *rgTPAExtensions[] = {
+ const wchar_t *rgTPAExtensions[] = {
W("*.ni.dll"), // Probe for .ni.dll first so that it's preferred if ni and il coexist in the same dir
W("*.dll"),
W("*.ni.exe"),
}
}
- bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions)
+ bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions)
{
if (m_tpaList.IsEmpty()) return false;
}
}
- void AddFilesFromDirectoryToTPAList(_In_z_ const wchar_t* targetPath, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions)
+ void AddFilesFromDirectoryToTPAList(_In_z_ const wchar_t* targetPath, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions)
{
*m_log << W("Adding assemblies from ") << targetPath << W(" to the TPA list") << Logger::endl;
StackSString assemblyPath;
// On first call, scans the coreclr directory for dlls and adds them all to the list.
const wchar_t * GetTpaList() {
if (m_tpaList.IsEmpty()) {
- wchar_t *rgTPAExtensions[] = {
+ const wchar_t *rgTPAExtensions[] = {
W("*.ni.dll"), // Probe for .ni.dll first so that it's preferred if ni and il coexist in the same dir
W("*.dll"),
W("*.ni.exe"),
if (FAILED(GetClrSystemDirectory(wszSystemDir)))
return FALSE;
- WCHAR* wzMachine;
+ const WCHAR* wzMachine;
if(pewriter.isIA64())
wzMachine = L"IA64";
else if(pewriter.isAMD64())
LIMITED_METHOD_CONTRACT;
#ifndef __GNUC__ // these crash GCC
- static_assert_no_msg(s_growth_factor_numerator > s_growth_factor_denominator);
- static_assert_no_msg(s_density_factor_numerator < s_density_factor_denominator);
+ static_assert_no_msg(SHash<TRAITS>::s_growth_factor_numerator > SHash<TRAITS>::s_growth_factor_denominator);
+ static_assert_no_msg(SHash<TRAITS>::s_density_factor_numerator < SHash<TRAITS>::s_density_factor_denominator);
#endif
}
HANDLE & pPrivateNamespace,
PSID* pSID,
BOOL bCreate);
- static HRESULT IPCShared::FreeHandles(HANDLE & hDescriptor, PSID & pSID);
- static HRESULT IPCShared::FreeHandles(HANDLE & hBoundaryDescriptor, PSID & pSID, HANDLE & hPrivateNamespace);
+ static HRESULT FreeHandles(HANDLE & hDescriptor, PSID & pSID);
+ static HRESULT FreeHandles(HANDLE & hBoundaryDescriptor, PSID & pSID, HANDLE & hPrivateNamespace);
static HRESULT CreateWinNTDescriptor(DWORD pid, BOOL bRestrictiveACL, SECURITY_ATTRIBUTES **ppSA, KernelObject whatObject);
static HRESULT CreateWinNTDescriptor(DWORD pid, BOOL bRestrictiveACL, SECURITY_ATTRIBUTES **ppSA, KernelObject whatObject, EDescriptorType descType);
static void DestroySecurityAttributes(SECURITY_ATTRIBUTES *pSA);
// Returns an iterator that will produce the use edge to each operand of this node. Differs
// from the sequence of nodes produced by a loop over `GetChild` in its handling of call, phi,
// and block op nodes.
- GenTreeUseEdgeIterator GenTree::UseEdgesBegin();
- GenTreeUseEdgeIterator GenTree::UseEdgesEnd();
+ GenTreeUseEdgeIterator UseEdgesBegin();
+ GenTreeUseEdgeIterator UseEdgesEnd();
- IteratorPair<GenTreeUseEdgeIterator> GenTree::UseEdges();
+ IteratorPair<GenTreeUseEdgeIterator> UseEdges();
// Returns an iterator that will produce each operand of this node. Differs from the sequence
// of nodes produced by a loop over `GetChild` in its handling of call, phi, and block op
}
bool ImmedValNeedsReloc(Compiler* comp);
- bool GenTreeIntConCommon::ImmedValCanBeFolded(Compiler* comp, genTreeOps op);
+ bool ImmedValCanBeFolded(Compiler* comp, genTreeOps op);
#ifdef _TARGET_XARCH_
bool FitsInAddrBase(Compiler* comp);
static BOOL ConvertWellKnownTypeNameFromClrToWinRT(LPCSTR *pszFullName);
// Map a well-known CLR typename to WinRT typename
- static BOOL WinMDAdapter::ConvertWellKnownTypeNameFromClrToWinRT(LPCSTR *pszNamespace, LPCSTR *pszName);
+ static BOOL ConvertWellKnownTypeNameFromClrToWinRT(LPCSTR *pszNamespace, LPCSTR *pszName);
// Returns names of redirected type 'index'.
static void GetRedirectedTypeInfo(
static const WCHAR VolumeSeparatorChar;
#define UNCPATHPREFIX W("\\\\")
#endif //FEATURE_PAL
- static const WCHAR LongFile::DirectorySeparatorChar;
- static const WCHAR LongFile::AltDirectorySeparatorChar;
+ static const WCHAR DirectorySeparatorChar;
+ static const WCHAR AltDirectorySeparatorChar;
public:
static BOOL IsExtended(SString & path);
static BOOL IsUNCExtended(SString & path);
OpInfo::OpInfoData OpInfo::table[] = {
-#ifdef _MSC_VER
-#define OPDEF(c,s,pop,push,args,type,l,s1,s2,ctrl) \
- { s, args + type, FLOW_ ## ctrl, pop, push, c },
-#else
#define OPDEF(c,s,pop,push,args,type,l,s1,s2,ctrl) \
{ s, (OPCODE_FORMAT) (args + type), FLOW_ ## ctrl, pop, push, c },
-#endif
// Kind of a workaround, get the prefixes (IInternal) to return InlineOpcode instead of InlineNone
#define IInternal (InlineOpcode - InlineNone)
struct IMGHLPFN_LOAD
{
- LPSTR pszFnName;
+ LPCSTR pszFnName;
LPVOID * ppvfn;
};
}
CHAR rgchUndec[256];
- CHAR * pszSymbol = NULL;
+ const CHAR * pszSymbol = NULL;
// Name field of IMAGEHLP_SYMBOL is dynamically sized.
// Pad with space for 255 characters.
{
// Now, load the compat jit and initialize it.
- LPWSTR pwzJitName = MAKEDLLNAME_W(L"compatjit");
+ LPCWSTR pwzJitName = MAKEDLLNAME_W(L"compatjit");
// Note: if the compatjit fails to load, we ignore it, and continue to use the main JIT for
// everything. You can imagine a policy where if the user requests the compatjit, and we fail
#ifdef FEATURE_CORECLR
// For coresys we need to look for an API in some apiset dll on win8 if we can't find it
// in the traditional dll.
-HINSTANCE LoadDllForAPI(WCHAR* dllTraditional, WCHAR* dllApiSet)
+HINSTANCE LoadDllForAPI(const WCHAR* dllTraditional, const WCHAR* dllApiSet)
{
HINSTANCE hinst = WszLoadLibrary(dllTraditional);
static FCDECL2(void, ChangeWrapperHandleStrength, Object* orefUNSAFE, CLR_BOOL fIsWeak);
static FCDECL2(void, InitializeWrapperForWinRT, Object *unsafe_pThis, IUnknown **ppUnk);
static FCDECL2(void, InitializeManagedWinRTFactoryObject, Object *unsafe_pThis, ReflectClassBaseObject *unsafe_pType);
- static FCDECL1(Object *, MarshalNative::GetNativeActivationFactory, ReflectClassBaseObject *unsafe_pType);
+ static FCDECL1(Object *, GetNativeActivationFactory, ReflectClassBaseObject *unsafe_pType);
static void QCALLTYPE GetInspectableIIDs(QCall::ObjectHandleOnStack hobj, QCall::ObjectHandleOnStack retArrayGuids);
static void QCALLTYPE GetCachedWinRTTypes(QCall::ObjectHandleOnStack hadObj, int * epoch, QCall::ObjectHandleOnStack retArrayMT);
static void QCALLTYPE GetCachedWinRTTypeByIID(QCall::ObjectHandleOnStack hadObj, GUID iid, void * * ppMT);
public:
static MethodTable *GetWinRTTypeForRedirectedDelegateIndex(WinMDAdapter::RedirectedTypeIndex index);
- static bool WinRTDelegateRedirector::ResolveRedirectedDelegate(MethodTable *pMT, WinMDAdapter::RedirectedTypeIndex *pIndex);
+ static bool ResolveRedirectedDelegate(MethodTable *pMT, WinMDAdapter::RedirectedTypeIndex *pIndex);
};
#endif // WINRT_DELEGATE_REDIRECTOR_H
}
#pragma warning(push)
+#if _MSC_VER <= 1900
// 'BOOL' forcing value to bool 'true' or 'false'
#pragma warning(disable: 4800)
+#endif
extern "C" DLL_EXPORT bool __stdcall Marshal_As_In(/*[in]*/bool boolValue)
{
const int NSTRINGS = 6;
#ifdef _WIN32
-wchar_t *utf8strings[] = { L"Managed",
+const wchar_t *utf8strings[] = { L"Managed",
L"S\x00EEne kl\x00E2wen durh die wolken sint geslagen" ,
L"\x0915\x093E\x091A\x0902 \x0936\x0915\x094D\x0928\x094B\x092E\x094D\x092F\x0924\x094D\x0924\x0941\x092E\x094D \x0964 \x0928\x094B\x092A\x0939\x093F\x0928\x0938\x094D\x0924\x093F \x092E\x093E\x092E\x094D",
L"\x6211\x80FD\x541E\x4E0B\x73BB\x7483\x800C\x4E0D\x4F24\x8EAB\x4F53",
-char* utf16_to_utf8(wchar_t *srcstring)
+char* utf16_to_utf8(const wchar_t *srcstring)
{
if ((srcstring == NULL) || (*srcstring == L'\0')) {
return 0;