diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2016-03-07 11:41:19 -0800 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2016-03-07 11:41:19 -0800 |
commit | cc90f62e4b4f45e6b9b3e9ee2251df32fad9f2f0 (patch) | |
tree | ee6abe636390ae3e926ee8bc40273e7b001e03b2 /src/jit/utils.cpp | |
parent | e454121ee731e35de9244596c4a5cd1563d455fe (diff) | |
download | coreclr-cc90f62e4b4f45e6b9b3e9ee2251df32fad9f2f0.tar.gz coreclr-cc90f62e4b4f45e6b9b3e9ee2251df32fad9f2f0.tar.bz2 coreclr-cc90f62e4b4f45e6b9b3e9ee2251df32fad9f2f0.zip |
Reapply change 1578859: Add a new set of APIs for JIT configuration.
SuperPMI has been udpated to accommodate this change, and should no
longer crash when run using a JIT built with these changes.
[tfs-changeset: 1582144]
Diffstat (limited to 'src/jit/utils.cpp')
-rw-r--r-- | src/jit/utils.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/jit/utils.cpp b/src/jit/utils.cpp index 2688a0111e..e13009f23a 100644 --- a/src/jit/utils.cpp +++ b/src/jit/utils.cpp @@ -721,24 +721,18 @@ bool ConfigMethodRange::contains(ICorJitInfo* info, CORINFO_METHOD_HANDLE method } /**************************************************************************/ -void ConfigMethodRange::init(const CLRConfig::ConfigStringInfo & info) +void ConfigMethodRange::initRanges(const wchar_t* rangeStr) { // make sure that the memory was zero initialized _ASSERTE(m_inited == 0 || m_inited == 1); - LPWSTR str = CLRConfig::GetConfigValue(info); - initRanges(str); - CLRConfig::FreeConfigString(str); - m_inited = true; -} - -/**************************************************************************/ -void ConfigMethodRange::initRanges(__in_z LPCWSTR rangeStr) -{ - if (rangeStr == 0) + if (rangeStr == nullptr) + { + m_inited = true; return; + } - LPCWSTR p = rangeStr; + LPCWSTR p = const_cast<LPCWSTR>(rangeStr); unsigned char lastRange = 0; while (*p) { while (*p == ' ') //skip blanks @@ -767,6 +761,8 @@ void ConfigMethodRange::initRanges(__in_z LPCWSTR rangeStr) m_ranges[lastRange++] = MAX_RANGE; assert(lastRange < 100); m_lastRange = lastRange; + + m_inited = true; } #endif // DEBUG @@ -1399,7 +1395,7 @@ void HelperCallProperties::init() // MyAssembly;mscorlib;System // MyAssembly;mscorlib System -AssemblyNamesList2::AssemblyNamesList2(__in LPWSTR list, IAllocator* alloc) +AssemblyNamesList2::AssemblyNamesList2(const wchar_t* list, IAllocator* alloc) : m_alloc(alloc) { assert(m_alloc != nullptr); @@ -1408,7 +1404,7 @@ AssemblyNamesList2::AssemblyNamesList2(__in LPWSTR list, IAllocator* alloc) LPWSTR nameStart = nullptr; // start of the name currently being processed. nullptr if no current name AssemblyName** ppPrevLink = &m_pNames; - for (LPWSTR listWalk = list; prevChar != '\0'; prevChar = *listWalk, listWalk++) + for (LPWSTR listWalk = const_cast<LPWSTR>(list); prevChar != '\0'; prevChar = *listWalk, listWalk++) { WCHAR curChar = *listWalk; |