Closed Bug 1599936 Opened 6 years ago Closed 6 years ago

Cleanup JSFunction non-lazy <-> lazy transistions

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla72
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.

Refactor slightly for readability and cleanup the conditions on function that
are checked.

This should have been 'initSelfHostedLazyScript' all along for consistency
with other method names.

Depends on D55053

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

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

Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f17bcf3a751d Cleanups in AutoAssertFunctionDelazificationCompletion. r=jandem https://hg.mozilla.org/integration/autoland/rev/229082dcd5ac Rename JSFunction::initSelfHostLazyScript. r=jandem https://hg.mozilla.org/integration/autoland/rev/882eb2df7604 Add JSFunction::isIncomplete(). r=jandem https://hg.mozilla.org/integration/autoland/rev/fdc09794f265 Add JSFunction::clearLazyScript() method. r=jandem
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: