Closed Bug 1701897 Opened 3 years ago Closed 3 years ago

Make check for redundant property changes more precise

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

In putDataProperty and putAccessorProperty we check for redundant 'puts' like this:

  if (shape->matchesParamsAfterId(obj->lastProperty()->base(), objectFlags,
                                  slot, attrs, ...)) {
    return shape;
  }

However, the BaseShape and ObjectFlags are relevant for the last property's shape and not the shape of the property we're changing.

I ran into this in bug 1700052 when I expected a test failure but the test passed because we reshaped the object due to this bug.

The object flags are only relevant for the last property's shape. Comparing them
to the flags stored in the property's shape could result in doing unnecessary work
in certain (actually redundant) cases.

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b66357775105
Make check for redundant property changes more precise. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: