Remove the wrong optimization from the string initialization (#5107)
authorTarek Mahmoud Sayed <tarekms@microsoft.com>
Thu, 19 May 2016 23:09:03 +0000 (16:09 -0700)
committerJan Kotas <jkotas@microsoft.com>
Thu, 19 May 2016 23:09:03 +0000 (16:09 -0700)
The string initilaization misteknly setting some flag for characters under 0x80
the fix here is just remove this part (per Jan Kotas recommendation)

src/vm/stringliteralmap.cpp

index c9d0310..aa46c3f 100644 (file)
@@ -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();