Bug 43641 - Mark all JSCell*s visible from structures
Summary: Mark all JSCell*s visible from structures
Status: RESOLVED DUPLICATE of bug 58483
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-06 13:53 PDT by Nathan Lawrence
Modified: 2011-09-09 22:21 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Lawrence 2010-08-06 13:53:19 PDT
Updating these is required for movable objects.  There are two types of pointers we are looking at:

(1) The specificValue properties in PropertyMapHashTable
(2) The structures's prototype

It is slightly more complicated than simply marking these properties on each object's structures since each structure is part of a tree.  We need to mark both the pointers linked to by m_previous as well as the structure transition table.

In order not to fully visit each structure graph more than once per garbage collection, I suggest adding an additional bit to the structure class that denotes an alternating color used to determine whether or not that structure has been visited on that particular collection.

The specificValue properties in PropertyMapHashTable can be replaced by WeakGCPtr's which avoids us needing to update those particular values, however there is still a few percent overhead in needing to visit the whole structure graph.  It may make sense to have a ref-counted indirect pointer to the prototype that is shared between all structures in the graph.
Comment 1 Gavin Barraclough 2011-09-09 22:21:47 PDT
As of bug#58483 we mark all cells referenced from Structures.

*** This bug has been marked as a duplicate of bug 58483 ***