Closed Bug 1160665 Opened 5 years ago Closed 5 years ago

Funnel external barriers through the internal barriers

Categories

(Core :: JavaScript: GC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: terrence, Assigned: terrence)

Details

Attachments

(1 file)

Right now Heap{Cell/Value}PostBarrier{/Relocate} implements identical logic to JSObject::writeBarrierPost{Relocate/Remove} and InternalGCMethods<Value>::postBarrier{Relocate/Remove} respectively. It should be simple enough to merge these by calling the internal copies from the external copies.

Externally we now have:
Heap<T> ->
    GCMethods<T>::post.+ ->
        (for JSObject* and JSFunction*) HeapObjectPostBarrier.*
             InternalGCMethods<JSObject>::post.+ ->
                 ... as below ...
        (for other T*) AssertIsNotObjectSubclass
        (for Value) HeapValuePostBarrier.*
             InternalGCMethods<Value>::post.+ ->
                 ... as below ...

And the internal variant just cuts out the indirection through HeapFooPostBarrier:
HeapPtr<T>/RelocatablePtr<T>/HeapSlot ->
    InternalGCMethods<T>::post.+ ->
        (for Value) StoreBuffer::put
        (for T*) T::writeBarrierPost ->
            (for JSObject) StoreBuffer::put
            (for TenuredCell) AssertBarrierIsNotNeeded

https://treeherder.mozilla.org/#/jobs?repo=try&revision=dedd1a24774a
Attachment #8600488 - Flags: review?(jcoppeard)
Attachment #8600488 - Flags: review?(jcoppeard) → review+
https://hg.mozilla.org/mozilla-central/rev/f9120972dab4
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.