Closed
Bug 1633741
Opened 2 years ago
Closed 2 years ago
Add more helpers to js::TrailingArray
Categories
(Core :: JavaScript Engine: JIT, task, P3)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla77
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(4 files)
The js::TrailingArray
type was added to hold common helper methods for structures with complex trailing data.
There are more things to generalize:
- Use
Checked<Offset>
in instances missing it - Add a helper for computing array length. We can overload templates that size and integer to cover the existing uses. This could assert it divides cleanly too.
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
Cleanup the allocation of trailing arrays to use CheckedInt and follow the
example of JitScript. Remove some static_asserts that made arrays harder to
change and instead rely on the existing MOZ_ASSERT in initElements.
Depends on D72941
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D72942
Assignee | ||
Comment 4•2 years ago
|
||
This gives more readability to (end - start) / sizeof(T) computations to
cleanup the IonScript data type.
Depends on D72943
Updated•2 years ago
|
Attachment #9144123 -
Attachment description: Bug 1633741 - Inline DefaultInitializeElements into TrailingArary. r?jandem → Bug 1633741 - Inline DefaultInitializeElements into TrailingArray. r?jandem
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/41aa6a9b67e1 Inline DefaultInitializeElements into TrailingArray. r=jandem https://hg.mozilla.org/integration/autoland/rev/666f5f689c8a Use CheckedInt for js::ImmutableScriptData. r=jandem https://hg.mozilla.org/integration/autoland/rev/04b81c9f1986 Use CheckedInt for js::{Runtime,Private}ScriptData. r=jandem https://hg.mozilla.org/integration/autoland/rev/6fae33988db5 Add TrailingArray::numElements helper. r=jandem
Comment 6•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/41aa6a9b67e1
https://hg.mozilla.org/mozilla-central/rev/666f5f689c8a
https://hg.mozilla.org/mozilla-central/rev/04b81c9f1986
https://hg.mozilla.org/mozilla-central/rev/6fae33988db5
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox77:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in
before you can comment on or make changes to this bug.
Description
•