RESOLVED FIXED 57903
Introduced the concept of opaque roots, in preparation for marking the DOM with them
https://bugs.webkit.org/show_bug.cgi?id=57903
Summary Introduced the concept of opaque roots, in preparation for marking the DOM wi...
Geoffrey Garen
Reported 2011-04-05 16:22:58 PDT
Introduced the concept of opaque roots, in preparation for marking the DOM with them
Attachments
Patch (11.16 KB, patch)
2011-04-05 16:27 PDT, Geoffrey Garen
oliver: review+
Geoffrey Garen
Comment 1 2011-04-05 16:27:57 PDT
Oliver Hunt
Comment 2 2011-04-05 16:58:54 PDT
Comment on attachment 88333 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=88333&action=review > Source/JavaScriptCore/collector/handles/HandleHeap.cpp:110 > + ASSERT(isValidWeakHandle(node->slot())); > + JSCell* cell = node->slot()->asCell(); > + if (Heap::isMarked(cell)) > + continue; > + > + WeakHandleOwner* weakOwner = node->weakOwner(); > + if (!weakOwner) > + continue; > + > + if (!weakOwner->isReachableFromOpaqueRoots(Handle<Unknown>::wrapSlot(node->slot()), node->weakOwnerContext(), markStack)) > + continue; > + > + heapRootMarker.mark(node->slot()); I wish we could do something to separate out handles that will remain alive as we enumerate them, otherwise we end up visiting nodes repeatedly (even if just for an isMarked check)
Geoffrey Garen
Comment 3 2011-04-05 18:25:55 PDT
> I wish we could do something to separate out handles that will remain alive as we enumerate them, otherwise we end up visiting nodes repeatedly (even if just for an isMarked check) This loop almost always executes exactly once, so the tradeoff probably doesn't favor this approach, but: I think we could optimize by doing an initial pass to separate off the unmarked handles into a temporary linked list. Thereafter, we could iterate only that linked list.
Build Bot
Comment 4 2011-04-05 18:58:23 PDT
Build Bot
Comment 5 2011-04-05 19:14:13 PDT
Geoffrey Garen
Comment 6 2011-04-05 20:44:54 PDT
Note You need to log in before you can comment on or make changes to this bug.