Move JSOP_DOUBLE literal values into bytecode
Categories
(Core :: JavaScript Engine, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(3 files)
Currently, we store the double literals in PrivateScriptData::consts() with certain alignment requirements and store an index in the bytecode itself. This index is currently unaligned and we currently copy the double value to another location before using.
Instead, I'd like to store the raw bytes of the double in-line in the bytecode. This gets memcpy'd into an int64 which is BitwiseCast to a double. This shouldn't be any worse than the current unaligned index.
As a result:
- Avoid storing both an index and double for each double literal
- Reduce PrivateScriptData::consts() from GCPtrValue to GCPtrBigInt (which will eventually be merged with objects().
- Remove alignment code in PrivateScriptData
Assignee | ||
Comment 1•6 years ago
|
||
Replace the unaligned uint32_t index with the encoded double value. The
double values are already being copied again before use, so an unaligned
uint64_t load and a BitwiseCast to double seems a more direct strategy.
This also avoids needed to manage the allocation of the consts table.
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Depends on D23396
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fd0ffc19dd6b
https://hg.mozilla.org/mozilla-central/rev/17ae35a549af
https://hg.mozilla.org/mozilla-central/rev/7366858bc6ad
Description
•