Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String representation and internment #282

Closed
brson opened this issue Feb 14, 2013 · 11 comments
Closed

String representation and internment #282

brson opened this issue Feb 14, 2013 · 11 comments

Comments

@brson
Copy link
Contributor

@brson brson commented Feb 14, 2013

Servo currently has several string representations, some with their own internment strategies: SpiderMonkey, Rust and netsurfcss. We want just one.

@abhijeetgaiha
Copy link

@abhijeetgaiha abhijeetgaiha commented Apr 24, 2013

Netsurf uses libwapcaplet for string internment.
Assuming Spidermonkey has some other library for the same.
Does Rust currently have some way to intern strings (other than internally)?

Having a common representation is certainly desirable. I think the best option is probably to put something in the core/std Rust library.

@brson
Copy link
Contributor Author

@brson brson commented Jun 6, 2013

We talked a little about this today on the conference call. Rust has no general-purpose string interner, though rustc itself does have a string interner that is not multithreaded. I agree that string internment is important enough that if we can develop a general solution it should live in Rust's libextra.

@sanxiyn
Copy link
Contributor

@sanxiyn sanxiyn commented Jun 6, 2013

@emberian
Copy link
Contributor

@emberian emberian commented Jun 24, 2013

Hello Servo people,

As part of my cleanup of rustc's libsyntax I'm rewriting the interner. I'd like the Interner trait to be generically usable, mind looking over my current work? https://gist.github.com/cmr/5846269

In particular I think unintern should be provided somehow, but that has implications for tag validity, and I think would be a significant imposition on the Interner trait, and could be added in a RevokableInterner or something.

@metajack
Copy link
Contributor

@metajack metajack commented Jun 24, 2013

During the meeting we concluded that we're not quite ready to give specific feedback.

@metajack
Copy link
Contributor

@metajack metajack commented Jun 25, 2013

graydon posted this over on the rust interner bug: http://people.mozilla.org/%7Egraydon/interner.rs

@metajack
Copy link
Contributor

@metajack metajack commented Aug 5, 2013

Adam Barth just posted a breakdown on strings in Blink.
https://docs.google.com/document/d/1kOCUlJdh2WJMJGDf-WoEQhmnjKLaOYRbiHz5TiGJl14/edit

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Aug 6, 2013

I like Blink’s design, but does SpiderMonkey have a hard requirement on UTF-16 buffers?

@jdm
Copy link
Member

@jdm jdm commented Aug 6, 2013

All SpiderMonkey strings are UTF-16, full stop.

@annevk
Copy link

@annevk annevk commented Sep 9, 2013

Long term SpiderMonkey could evolve, but you cannot get 16-bit unsigned integers out of the platform. Due to JavaScript's ever growing presence lone surrogates are everywhere.

This means that Servo will need to have 16-bit unsigned integers as string representation and if Rust and Servo want to share a bunch of libraries, such as URL, Encoding, HTML, CSS, JavaScript, etc. they should get the same string type.

If the Rust community is uncomfortable with strings that can have lone surrogates maybe a wrapper could be provided that guarantees the value space is the same as that of utf-8 (i.e. only Unicode scalar values).

@kmcallister
Copy link
Contributor

@kmcallister kmcallister commented Apr 23, 2014

Closing as a dupe of #1153 and the others linked here.

glennw pushed a commit to glennw/servo that referenced this issue Jan 16, 2017
Expand the optimization that eliminates stencil buffer usage in favor of the scissor box to handle 3D transforms.

Eliminates all stencil buffer usage in browser.html, as far as I can
tell.

r? @glennw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.