Closed
Bug 1151554
Opened 10 years ago
Closed 3 years ago
Add a comment to the top of Shape.h that explains the rationale for the complexity at a high level
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
firefox40 | --- | affected |
People
(Reporter: terrence, Unassigned)
Details
After 2 days of reading Shape and jspropertytree code, I was still not seeing the big picture well enough to not break things when poking the internals. An hour of conversation with Jason on IRC fixed this by providing a high-level overview explaining the purpose of the various systems and how they interact.
Subjects covered include:
* How lookups of obj[id] work against both inDictionary and !inDictionary shapes.
* How property insertion works against !inDictionary shapes and why we need a propertytree.
* Why the propertytree hashes on the full Shape info, but the ShapeTable only needs jsid.
* How |parent| is the lineage for both InDictionary and !InDictionary, whereas, listp and kids are conceptually both the back-link; however listp is for deletion and kids is for insertion.
Topics not covered that would probably be helpful:
* How IC's avoid all of this to go even faster.
In my opinion, being able to see how each operation -- lookup, insertion, and deletion -- works on the given layout makes it very clear what operations have a small O, why, and why the various structures are necessary to achieve that behavior. We should have a comment explaining all of this at the top of Shape.h. Sadly, I don't quite understand this all well enough yet to write that comment myself, although Jason has volunteered to take a stab at it.
Flags: needinfo?(jorendorff)
Updated•10 years ago
|
Summary: Add a comment to the top of Shape.h that explains the rational for the complexity at a high level → Add a comment to the top of Shape.h that explains the rationale for the complexity at a high level
Comment 1•9 years ago
|
||
Taking in order to move this from one list to another in my dashboard. Don't get your hopes up.
Assignee: nobody → jorendorff
Flags: needinfo?(jorendorff)
Comment 2•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: jorendorff → nobody
Comment 3•3 years ago
|
||
A lot of this changed and there are big comments in vm/Shape.h and vm/PropMap.h now.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•