Index: src/global-handles.h |
diff --git a/src/global-handles.h b/src/global-handles.h |
index 3477bcaaa9504d2fd370d6a253487ff32e9581ab..9f3143f288d4841c03a09c8af16d221a48b64224 100644 |
--- a/src/global-handles.h |
+++ b/src/global-handles.h |
@@ -163,7 +163,7 @@ class GlobalHandles { |
void IterateStrongRoots(ObjectVisitor* v); |
// Iterates over all strong and dependent handles. |
antonm
2011/06/06 15:44:40
nit: comment requires an update
|
- void IterateStrongAndDependentRoots(ObjectVisitor* v); |
+ void IterateNewSpaceStrongAndDependentRoots(ObjectVisitor* v); |
// Iterates over all handles. |
void IterateAllRoots(ObjectVisitor* v); |
@@ -175,7 +175,7 @@ class GlobalHandles { |
void IterateWeakRoots(ObjectVisitor* v); |
// Iterates over all weak independent roots in heap. |
antonm
2011/06/06 15:44:40
ditto
|
- void IterateWeakIndependentRoots(ObjectVisitor* v); |
+ void IterateNewSpaceWeakIndependentRoots(ObjectVisitor* v); |
// Iterates over weak roots that are bound to a given callback. |
void IterateWeakRoots(WeakReferenceGuest f, |
@@ -187,7 +187,7 @@ class GlobalHandles { |
// Find all weak independent handles satisfying the callback predicate, mark |
// them as pending. |
- void IdentifyWeakIndependentHandles(WeakSlotCallbackWithHeap f); |
+ void IdentifyNewSpaceWeakIndependentHandles(WeakSlotCallbackWithHeap f); |
// Add an object group. |
// Should be only used in GC callback function before a collection. |
@@ -224,12 +224,14 @@ class GlobalHandles { |
void PrintStats(); |
void Print(); |
#endif |
- class Pool; |
+ |
private: |
explicit GlobalHandles(Isolate* isolate); |
- // Internal node structure, one for each global handle. |
+ // Internal node structures. |
class Node; |
+ class NodeBlock; |
+ class NodeIterator; |
Isolate* isolate_; |
@@ -241,35 +243,21 @@ class GlobalHandles { |
// number_of_weak_handles_. |
int number_of_global_object_weak_handles_; |
- // Global handles are kept in a single linked list pointed to by head_. |
- Node* head_; |
- Node* head() { return head_; } |
- void set_head(Node* value) { head_ = value; } |
+ // List of all allocated node blocks. |
+ NodeBlock* first_block_; |
+ |
+ // List of node blocks with used nodes. |
+ NodeBlock* first_used_block_; |
- // Free list for DESTROYED global handles not yet deallocated. |
+ // Free list of nodes. |
Node* first_free_; |
- Node* first_free() { return first_free_; } |
- void set_first_free(Node* value) { first_free_ = value; } |
- |
- // List of deallocated nodes. |
- // Deallocated nodes form a prefix of all the nodes and |
- // |first_deallocated| points to last deallocated node before |
- // |head|. Those deallocated nodes are additionally linked |
- // by |next_free|: |
- // 1st deallocated head |
- // | | |
- // V V |
- // node node ... node node |
- // .next -> .next -> .next -> |
- // <- .next_free <- .next_free <- .next_free |
- Node* first_deallocated_; |
- Node* first_deallocated() { return first_deallocated_; } |
- void set_first_deallocated(Node* value) { |
- first_deallocated_ = value; |
- } |
- Pool* pool_; |
+ // Contains all nodes holding new space objects. Note: when the list |
+ // is accessed, some of the objects may have been promoted already. |
+ List<Node*> new_space_nodes_; |
+ |
int post_gc_processing_count_; |
+ |
List<ObjectGroup*> object_groups_; |
List<ImplicitRefGroup*> implicit_ref_groups_; |