Closed Bug 1592102 Opened 5 years ago Closed 5 years ago

Do Bytecode Emission without Allocating Scopes

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: mgaudet, Assigned: mgaudet)

References

Details

Attachments

(4 files)

Scopes are one of the types allocated during BytecodeEmission that need to be deferred.

Following in the footsteps of Bug 1585718 we need to avoid allocating these Scopes during bytecode emission, leaving them until JSScript::fullyInitFromEmitter (which later can be turned into a main-thread merge step).

Depends on: 1592103

Avoids future circular include issues.

In preparation for deferring the allocation of Scopes to the end of bytecode
emission, we introduce ScopeProvider, which is a facade class for use within
the BytecodeEmitter. This class allows asking the same set of queries that are
asked of Scopes, but when we defer the allocation of Scopes, we may not choose
to answer the queries with a Scope, instead using a (to be implemented)
ScopeCreationData.

Depends on D51910

Defer the allocation of Scopes by implementing ScopeCreationData and family.
The idea is that we do not reify a GC allocated scope until
JSScript::fullyInitFromEmitter (the goal being to eventually move that onto
main thread).

Depends on D51911

Blocks: 1599134
Attachment #9106703 - Attachment description: Bug 1592102 - Introduce ScopeProvider r?tcampbell → Bug 1592102 - Introduce AbstractScope r?tcampbell

Performance testing shows these changes (combined with those in Bug 1592103) appear to have no impact on our metrics when disabled, and also no impact when enabled

Blocks: 1601734
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/325e83234dd5
Hoist ScopeKind into own header r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/351c88e680a3
Refactor Scope allocation paths to support code sharing r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/0f59860a21ef
Introduce AbstractScope r=tcampbell

Marking leave open, as only preliminary patches are landing today.

Keywords: leave-open
Blocks: 1602048
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/47592189b305
Defer allocation of Scopes r=tcampbell
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: