Closed Bug 1722872 Opened 3 years ago Closed 3 years ago

Remove remaining uses of private slots

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(8 files, 4 obsolete 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

Just debugger objects and WeakRefObject are left. These are a bit more tricky because they store GC things in the private slot to bypass the normal tracing code and/or compartment checks, but we can do something similar with PrivateValue.

This lets us change the implementation in later patches.

Depends on D121178

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e987ad3fbbd
part 1 - Use a reserved slot instead of private slot for DebuggerFrame data. r=jonco
https://hg.mozilla.org/integration/autoland/rev/0e1d1d582f1d
part 2 - Use a reserved slot instead of private slot for DebugScriptObject script. r=jonco
https://hg.mozilla.org/integration/autoland/rev/38a54851e501
part 3 - Add clearReferent to some debugger objects. r=jonco
https://hg.mozilla.org/integration/autoland/rev/05d29352508e
part 4 - Use a reserved slot instead of private slot for DebuggerEnvironment referent. r=jonco
https://hg.mozilla.org/integration/autoland/rev/259ac80a5df4
part 5 - Use a reserved slot instead of private slot for DebuggerSource referent. r=jonco
https://hg.mozilla.org/integration/autoland/rev/4485680c3c2f
part 6 - Use a reserved slot instead of private slot for DebuggerScript referent. r=jonco
https://hg.mozilla.org/integration/autoland/rev/981396167b01
part 7 - Use a reserved slot instead of private slot for DebuggerObject referent. r=jonco
https://hg.mozilla.org/integration/autoland/rev/f4d19270f1f0
part 8 - Use a reserved slot instead of private slot for WeakRefObject target. r=jonco

This replaces the JS_OFF_THREAD_CONSTRUCTOR MagicValue for off-thread constructors
with the same placeholder object we use for the prototype. These constructors
aren't used by off-thread parsing and handling this another way requires a lot
of complexity. With Stencil work the off-thread global will hopefully be removed
eventually.

Depends on D121992

Depends on D121993

This adds a few dereferences to the Baseline Interpreter, but is simpler and should
be faster for C++ accesses. It also simplifies/unblocks the next patch.

Depends on D121994

This is done last because it requires reordering the initialization code, and we
can finally do this now.

Depends on D121995

Comment on attachment 9235083 [details]
Bug 1722872 part 13 - Move builtin constructors to GlobalObjectData. r?jonco!

Revision D121993 was moved to bug 1723715. Setting attachment 9235083 [details] to obsolete.

Attachment #9235083 - Attachment is obsolete: true

Comment on attachment 9235084 [details]
Bug 1722872 part 14 - Clean up slot related code a bit. r?jonco!

Revision D121994 was moved to bug 1723715. Setting attachment 9235084 [details] to obsolete.

Attachment #9235084 - Attachment is obsolete: true

Comment on attachment 9235085 [details]
Bug 1722872 part 15 - Move global lexical environment from Realm to GlobalObjectData. r?jonco!

Revision D121995 was moved to bug 1723715. Setting attachment 9235085 [details] to obsolete.

Attachment #9235085 - Attachment is obsolete: true

Comment on attachment 9235086 [details]
Bug 1722872 part 16 - Move WindowProxy to GlobalObjectData. r?jonco!

Revision D121996 was moved to bug 1723715. Setting attachment 9235086 [details] to obsolete.

Attachment #9235086 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: