Closed Bug 639270 Opened 9 years ago Closed 9 years ago
sweep compartments when they are empty, no longer mark them
After landing bug 639254 compartments are completely passive (sweep-only), so we no longer have to mark them. This removes another branch from the mark path.
Attachment #517231 - Flags: review? → review?(anygregor)
> After landing bug 639254 compartments are completely passive (sweep-only), ... I.e., compartments are weak, or compartments contribute no strong refs (root set elements), right? /be
We added the mark flag because a GC can happen during allocation of the first object. How do you prevent in that case that the compartment gets deleted?
Right. That was a hack though. We could do a pidgeon hole or a rooter. I will add something (feel free to steal any of the patches if you like).
How about changing the active flag to a state flag and let it store the current state of the compartment? We might find better names but currently I use constructing, up and active.
How about a rooter? We have infrastructure for that. Its only needed in NewGlobalWithCompartment. But yeah this would work too. The auto helper can set it.
Comment on attachment 517885 [details] [diff] [review] patch Some overhead for this corner case but looks good.
Attachment #517885 - Flags: review?(anygregor) → review+
Global objects are very very rarely allocated.
1.54 + *(holdp = &compartment->hold) = true; Nesting assignment gratuitously! Why not init holdp in the ctor head? Also don't auto-only helpers need stub copy ctors and dtors? /be
OS: Mac OS X → All
Backed out in http://hg.mozilla.org/tracemonkey/rev/38aba506e3c4 - nits or not, it doesn't actually compile.
Compiled here! I will fix, including the nit. Thanks Phil. I hope you make it to one of our summits one day so I can buy you one of those many beers I owe you by now.
Missing the missing renaming in xpconnect and the nits. http://hg.mozilla.org/tracemonkey/rev/206d6b6b392f
I'm pretty sure this is fixed, but please unset if I'm wrong.
Fixed yes, merged to m-c no, so we are keeping the bug open.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.