Consolidate PrivateScriptData GCPtr arrays
Categories
(Core :: JavaScript Engine, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: tcampbell, Assigned: jandem)
References
Details
Attachments
(1 file)
PrivateScriptData currently has separate arrays for objects (RegExp, JSFunction, PlainObject, ArrayObject), scopes, and consts (BigInt). These each require different head fields (uses memory) and are awkward to access easily from JITs.
Instead, we can unify them into an array of GCPtr<SomeTaggedPointer> and generate bytecode so they share the same index space. Most accesses would be able to mask off the low-bit tag (Cell* are always aligned). When tracing for GC, the type tag would allow us to maintain typed GC-tracing.
After bug 1471062, the array will also be located at a fixed offset in PrivateScriptData.
Comment 1•6 years ago
|
||
Does GCCellPtr work for this? We may need to add it to the FOR_EACH_PUBLIC_TAGGED_GC_POINTER_TYPE define to trace it easily.
Reporter | ||
Comment 2•6 years ago
|
||
I was originally thinking about avoiding GCCellPtr to avoid arenaKind lookups and arbitrary trace dispatch, but that may be an excessive optimization at this point.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Once the other data is moved out of PrivateScriptData, this GC-thing array will be stored
at a fixed offset. At that point we can simplify PrivateScriptData and get fast indexing
into this array, important for the Baseline Interpreter.
Assignee | ||
Updated•5 years ago
|
Comment 5•5 years ago
|
||
bugherder |
Description
•