add dependent lazily-concatenated strings

NEW
Unassigned

Status

()

Core
JavaScript Engine
7 years ago
3 years ago

People

(Reporter: luke, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
After bug 609440, we'll have 3 elements of the Cartesian product:

 { lazy-concat, has-char-array } x { dependent, independent }

the correspondence being:

 isFlat()      = (has-char-array, independent)
 isDependent() = (has-char-array, dependent)
 isRope()      = (lazy-concat, independent)

The missing (lazy-concat, dependent) element would allow String.prototype.{split, trim, trimLeft, trimRight, slice} to avoid flattening in js_NewDependentString.  This would, e.g., avoid a massive amount of copying in bug 593659 (which, ignoring the pathological dependent/rope/gc interaction which deserves a separate fix, seems representative of code that thinks substr/substring of a huge string isn't hugely expensive).
Blocks: 593659
Blocks: 771737
(Assignee)

Updated

3 years ago
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.