Closed Bug 765297 Opened 13 years ago Closed 13 years ago

free up bits in String::lengthAndFlags for new string subtypes

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: luke, Assigned: luke)

Details

(Whiteboard: [js:t])

Attachments

(1 file)

Attached patch patchSplinter Review
There are a few interesting optimizations that require adding new string subtypes (e.g., bug 654190) but can't because the 4 flag bits in lengthAndFlags are a bit crowded. Currently, ropes and dependent strings get their own bit (which allows a single cmp to test), but only testing the rope bit (or their absence: isLinear) is hot. This patch frees up the dependent string bit which should give us enough room for the next few optimizations.
Attachment #633577 - Flags: review?(n.nethercote)
Comment on attachment 633577 [details] [diff] [review] patch Review of attachment 633577 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/vm/String.cpp @@ +336,2 @@ > > + /* TODO: explain why undepended. */ ? ::: js/src/vm/String.h @@ +92,2 @@ > * | > + * JSLinearString (abstract) chars / may not be null-terminated Can you change this to "might"? I always find "may" ambiguous -- does it mean "might" or "must"?
Attachment #633577 - Flags: review?(n.nethercote) → review+
Whiteboard: [js:t]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: