Closed Bug 1665387 Opened 5 years ago Closed 5 years ago

Support merging delazification CompilationStencil into top-level CompilationStencil

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: arai, Unassigned)

References

Details

Attachments

(1 obsolete file)

incremental encoding + decoding will be the following steps:

  1. encode stencil for top-level
  2. encode stencils for delazification
  3. linearize 1+2 just by concatenation, with number of delazifications
  4. decode stencil for top-level
  5. decode stencils for delazification
  6. merge stencils for delazification into top-level
  7. instantiate the merged top-level stencil

Step 6 requires merging function CompilationStencil into top-level script CompilationStencil.

The merge process probably follows this part of the instantiate code: https://searchfox.org/mozilla-central/rev/30e70f2fe80c97bfbfcd975e68538cefd7f58b2a/js/src/frontend/Stencil.cpp#576-582,588-590,594

That includes:

  • Replacing the ScriptStencil::gcThings list while updating the indices of functions, scopes, etc
  • Attach ImmutableScriptData
  • For inner-functions of the delazified function:
    • Updating ScriptStencil::isSingletonFunction flag
    • Updating ScriptStencil::functionAtom
    • Updating HAS_INFERRED_NAME, HAS_GUESSED_ATOM function flags
    • Updating ScriptStencil::lazyFunctionEnclosingScopeIndex_
    • Updating ScriptStencil::scriptStencil.memberInitializers
    • Updating TreatAsRunOnce immutableFlag
Assignee: nobody → arai.unmht
Severity: -- → N/A
Status: NEW → ASSIGNED
Priority: -- → P1
Depends on: 1665612
Attachment #9176303 - Attachment is obsolete: true
No longer blocks: 1662274

latest patch in bug 1662274 doesn't requrie merging

Assignee: arai.unmht → nobody
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: