Closed Bug 1704441 Opened 4 months ago Closed 21 days ago

Add better abstractions for looking up and iterating over property shapes

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

When we look up a property in the shape tree, we return the property's Shape. This has a number of problems:

  • It makes it hard to change the shape representation (bug 1704430).
  • It returns too much information (only a few Shape fields are relevant and valid for property shapes) and it's easy for the caller to confuse the two shapes (object's shape and the property shape).

If we change shape property lookups to return a small struct (initially this could just be a wrapper around the property's shape), we can start decoupling properties and shapes.

Similarly, in a few places we walk over all properties in the shape lineage. We could probably add an iterator class to use instead.

Depends on: 1704744
Depends on: 1705665
Depends on: 1706246
Status: ASSIGNED → RESOLVED
Closed: 21 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.