Closed Bug 1717438 Opened 3 years ago Closed 3 years ago

Don't convert prototype objects to dictionary mode for shadowed properties

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(4 files)

ReshapeForShadowedProp should use the same mechanism to invalidate the shape teleporting optimization as ReshapeForProtoMutation. This is simpler, cleaner, and avoids dictionary mode conversions.

The dictionary conversion here was always a bit of a hack, one of the ReShape goals is to get rid of these dictionary conversions that don't have anything to do with property mutation.

This reverts the change in bug 1507433. Now that shape always implies prototype,
we don't need to check the objects between receiver and holder have the uncacheable-proto
flag. This simplifies the next parts.

The flag is now only used for the shape teleporting optimization so be more explicit
about this. The next patch will use this flag also for the shadowed-property case.

Depends on D118359

The flag is now used to guard against both cases teleporting has to watch out
for: proto changes and shadowed properties.

This lets us get rid of dictionary conversions and reshaping for ReshapeForShadowedProp.

Depends on D118360

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c40c92bd9100 part 1 - Only check the holder object in GeneratePrototypeGuards. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/516ec345e629 part 2 - Rename the UncacheableProto flag to InvalidatedTeleporting. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/95e913632f6a part 3 - Use the InvalidatedTeleporting flag also for shadowed properties. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/13111b300e29 part 4 - Add testing function and tests for teleporting. r=tcampbell
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8c8f5b2f16d3 part 1 - Only check the holder object in GeneratePrototypeGuards. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/5eb0f543b04a part 2 - Rename the UncacheableProto flag to InvalidatedTeleporting. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/7a624fe10146 part 3 - Use the InvalidatedTeleporting flag also for shadowed properties. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/87cc59582372 part 4 - Add testing function and tests for teleporting. r=tcampbell
Flags: needinfo?(jdemooij)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: