Closed Bug 1166944 Opened 11 years ago Closed 11 years ago

Inline the only user of TraceObjectSlots

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)

No description provided.
Attachment #8608365 - Flags: review?(jcoppeard)
Comment on attachment 8608365 [details] [diff] [review] 29_inline_the_one_user_of_TraceObjectSlots-v0.diff Review of attachment 8608365 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsobj.cpp @@ +4116,5 @@ > + JS::AutoTracingIndex index(trc); > + for (uint32_t i = 0; i < nobj->slotSpan(); ++i) { > + TraceManuallyBarrieredEdge(trc, nobj->getSlotRef(i).unsafeGet(), "object slot"); > + ++index; > + } Might it be worth moving this to NativeObject and splitting it into two loops to mark fixed and dynamic slots?
Attachment #8608365 - Flags: review?(jcoppeard) → review+
From a programming cleanliness standpoint I agree wholeheartedly, and that's exactly what we do in the inlined versions. Unfortunately, that doesn't work for the version that may do reporting -- the edge name formatter we set here depends on the index being the same as the slot offset so that it can format a nice description of the field. Moving it to NativeObject is a good idea, but I'm still a bit wary of that, given that the other marking paths do not have that luxury and the other layout kinds are sort of atomic entities. The one case where we violate that (AccessorShape) is already quite weird. I'll give it some more thought, but I don't think it's going to be the clear complexity win that it seems like it should be.
Status: ASSIGNED → RESOLVED
Closed: 11 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: