Closed
Bug 1664293
Opened 4 years ago
Closed 4 years ago
Add frontend::CompileLazyFunctionToStencil
Categories
(Core :: JavaScript Engine, task, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
82 Branch
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(2 files)
Incremental encoding needs to support XDR encode stencil for lazy functions
static bool DelazifyCanonicalScriptedFunction(JSContext* cx,
HandleFunction fun) {
...
{
...
if (ss->hasSourceType<Utf8Unit>()) {
...
if (!frontend::CompileLazyFunction(cx, lazy, units.get(), sourceLength)) {
// The frontend shouldn't fail after linking the function and the
// non-lazy script together.
MOZ_ASSERT(fun->baseScript() == lazy);
MOZ_ASSERT(lazy->isReadyForDelazification());
return false;
}
} else {
...
if (!frontend::CompileLazyFunction(cx, lazy, units.get(), sourceLength)) {
// The frontend shouldn't fail after linking the function and the
// non-lazy script together.
MOZ_ASSERT(fun->baseScript() == lazy);
MOZ_ASSERT(lazy->isReadyForDelazification());
return false;
}
}
}
...
// XDR the newly delazified function.
if (ss->hasEncoder()) {
RootedScriptSourceObject sourceObject(cx, script->sourceObject());
if (!ss->xdrEncodeFunction(cx, fun, sourceObject)) {
return false;
}
}
return true;
}
that callsite needs to be replaced with:
frontend::CompileLazyFunctionToStencil
frontend::CompileLazyFunction
withoutinstantiateStencils
frontend::InstantiateFunctionStencils
almost same asfrontend::InstantiateStencils
, but for function
So that it can receive stencil and encode it there instead.
Assignee | ||
Comment 1•4 years ago
|
||
the above is the only consumer of frontend::CompileLazyFunction
, so we can replace frontend::CompileLazyFunction
with stencil APIs
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D89898
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D89899
Updated•4 years ago
|
Attachment #9175161 -
Attachment description: Bug 1664293 - Part 2: Replace frontend::CompileLazyFunction with frontend::CompileLazyFunctionToStencil + frontend::InstantiateFunctionStencils. r?tcampbell! → Bug 1664293 - Part 2: Replace frontend::CompileLazyFunction with frontend::CompileLazyFunctionToStencil + frontend::InstantiateStencilsForDelazify. r?tcampbell!
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/a38622e0d603
Part 1: Templatize DelazifyCanonicalScriptedFunction for char unit. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/e5ce23073da5
Part 2: Replace frontend::CompileLazyFunction with frontend::CompileLazyFunctionToStencil + frontend::InstantiateStencilsForDelazify. r=tcampbell
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a38622e0d603
https://hg.mozilla.org/mozilla-central/rev/e5ce23073da5
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox82:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•