Closed Bug 1167323 Opened 9 years ago Closed 9 years ago

Use internal interfaces to implement MarkCycleCollectorChildren

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: terrence, Assigned: terrence)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This function used to live outside and was moved inside for performance. It never really got a full once-over to make full use of the fact that it's internal, however. This patch does:

* Change the interface to take CallbackTracer.
* Calls DoCallback directly where possible.
* Calls T::traceChildren instead of JS::TraceChildren.
* Moves everything from Marking.cpp to Tracer.cpp, since it's using CallbackTracer and DoCallback now.

Sorry about the awful diff; I realized after I finished that I should have done it in two patches.
Attachment #8608911 - Flags: review?(jcoppeard)
Blocks: GC.performance
No longer blocks: GC.stability
Comment on attachment 8608911 [details] [diff] [review]
specialize_markcyclecollectorchildren-v0.diff

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

::: js/src/gc/Tracer.cpp
@@ +260,5 @@
> +
> +// This function is used by the cycle collector to trace through a shape. The
> +// cycle collector does not care about shapes or base shapes, so those are not
> +// marked. Instead, any shapes or base shapes that are encountered have their
> +// children marked. Stack space is bounded.

I don't think this is used to mark anything so we should say 'trace' rather than 'mark' here instead to avoid confusion.
Attachment #8608911 - Flags: review?(jcoppeard) → review+
The official cycle collector term is "traverse", FWIW. ;)  Trace is fine, too, of course.
Good catch, Jon! And thanks for the translation, Andrew! I've added a note to the comment.
https://hg.mozilla.org/mozilla-central/rev/dda6d9e077c8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: