Closed Bug 1706246 Opened 8 months ago Closed 7 months ago

Stop using property shapes directly in a few more places

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(13 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.

In the future it would be nice to have a NativeObjectShape subtype so we can use the
type system for this.

For the methods where the caller needs to know the property's slot, add a slotOut
out-parameter.

Depends on D112706

I noticed this assertion that's no longer valid because getter/setter properties
now also go through addProperty. It's not an actual problem because we never call
this overload for getter/setter properties.

We could change the assertion to check for custom-data-properties, but that's
already asserted by addPropertyInternal that we end up calling.

Depends on D112707

Also changes ShapeProperty(shape) to shape->property() so that we don't have
to make ShapeProperty a friend class of Shape.

Depends on D112712

This adds NativeObject::getLastProperty. The similar lastProperty method returning
a Shape* still exists, at some point we will probably have to replace that with shape.

Depends on D112715

Typing the JS:: prefix every time this type is used was getting annoying.

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d64fc4982a1f
part 1 - Assert ShapePropertyIter is only used with NativeObject shapes. r=jonco
https://hg.mozilla.org/integration/autoland/rev/bfcf4ea6c9cb
part 2 - Change addProperty, putProperty and similar methods to return a bool instead of the property's shape. r=jonco
https://hg.mozilla.org/integration/autoland/rev/2c4e250e1044
part 3 - Remove unnecessary assertion. r=jonco
https://hg.mozilla.org/integration/autoland/rev/84de16f0eef0
part 4 - Remove some unused Shape methods. r=jonco
https://hg.mozilla.org/integration/autoland/rev/35a05f35c5d3
part 5 - Use ShapeProperty for the shape snapshot testing code. r=jonco
https://hg.mozilla.org/integration/autoland/rev/f2a924fbff12
part 6 - Use ShapeProperty in more places, remove Shape::writable and Shape::configurable methods. r=jonco
https://hg.mozilla.org/integration/autoland/rev/99c96a3a9035
part 7 - Use ShapeProperty in more places, remove Shape::isAccessorDescriptor. r=jonco
https://hg.mozilla.org/integration/autoland/rev/b1687a16412f
part 8 - Make Shape::attributes private. r=jonco
https://hg.mozilla.org/integration/autoland/rev/c3b575e3743b
part 9 - Make Shape::isCustomDataProperty private. r=jonco
https://hg.mozilla.org/integration/autoland/rev/64ba87437c1c
part 10 - Remove Shape::isDataProperty and StackShape::isDataProperty. r=jonco
https://hg.mozilla.org/integration/autoland/rev/74b9df174503
part 11 - Make Shape::slot and related methods private. r=jonco
https://hg.mozilla.org/integration/autoland/rev/c06d59d617cc
part 12 - Make Shape::propid and related methods private. r=jonco
https://hg.mozilla.org/integration/autoland/rev/fd63d706e30a
part 13 - Import JS::PropertyKey in the js namespace. r=jonco
You need to log in before you can comment on or make changes to this bug.