Closed Bug 1471463 Opened 6 years ago Closed 6 years ago

Move TokenStreamCharsBase::tokenbuf and related functions into a new TokenStreamCharsShared base class, make the character type always char16_t, and rename it/them to 'charBuffer' for clarity

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

References

Details

Attachments

(1 file)

On closer looking, it seems like it's simpler if CharBuffer is just always UTF-16, which isn't different from today. That lets us avoid certain mess like having to have UTF-8 parsing of regular expressions, for example.
Attached patch Patch (deleted) — Splinter Review
Attachment #8988052 - Flags: review?(arai.unmht)
Blocks: 1471464
Comment on attachment 8988052 [details] [diff] [review] Patch Review of attachment 8988052 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/frontend/TokenStream.h @@ +329,5 @@ > // WARNING: TokenStreamPosition assumes that the only GC things a Token > // includes are atoms. DON'T ADD NON-ATOM GC THING POINTERS HERE > // UNLESS YOU ADD ADDITIONAL ROOTING TO THAT CLASS. > > + /** The type of this token. */ (off topic) are we switching to this "/** ... */" comment style, instead of "//" or maybe "///" ? I thought we were switching from "/* ... */" to "//" at least. @@ +1067,5 @@ > }; > > +class TokenStreamCharsShared > +{ > + using CharBuffer = Vector<char16_t, 32>; might be nice to add some comment that explains why this is char16_t, instead of template with CharT.
Attachment #8988052 - Flags: review?(arai.unmht) → review+
Pushed by jwalden@mit.edu: https://hg.mozilla.org/integration/mozilla-inbound/rev/e20c1d6852e4 Move TokenStreamCharsBase::tokenbuf and related functions into a new TokenStreamCharsShared base class, make the character type always char16_t, and rename it/them to 'charBuffer' for clarity. r=arai
Depends on: 1472471
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Depends on: 1472569
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: