Closed Bug 1605101 Opened 5 years ago Closed 4 years ago

[meta] js::Stencil data structures

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: tcampbell, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: meta)

This is a meta-bug for the design of data structures for Bug 1601332. Also includes cleanup work on types shared with runtime (such as definition of flags).

Current Objectives (subject to change):

  • No GC pointers
  • Defined in Rust with C++ bindings
  • Simplified model vs the final runtime script model
  • Avoid cyclic references
  • Straightforward serialization to disk
  • Use formats like js::ImmutableScriptData directly

The current C++ frontend and the new frontend should be migrated to targeting this format.

The rough set of types I think we want are:

  • Stencil (top-level)
    • parse-flags
    • BaseScript::ImmutableFlags
    • js::ImmutableScriptData
    • Maybe<exports>
    • Maybe<imports>
  • Function
    • AllocKind/group-hint flags
    • FunctionFlags
    • BaseScript::ImmutableFlags
    • Maybe<js::ImmutableScriptData>
  • Scope
    • scope-kind
    • ScopeData
    • enclosing scope reference
  • ObjectLiteral
  • BigIntLiteral

Things such as shapes and environments are hopefully implied easily by the rest of the data. A lazy function should just be a function without ImmutableScriptData. I've glossed over how JSAtom* will be handled.

Depends on: 1605200
Depends on: 1605387
Depends on: 1613441
Depends on: 1615728
Depends on: 1618636
Depends on: 1623169
Depends on: 1628761
Depends on: 1631258
Depends on: 1631272
Depends on: 1638470
Depends on: 1638670
Depends on: 1653248
Depends on: 1657243
Depends on: 1657353
Depends on: 1657614
Depends on: 1658720
Depends on: 1658742
Depends on: 1660891
No longer depends on: 1608927
No longer depends on: 1623169
No longer depends on: 1657243
No longer depends on: 1657614

The data structures are now workable so I'll close this bug.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.