Make DefaultTracer into a generic GCPolicy

RESOLVED FIXED in Firefox 45

Status

()

Core
JavaScript: GC
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

(Blocks: 1 bug)

Trunk
mozilla45
Points:
---

Firefox Tracking Flags

(firefox45 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8681523 [details] [diff] [review]
DefaultTracer_to_DefaultGCPolicy-v0.diff

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+
(Assignee)

Comment 2

3 years ago
> >  // 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.
(Assignee)

Comment 6

3 years ago
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.
(Assignee)

Comment 7

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ba5c3654f4854fc4d80532105b7ef4729b991bd9
Bug 1220310 - Generalize GC container trace function dispatch as GCPolicy; r=sfink

Comment 8

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ba5c3654f485
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox45: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.