Closed Bug 1804394 Opened 3 years ago Closed 3 years ago

Use SharedShape and DictionaryShape more

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(14 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
48 bytes, text/x-phabricator-request
Details | Review

As a first step for bug 1804253, we can move more methods from Shape into the SharedShape and DictionaryShape subclasses.

This will also start using SharedShape more in the engine, which is nice because it makes it clearer that these shapes are never dictionary shapes.

This fixes a small regression from the cx->newCell refactoring.

Also change the return types for the new_ methods to be more precise.

Change some return types and hash tables to use SharedShape* instead of Shape*.

Depends on D164051

This introduces some asShared() calls that will be changed in later patches
by passing SharedShape around more.

Depends on D164054

This is just a specialization of ShapePropertyIter that can be optimized better
by the compiler because we don't need to check for dictionary holes in the property
map.

Depends on D164063

Severity: -- → N/A
Priority: -- → P1
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1bfed98940bc part 1 - Call SharedShape constructor instead of Shape constructor. r=jonco https://hg.mozilla.org/integration/autoland/rev/bf3139410812 part 2 - Start using SharedShape in more places. r=jonco https://hg.mozilla.org/integration/autoland/rev/0b5b1b9b7347 part 3 - Move some methods from Shape to DictionaryShape. r=jonco https://hg.mozilla.org/integration/autoland/rev/1c62fa16c3c5 part 4 - Move lastPropertyMatchesForAdd from Shape to SharedShape. r=jonco https://hg.mozilla.org/integration/autoland/rev/4d7e164ace7c part 5 - Move slotspan methods from Shape to SharedShape. r=jonco https://hg.mozilla.org/integration/autoland/rev/fc73e81a1500 part 6 - Use SharedShape more for array shapes. r=jonco https://hg.mozilla.org/integration/autoland/rev/b06f1ad1dab5 part 7 - Use SharedShape more for function shapes. r=jonco https://hg.mozilla.org/integration/autoland/rev/427fc6ae28a3 part 8 - Use SharedShape more for plain object shapes. r=jonco https://hg.mozilla.org/integration/autoland/rev/0677d828899c part 9 - Use SharedShape for setShapeAndAdd* methods. r=jonco https://hg.mozilla.org/integration/autoland/rev/9f6bb6be2624 part 10 - Use SharedShape for object creation code. r=jonco https://hg.mozilla.org/integration/autoland/rev/2fc531eaa0f6 part 11 - Change calculateDynamicSlots argument from Shape to SharedShape. r=jonco https://hg.mozilla.org/integration/autoland/rev/aaac22184f87 part 12 - Move propMap accessors to SharedShape and DictionaryShape. r=jonco https://hg.mozilla.org/integration/autoland/rev/fffb9b66b015 part 13 - Use getLastProperty instead of ShapePropertyIter in a few places. r=jonco https://hg.mozilla.org/integration/autoland/rev/07b8e2565736 part 14 - Add and use SharedShapePropertyIter. r=jonco
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: