On Wed, Oct 8, 2008 at 7:26 AM, Kasper Lund <[EMAIL PROTECTED]> wrote:
> LGTM. Should we have a test case for this?

It's only a performance bug, or rather lack of a performance optimization.

>
> On Tue, Oct 7, 2008 at 5:33 PM,  <[EMAIL PROTECTED]> wrote:
>> Reviewers: Kasper Lund,
>>
>> Description:
>> Fix incorrect short cut test that assumed ASCII strings could be Latin1.
>>
>> Please review this at http://codereview.chromium.org/6542
>>
>> Affected files:
>>  M     src/runtime.cc
>>
>>
>> Index: src/runtime.cc
>> ===================================================================
>> --- src/runtime.cc      (revision 465)
>> +++ src/runtime.cc      (working copy)
>> @@ -1086,7 +1086,11 @@
>>   // Notice: Doesn't include last character.
>>   for (int i = p < m ? m - p : 0; i < m - 1; i++) {
>>     uc32 c = pattern[i];
>> -    if (sizeof(schar) == 1 && c > 255) return -1;
>> +    if (sizeof(schar) == 1 &&
>> +        sizeof(pchar) > 1 &&
>> +        c > String::kMaxAsciiCharCode) {
>> +      return -1;
>> +    }
>>     bad_char_map[c & kBMHSignificantBitsMask] = m - 1 - i;
>>   }
>>
>>
>>
>>
>



-- 
Erik Corry, Software Engineer
Google Denmark ApS.  CVR nr. 28 86 69 84
c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018
Copenhagen K, Denmark.

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to