what's the meaning of a flat string

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

what's the meaning of a flat string

DONG Xinshu
Just for curiosity, what is the meaning of a flat string? What kind of strings are not flat? I couldn't find explanations on the concept of a flat string from mozilla developer network. Thanks.

Regards,
Xinshu
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: what's the meaning of a flat string

Andrew  McCreight
Internally, the JS engine represents strings in a variety of ways, to improve performance in various scenarios.  You can get a basic overview of the different types of strings (though not really a reason each of them are needed) in a long comment at the top of the string file:

http://mxr.mozilla.org/mozilla-central/source/js/src/vm/String.h

Andrew


----- Original Message -----

> Just for curiosity, what is the meaning of a flat string? What kind of
> strings are not flat? I couldn't find explanations on the concept of a
> flat string from mozilla developer network. Thanks.
>
> Regards,
> Xinshu
> _______________________________________________
> dev-tech-js-engine mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: what's the meaning of a flat string

Luke Wagner-3
In reply to this post by DONG Xinshu
On 09/21/2011 07:52 PM, DONG XINSHU wrote:
> Just for curiosity, what is the meaning of a flat string? What kind of strings are not flat? I couldn't find explanations on the concept of a flat string from mozilla developer network. Thanks.
>
> Regards,
> Xinshu

Flatness is described in the jsapi.h comment near the flat-string
operations:
http://mxr.mozilla.org/mozilla-central/source/js/src/jsapi.h#4035

Cheers,
Luke
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine