Fix the optimization check to call ordinal
authorTarekm Mahmoud Sayed <tarekms@microsoft.com>
Wed, 11 May 2016 17:38:21 +0000 (10:38 -0700)
committerTarekm Mahmoud Sayed <tarekms@microsoft.com>
Thu, 12 May 2016 02:12:28 +0000 (19:12 -0700)
commit60c011b9eee1549b162a29edbb13e7e131b596a3
treecd11a311eb931953c5a5fd31374375ab96828852
parent5c3d1efea4a8673086df4ba36267d7f580ba9c8c
Fix the optimization check to call ordinal

we have some optimization to check if we can perform the string search as ordinal
operation instead of lingustic operation. we used to check if the string is Ascii
which check if all chars in the string are in range 0~7F.
This check was not enough because in Linux, ICU do some special handling for some
characters in the Ascii range. so we need to avoid calling the ordinal operation
when encountering such chracters.
The fix is to take the advantage of String.IsFastSort which do exactly what we need
src/mscorlib/corefx/System/Globalization/CompareInfo.Unix.cs
src/utilcode/util_nodependencies.cpp
src/vm/ecalllist.h