Implement the WeakMap/WeakSet changes from the Symbols as WeakMap keys proposal
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox121 | --- | fixed |
People
(Reporter: jon4t4n, Assigned: allstars.chh)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(5 files, 4 obsolete files)
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
To be able to use an object or a symbol as the weak map key, we need to change
the underlying type from JSObject*
to Value
.
Updated•2 years ago
|
Reporter | ||
Comment 2•2 years ago
|
||
Depends on D175672
Reporter | ||
Comment 3•2 years ago
|
||
Depends on D176691
Reporter | ||
Comment 4•2 years ago
|
||
Depends on D176692
Reporter | ||
Comment 5•2 years ago
|
||
I don't currently have the time to complete this implementation, and I don't want to be the blocker on a stage 4 proposal. Thus, feel free to take my patches as a starting point!
Part 1 should compile and pass all existing tests. Part 2 is still very WIP.
(Let me know if I should abandon the patches instead of leaving them as planned changes.)
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 7•2 years ago
|
||
Assignee | ||
Comment 8•2 years ago
|
||
Originally I reuse the patches from jon4t4n, but I cannot change the state of the patches because I am not the author.
I'll create a new patch stack for these.
Assignee | ||
Comment 9•2 years ago
|
||
Add a WeakMap whose key is of type JS::Value, so we can store an object or a
symbol as the weak map key.
Assignee | ||
Comment 10•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 11•2 years ago
|
||
Thanks for picking this up.
(I abandoned my patches to make the bug look less messy.)
Updated•2 years ago
|
Assignee | ||
Comment 12•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 13•2 years ago
|
||
As Jonco suggested, the use case for Symbols as WeakRef/FinalizationRegistry targets are Shadow-Realms, and Record-Tuples, which are demoted stage 2, so in this bug I will only implement the WeakMap/WeakSet changes
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 14•2 years ago
|
||
Comment 15•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/453a7000485e
https://hg.mozilla.org/mozilla-central/rev/6bebd6afcc29
https://hg.mozilla.org/mozilla-central/rev/197dca60966e
https://hg.mozilla.org/mozilla-central/rev/da0e12436a83
https://hg.mozilla.org/mozilla-central/rev/c6ceb6c0817b
https://hg.mozilla.org/mozilla-central/rev/782ceca184bc
Description
•