Add an iterator class for iterating over a shape's properties
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(5 files)
We can convert most uses of Shape::Range
to a more modern C++ iterator that doesn't expose the property's shape. Similar to the changes in bug 1704744, this decouples properties from shapes.
Assignee | ||
Comment 1•2 years ago
|
||
This was probably needed for ExclusiveContext back then.
Assignee | ||
Comment 2•2 years ago
|
||
The iterator is based on Shape::Range, but is a bit more ergonomic and doesn't expose
the property's Shape. This means when we change the shape's property representation
later on we only have to change the iterator implementation.
Also start using shape()
instead of lastProperty()
because lastProperty
will
either be removed or changed in the future, to decouple shapes and properties more.
The code generated by Clang for some of these functions looks good: the compiler
is able to optimize away the iterator and ShapePropertyWithKey code.
Depends on D112328
Assignee | ||
Comment 3•2 years ago
|
||
These uses are a bit more complicated because they collect the properties in a Vector.
Depends on D112329
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D112330
Assignee | ||
Comment 5•2 years ago
|
||
This probably became dead code when shapes started implying a realm.
Depends on D112331
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e5eb554fed8 part 1 - Remove CX template parameter from FakeRooted constructors. r=jonco https://hg.mozilla.org/integration/autoland/rev/e111cd4049f1 part 2 - Add ShapePropertyIter and start using it. r=jonco https://hg.mozilla.org/integration/autoland/rev/823a64b174ca part 3 - Use ShapePropertyIter in more places. r=jonco https://hg.mozilla.org/integration/autoland/rev/dd64062d0672 part 4 - Use ShapePropertyIter instead of manually walking over the shape list in a few places. r=jonco https://hg.mozilla.org/integration/autoland/rev/830e4956fb49 part 5 - Remove dead code in AddLengthProperty. r=jonco
Comment 7•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1e5eb554fed8
https://hg.mozilla.org/mozilla-central/rev/e111cd4049f1
https://hg.mozilla.org/mozilla-central/rev/823a64b174ca
https://hg.mozilla.org/mozilla-central/rev/dd64062d0672
https://hg.mozilla.org/mozilla-central/rev/830e4956fb49
Description
•