From: Tarek Mahmoud Sayed Date: Thu, 19 May 2016 23:09:03 +0000 (-0700) Subject: Remove the wrong optimization from the string initialization (#5107) X-Git-Tag: accepted/tizen/base/20180629.140029~4607 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e00c86e744d1db8737b5e52ac7111b1aab82e8c;p=platform%2Fupstream%2Fcoreclr.git Remove the wrong optimization from the string initialization (#5107) The string initilaization misteknly setting some flag for characters under 0x80 the fix here is just remove this part (per Jan Kotas recommendation) --- diff --git a/src/vm/stringliteralmap.cpp b/src/vm/stringliteralmap.cpp index c9d0310..aa46c3f 100644 --- a/src/vm/stringliteralmap.cpp +++ b/src/vm/stringliteralmap.cpp @@ -479,16 +479,6 @@ STRINGREF AllocateStringObject(EEStringData *pStringData) LPWSTR strDest = strObj->GetBuffer(); memcpyNoGCRefs(strDest, pStringData->GetStringBuffer(), cCount*sizeof(WCHAR)); strDest[cCount] = 0; - - // IsOnlyLowChars actually incidicates if we can sort the string in a fast way. - // Take a look RegMeta::DefineUserString to see how we set the flag. - // The flag is persisited to assembly containing the string literals. - // We restore the flag when we load strings from assembly (MDInternalRO::GetUserString.) - // - if (pStringData->GetIsOnlyLowChars()) - { - strObj->SetHighCharState(STRING_STATE_FAST_OPS); - } } GCPROTECT_END();