Investigate tidying up StackGCCellPtr
Categories
(Core :: JavaScript: GC, task, P5)
Tracking
()
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Bug 1535154 will add StackGCCellPtr, a GCCellPtr that can be used inside Rooted. It's possible we can simplify this by either supplying a GCPolicy for GCCellPtr or moving the trace() method to GCCellPtr itself.
Comment 1•5 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #0)
or moving the trace() method to GCCellPtr itself.
For what it's worth: I didn't do this because trace() doesn't know whether to trace as root vs edge right? Ideally we'd be able to support both cases so consumers can always call trace() on a GCCellPtr.
Assignee | ||
Comment 2•5 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #1)
Good point, but I don't think we ever want to have GCCellPtrs as internal edges. Those should use the appropriate GC thing type.
Assignee | ||
Comment 3•5 years ago
|
||
This removes StackGCCellPtr and a bunch of indirection.
Comment 4•5 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #2)
Good point, but I don't think we ever want to have GCCellPtrs as internal edges. Those should use the appropriate GC thing type.
See PrivateScriptData::trace for example: https://searchfox.org/mozilla-central/rev/62a130ba0ac80f75175e4b65536290b52391f116/js/src/vm/JSScript.cpp#4288
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #4)
Oh, that was not the intended use of GCCellPtr. I'm now confused as to how my try run passed...
Assignee | ||
Comment 6•5 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #5)
...oh, right, it's because PrivateScriptData::trace doesn't use GCPolicy<GCCellPtr>::trace.
Comment 8•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•