Closed Bug 1678449 Opened 4 years ago Closed 4 years ago

Replace Vector with Span into LifoAlloc

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(5 files)

Most of the remaining things is allocation cost for Vector, and while decoding, we don't have to use Vector with SystemAllocPolicy.
we can instead use Span into LifoAlloc (or raw XDR buffer, or pinned data later).

Depends on: 1678458
  • CompilationAtomCache.atoms_ : JS::GCVector<JSAtom*>

  • CompilationGCOutput.functions : JS::GCVector<JSFunction*>

  • CompilationGCOutput.scopes : JS::GCVector<js::Scope*>

  • CompilationStencil.regExpData : Vector<RegExpStencil>

    • RegExpStencil is pointer-free, and doesn't need dtor call
  • CompilationStencil.bigIntData : Vector<BigIntStencil>

    • BigIntStencil is contains UniquePtr and needs dtor call
  • CompilationStencil.objLiteralData : Vector<ObjLiteralStencil>

    • ObjLiteralWriterBase.code_ is Vector
  • CompilationStencil.scriptData : Vector<ScriptStencil>

    • ScriptStencil.sharedData is RefPtr and needs dtor call (bug 1678458)
    • ScriptStencil.gcThings is pointer into LifoAlloc, and doesn't need dtor call
  • CompilationStencil.scopeData : Vector<ScopeStencil>

    • ScopeStencil.data_ is pointer into LifoAlloc, and doesn't need dtor call
  • CompilationStencil.parserAtomData : Vector<ParserAtomEntry*>

  • CompilationInfoVector.delazifications : Vector<CompilationStencil>

    • CompilationStencil contains Vector and HashMap
  • CompilationInfoVector.delazificationIndices : Vector<FunctionIndex>

    • FunctionIndex is pointer-free, and doesn't need dtor call
  • StencilModuleMetadata.requestedModules : Vector<StencilModuleEntry>

    • StencilModuleEntry is pointer-free, and doesn't need dtor call
  • StencilModuleMetadata.importEntries : Vector<StencilModuleEntry>

    • StencilModuleEntry is pointer-free, and doesn't need dtor call
  • StencilModuleMetadata.localExportEntries : Vector<StencilModuleEntry>

    • StencilModuleEntry is pointer-free, and doesn't need dtor call
  • StencilModuleMetadata.indirectExportEntries : Vector<StencilModuleEntry>

    • StencilModuleEntry is pointer-free, and doesn't need dtor call
  • StencilModuleMetadata.starExportEntries : Vector<StencilModuleEntry>

    • StencilModuleEntry is pointer-free, and doesn't need dtor call
  • StencilModuleMetadata.functionDecls : Vector<FunctionDeclaration>

    • FunctionDeclaration is pointer-free, and doesn't need dtor call
  • ObjLiteralWriterBase.code_ : Vector<uint8_t>

Depends on: 1657614
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/393d302eec5c Part 1: Add CompilationState::finish for generating span in stencil. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/7a3e9963fb46 Part 2: Use span in CompilationStencil.regExpData. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/b979f7a0b59f Part 3: Use span in CompilationStencil.scriptData. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/a6686e098173 Part 4: Use span in CompilationStencil.scopeData. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/967faaa4f81c Part 5: Use span in CompilationStencil.parserAtomData. r=tcampbell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: