Closed Bug 1657243 Opened 4 years ago Closed 4 years ago

Add SMDOC for JS Stencil data structures and infrastructure

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

As we are refining the data structures and working on serialization, it makes sense to finally add more documentation for the data structures and processes of stencil.

This should include some of the rough principals about what sort of information goes into stencil data structures. Eg:

  • avoid references to GC things
  • avoid pointers
  • avoid class hierarchies -- since they are more annoying to store in vectors which affects serialization and batch initialization
  • vm/StencilShared.h is used for types that are directly reused by the VM, while frontend/Stencil.h is used for things that duplicate VM behaviour.
  • data structures should form a DAG without cycles. The VM may still have cycles after instantiation. Eg scope -> function -> basescript -> scope.
  • directly encode flag words when sensible to avoid translation errors
  • optimize towards speed and simplicity of instantiating the VM/GC allocations
  • stencil structures should be evolved as the VM changes. They are not a robust interchange format. A stencil should only be shared by the same build (and probably only on the same platform).
Blocks: stencil-backlog
No longer blocks: 1605101
Assignee: nobody → tcampbell
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/1d060bff10fd Improve documentation for JS Stencil. r=arai DONTBUILD
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: