TT strings: implementation questions

Steven Johnson stejohns at adobe.com
Wed Jun 11 09:40:04 PDT 2008


Not sure, but I think it's test/acceptance/ecma3/String/localeCompare_rt.as

Sounds like this is a bug in the test. Let's fix the test :-)


On 6/11/08 9:36 AM, "Brendan Eich" <brendan at mozilla.org> wrote:

> On Jun 11, 2008, at 8:56 AM, Steven Johnson wrote:
> 
>> (1) I inserted that comment... the spec for localeCompare doesn't
>> in fact
>> require this behavior, the the Tamarin sanity/acceptance tests did.
> 
> Which test? I'm curious, just want to read and see any historical info.
> 
> 
>> IMHO we
>> should just use memcmp unless SpiderMonkey has such a de facto
>> compatibility
>> requirement.
> 
> We've never had a de-facto standard compatibility bug demanding
> {-1,0,1} only. We subtract the differing chars, or lengths if unequal
> and one string is a prefix of the other. See
> 
> http://hg.mozilla.org/mozilla-central/index.cgi/file/cf5b92c60cc3/js/
> src/jsstr.cpp#l2794
> 
> and below.
> 
> /be
> 



More information about the Tamarin-devel mailing list