Cleanup JSFunction non-lazy <-> lazy transistions
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox72 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(4 files)
Cleanup code around JSFunction changing which union arms are initialized. This should make the manual gc barriers easier to understand. Add a JSFunction::isIncomplete() accessor that defines the reset state of a JSFunction (INTERPRETED flag + nullptr script). Transitions should generally go through this state to make sure barriers are fired when old pointers are cleared.
| Assignee | ||
Comment 1•6 years ago
|
||
Refactor slightly for readability and cleanup the conditions on function that
are checked.
| Assignee | ||
Comment 2•6 years ago
|
||
This should have been 'initSelfHostedLazyScript' all along for consistency
with other method names.
Depends on D55053
| Assignee | ||
Comment 3•6 years ago
|
||
This replaces the 'hasUncompletedScript' accessor and removes the requirement
that 'hasScript' is already true. In general, if function is found by
scanning the GC arenas, one should check for the isIncomplete() state.
Depends on D55054
| Assignee | ||
Comment 4•6 years ago
|
||
Ensure we avoid clobbering live GC pointers in JSFunction by using helper
methods to clear to the isIncomplete state and trigger write barriers.
Depends on D55055
Comment 6•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f17bcf3a751d
https://hg.mozilla.org/mozilla-central/rev/229082dcd5ac
https://hg.mozilla.org/mozilla-central/rev/882eb2df7604
https://hg.mozilla.org/mozilla-central/rev/fdc09794f265
Description
•