Closed Bug 1738020 Opened 3 years ago Closed 3 years ago

Clean up reshaping for shape teleporting

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(5 files)

We can tidy up the shape teleporting code a bit to prepare for future changes.

We only need to call ReshapeForShadowedProp when adding a new property to the shape,
but we were also calling it when changing an existing property or when we call a
defineProperty hook.

Moving the call into addProperty/addCustomDataProperty is both more efficient and simpler.
This is also preparing for future invalidation-related changes.

This likely hasn't been true for quite some time.

Depends on D129628

The "NonPrototype" in the name no longer matteres, because shape teleporting is now
handled by addProperty which we end up calling.

Depends on D129630

Merge SetProto into JSObject::setProtoUnchecked. This is similar to part 1.

Depends on D129631

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4c241731c330 part 1 - Check for shadowing properties from addProperty and addCustomDataProperty. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/52c2ad00c45c part 2 - Remove stale comment, fix assertion. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/56d9473b398c part 3 - Change ReshapeForShadowedProp argument from JSObject to NativeObject. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/14e58099684f part 4 - Rename AddDataPropertyNonPrototype to AddDataPropertyToPlainObject. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/45630b70f1fd part 5 - Move ReshapeForProtoMutation call to JSObject::setProtoUnchecked. r=tcampbell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: