Closed Bug 1472031 Opened 6 years ago Closed 6 years ago

Miscellaneous tokenizing improvements

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

(6 files)

Nothing strictly necessary for UTF-8 parsing, but things that will to one degree or another contribute to getting there.
Technically the "drain" aspect of this is not necessary, but it seems preferable to drain immediately than to hold onto unbounded memory we're never going to use. There are other places that could stand this "drain" treatment, but one thing at a time, as I run across them.
Attachment #8988621 - Flags: review?(arai.unmht)
Small improvement, nice to not copy stuff (or impose on the compiler to figure out how not to copy, maybe, if we were really lucky before).
Attachment #8988628 - Flags: review?(arai.unmht)
Attachment #8988621 - Flags: review?(arai.unmht) → review+
Attachment #8988622 - Flags: review?(arai.unmht) → review+
Attachment #8988623 - Flags: review?(arai.unmht) → review+
Attachment #8988624 - Flags: review?(arai.unmht) → review+
Attachment #8988628 - Flags: review?(arai.unmht) → review+
Attachment #8988631 - Flags: review?(arai.unmht) → review+
Blocks: 1472066
Pushed by jwalden@mit.edu: https://hg.mozilla.org/integration/mozilla-inbound/rev/b64aec5cf563 Introduce a drainCharBufferIntoAtom function to clear charBuffer and create an atom from the chars that were in it. r=arai https://hg.mozilla.org/integration/mozilla-inbound/rev/08cf6e4cccce Rename atomizeChars to atomizeSourceChars to clarify it's only for atomizing directly from source text. r=arai https://hg.mozilla.org/integration/mozilla-inbound/rev/481871dcc488 Define TokenStreamAnyChars::updateFlagsForEOL inline in the header, for simplicity. r=arai https://hg.mozilla.org/integration/mozilla-inbound/rev/d857b06f51ca Implement a SourceUnits::remaining() function exposing how many code units are left. r=arai https://hg.mozilla.org/integration/mozilla-inbound/rev/dad92f9be9b7 Avoid copying potential directives in TokenStreamSpecific::getDirective. r=arai https://hg.mozilla.org/integration/mozilla-inbound/rev/ba24991f7f4d Add SourceUnits::matchHexDigits and remove SourceUnits::peekCodeUnits used for the same ends (but that also performed a needless copy). r=arai
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: