@@ -301,18 +301,6 @@ STRINGREF AllocateString(SString sstr)
301301 return strObj;
302302}
303303
304- CHARARRAYREF AllocateCharArray (DWORD dwArrayLength)
305- {
306- CONTRACTL
307- {
308- THROWS;
309- GC_TRIGGERS;
310- MODE_COOPERATIVE;
311- }
312- CONTRACTL_END;
313- return (CHARARRAYREF)AllocatePrimitiveArray (ELEMENT_TYPE_CHAR, dwArrayLength);
314- }
315-
316304void Object::ValidateHeap (BOOL bDeep)
317305{
318306 STATIC_CONTRACT_NOTHROW;
@@ -899,71 +887,6 @@ STRINGREF* StringObject::InitEmptyStringRefPtr() {
899887 return EmptyStringRefPtr;
900888}
901889
902- // strAChars must be null-terminated, with an appropriate aLength
903- // strBChars must be null-terminated, with an appropriate bLength OR bLength == -1
904- // If bLength == -1, we stop on the first null character in strBChars
905- BOOL StringObject::CaseInsensitiveCompHelper (_In_reads_(aLength) WCHAR *strAChars, _In_z_ INT8 *strBChars, INT32 aLength, INT32 bLength, INT32 *result) {
906- CONTRACTL {
907- NOTHROW;
908- GC_NOTRIGGER;
909- MODE_ANY;
910- PRECONDITION (CheckPointer (strAChars));
911- PRECONDITION (CheckPointer (strBChars));
912- PRECONDITION (CheckPointer (result));
913- } CONTRACTL_END;
914-
915- WCHAR *strAStart = strAChars;
916- INT8 *strBStart = strBChars;
917- unsigned charA;
918- unsigned charB;
919-
920- while (true )
921- {
922- charA = *strAChars;
923- charB = (unsigned ) *strBChars;
924-
925- // Case-insensitive comparison on chars greater than 0x7F
926- // requires a locale-aware casing operation and we're not going there.
927- if ((charA|charB)>0x7F ) {
928- *result = 0 ;
929- return FALSE ;
930- }
931-
932- // uppercase both chars.
933- if (charA>=' a' && charA<=' z' ) {
934- charA ^= 0x20 ;
935- }
936- if (charB>=' a' && charB<=' z' ) {
937- charB ^= 0x20 ;
938- }
939-
940- // Return the (case-insensitive) difference between them.
941- if (charA!=charB) {
942- *result = (int )(charA-charB);
943- return TRUE ;
944- }
945-
946-
947- if (charA==0 ) // both strings have null character
948- {
949- if (bLength == -1 )
950- {
951- *result = aLength - static_cast <INT32>(strAChars - strAStart);
952- return TRUE ;
953- }
954- if (strAChars==strAStart + aLength || strBChars==strBStart + bLength)
955- {
956- *result = aLength - bLength;
957- return TRUE ;
958- }
959- // else both embedded zeros
960- }
961-
962- // Next char
963- strAChars++; strBChars++;
964- }
965- }
966-
967890/* ============================InternalTrailByteCheck============================
968891**Action: Many years ago, VB didn't have the concept of a byte array, so enterprising
969892** users created one by allocating a BSTR with an odd length and using it to
0 commit comments