Closed Bug 1695153 Opened 4 years ago Closed 4 years ago

Remove NewObjectWithGroup

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(6 files)

Spinning this off from bug 1689413.

NewObjectWithGroup was useful when we had allocation-site groups, because creating a new group based on Class + proto would use the default group so we needed a way to pass in another group. Now that groups are always determined by Class/proto/realm, there's no longer a difference in behavior.

NewObjectWithGroup can be faster for some callers because it doesn't require looking up the group, but with groups going away soon in bug 1689413 that will no longer apply.

TI used allocation site groups here and passing around the group helped avoid
some overhead there.

Note that the group was passed only if the group's proto was the default proto
for the typed array class.

The "more TI optimizations" comment refers to allocation site groups and the
ability to use singletons for large typed arrays. Both of these have since
been removed.

Depends on D106595

Worst-case this adds an ObjectGroup lookup, but that will go away when ObjectGroups
are removed and NewObjectWithGivenTaggedProto can use the NewObjectCache to bypass
that lookup.

Depends on D106596

Depends on D106597

Also removes references to object parents from the comment. This was an old
SpiderMonkey 'feature'.

Depends on D106598

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/362cb95705e5 part 1 - Stop using NewObjectWithGroup in the typed array code. r=iain https://hg.mozilla.org/integration/autoland/rev/f0970b8ad3d0 part 2 - Inline makeTypedInstance into the caller. r=iain https://hg.mozilla.org/integration/autoland/rev/1038b75f6357 part 3 - Remove TI-related code in makeInstance. r=iain https://hg.mozilla.org/integration/autoland/rev/0a2599125529 part 4 - Remove other NewObjectWithGroup callers. r=iain https://hg.mozilla.org/integration/autoland/rev/c57ee1144845 part 5 - Remove NewObjectWithGroup. r=iain https://hg.mozilla.org/integration/autoland/rev/bed377ea722c part 6 - Remove now unused group code from NewObjectCache. r=iain
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: