Closed Bug 1220310 Opened 6 years ago Closed 6 years ago

Make DefaultTracer into a generic GCPolicy

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: terrence, Assigned: terrence)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I'd like to add "Sweepable" containers as the weak reflection of "Traceable"'s strong container. Rather than adding another DefaultFoo<T> for everything, i'd like to settle on a generic GCPolicy structure that tells us how any particular type interfaces with the GC. I'm not sure how this intersects with GCMethods yet -- there's probably enough overlap to merge, but I'd like to keep them separate for now.
Attachment #8681523 - Flags: review?(sphink)
Comment on attachment 8681523 [details] [diff] [review]
DefaultTracer_to_DefaultGCPolicy-v0.diff

Review of attachment 8681523 [details] [diff] [review]:
-----------------------------------------------------------------

This great! I took a brief stab at unifying Traceable with GCMethods, but quickly ran away and hid in a corner. This is a great direction to be moving in. Hopefully we can incrementally shift stuff over.

::: js/public/TraceableHashTable.h
@@ +161,4 @@
>  {};
>  
>  // A TraceableHashSet is a HashSet with an additional trace method that knows
> +// how to visit all set element. HashSets that contain GC pointers that must

I don't actually see a change in this line, but anyway: s/element/elements/
Attachment #8681523 - Flags: review?(sphink) → review+
> >  // A TraceableHashSet is a HashSet with an additional trace method that knows
> > +// how to visit all set element. HashSets that contain GC pointers that must
> 
> I don't actually see a change in this line, but anyway: s/element/elements/

I changed the inter-sentence spacing to 1.
Oh, I didn't realize Steve had already re-tried this. :-P

Guess I'll just go cancel the try and push to m-i then.
https://hg.mozilla.org/integration/mozilla-inbound/rev/ba5c3654f4854fc4d80532105b7ef4729b991bd9
Bug 1220310 - Generalize GC container trace function dispatch as GCPolicy; r=sfink
https://hg.mozilla.org/mozilla-central/rev/ba5c3654f485
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.