Closed Bug 1475386 Opened 7 years ago Closed 2 years ago

Add smart pointer helpers for storing tagged pointers

Categories

(Core :: MFBT, enhancement)

enhancement

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: kmag, Unassigned)

References

(Blocks 1 open bug)

Details

I've had patches for this kicking around for a while, but never submitted them, because my original use case went away. I suspect they'd be helpful in other places, though, so I'll try to update them and get them landed. The basic problem is this: There are a bunch of places where we need to store flags in tagged pointers, because we create too many instances of a class to be able to afford a separate field. In just about all of those cases, we have ad-hoc getters and setters for a uintptr_t field. We can't use smart pointers, and therefore risk leaks if we're not very careful. And it's hard to maintain, so we don't do it in some places we often should. I tried to solve that problem by splitting most of our smart pointer classes into base classes that didn't care about the storage implementation, and concrete classes that actually implemented the storage. That actually has two benefits: 1) It allows things like StaticRefPtrs to use nearly all of the same implementation as regular RefPtrs. 2) It allows us to use them with things like tagged pointers, or other unusual storage scenarios, like Maybe/Variant/Result.
When I rebased my patches for this, rust bindgen blew up with some really arcane errors. That's the only snag that's preventing me from putting this up for review at the moment.
Can you post a link to the patch? I'm happy to try to make bindgen happy.
Flags: needinfo?(kmaglione+bmo)
Thanks. I'm halfway through moving and my main computer isn't setup yet. I'll upload the patches as soon as I get it working again.
Severity: normal → S3
Assignee: kmaglione+bmo → nobody

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.

For more information, please visit BugBot documentation.

Flags: needinfo?(kmaglione+bmo)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.