Closed Bug 1723556 Opened 3 years ago Closed 3 years ago

Convert `standaloneLazyFunction` to be initialized with a Stencil instead of JSFunction.

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: nbp, Assigned: nbp)

References

Details

Attachments

(1 file)

As we want to compile off-thread without GC, we have to remove GC object references from CompileLazyfunction which would prevent the Stencil generation.

standaloneLazyFunction which setup the parser with the context needed to resume a Full-parse of a Lazy function expect a HandleFunction which is also mirrored by a RootedFunction in CompileLazyFunction body.

We should replace these by information stored on the CompilationInput and/or stored on the CompilationSyntaxParseCache introduced in Bug 1719194.

CompileLazyFunction depends on the fact that we have an allocated BaseScript.
This restriction should be removed to reuse this code with Stencil. Either
Stencil created to abstract over these GC inputs, or Stencil taken from a
previous compilation.

This patch exposes the functionFlags as part of the CompilationInput, which
can later be mapped to a StencilScript/StencilScriptExtra input, as well as the
FunctionSyntaxKind computation which depends on function flags and immutable
flags.

The display atom of the compiled function is added to
CompilationSyntaxParseCache, as well as a ScriptStencilExtra made to reuse
initialization function of FunctionBox. These are initialized by copying the
function info, and adding the display atom to the parser cache, as already done
with inner functions.

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:nbp, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(nicolas.b.pierron)
Flags: needinfo?(arai.unmht)

This is in my landing queue, I am currently working on the patches which are based on top of it, as soon as they are in a compiling shape I will look back at the feedback of this patch and merge it.

Flags: needinfo?(arai.unmht)
Pushed by npierron@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bc450c9e7bfe
standaloneLazyFunction now uses CompilationInput. r=arai
Flags: needinfo?(nicolas.b.pierron)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: