TT strings: implementation questions

Brendan Eich brendan at mozilla.org
Wed Jun 11 09:36:19 PDT 2008


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