`CompilationInput::lazy` accesses should be replaced by accessors.
Categories
(Core :: JavaScript Engine, enhancement, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox91 | --- | fixed |
People
(Reporter: nbp, Assigned: nbp)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
The goal is to go toward the ability to parse Lazy functions without having neither a JSFunction nor a BaseScript.
By adding wrappers on CompilationInput::lazy field, the goal is to be able to abstract the BaseScript field behind something which could use a Stencil instead.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
The CompilationInput currently let the consumer reach to the lazy field, to
reach accessors implemented on the BaseScript. As we are trying to remove direct
usage of the lazy field, and later abstract between a ScriptStencilExtra or a
BaseScript, we have to make it simple to add these accessors to other
structures.
This change extract the accessors and move them to a parametrized structure
which knows that its parameters is able to locate the field which contains all
these flags.
To implement accessors, on should inherit from the class
ImmutableScriptFlagsAccessors<...>
and parametrize it with the derived class as long as the derived class
implements the function
ImmutableFlags immutableFlags() const { ... }
And similarly for mutable flags, except that the returned value should be a
reference.
| Assignee | ||
Comment 2•4 years ago
|
||
This change adds accessors to reach the BaseScript* lazy field as well as all
information taken from it. The intent being that most information used from the
BaseScript are taken out of the ScriptStencil and ScriptStencilExtra structures,
and that we can later use these in-place where the lazy field is used.
Comment 4•4 years ago
•
|
||
Backed out for causing bustages on JSScript.h.
Backout link
Push with failures
Failure Log
| Assignee | ||
Comment 5•4 years ago
|
||
To satisfy clang-cl field ordering, we have to extract the
BaseScript::warmUpData_ to make it live next to the inherited GC cell which
holds the jitCodeRaw pointer.
This modification is madated by assertion which is verifying that
SelfHostedLazyScript shares the same offsets as the BaseScript for jitCodeRaw
field and the warmUpData_ field.
Updated•4 years ago
|
Comment 7•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/9f48019d06ea
https://hg.mozilla.org/mozilla-central/rev/b4978b94e605
Updated•1 year ago
|
Description
•