Update V8 to r3431 as required by WebKit r51976.
Change-Id: I567392c3f8c0a0d5201a4249611ac4ccf468cd5b
diff --git a/src/global-handles.h b/src/global-handles.h
index feb95bf..659f86e 100644
--- a/src/global-handles.h
+++ b/src/global-handles.h
@@ -48,7 +48,8 @@
class ObjectGroup : public Malloced {
public:
ObjectGroup() : objects_(4) {}
- explicit ObjectGroup(size_t capacity) : objects_(capacity) {}
+ explicit ObjectGroup(size_t capacity)
+ : objects_(static_cast<int>(capacity)) { }
List<Object**> objects_;
};
@@ -77,6 +78,8 @@
// Returns the current number of weak handles.
static int NumberOfWeakHandles() { return number_of_weak_handles_; }
+ static void RecordStats(HeapStats* stats);
+
// Returns the current number of weak handles to global objects.
// These handles are also included in NumberOfWeakHandles().
static int NumberOfGlobalObjectWeakHandles() {
@@ -95,8 +98,11 @@
// Process pending weak handles.
static void PostGarbageCollectionProcessing();
+ // Iterates over all strong handles.
+ static void IterateStrongRoots(ObjectVisitor* v);
+
// Iterates over all handles.
- static void IterateRoots(ObjectVisitor* v);
+ static void IterateAllRoots(ObjectVisitor* v);
// Iterates over all weak roots in heap.
static void IterateWeakRoots(ObjectVisitor* v);
@@ -127,6 +133,7 @@
static void PrintStats();
static void Print();
#endif
+ class Pool;
private:
// Internal node structure, one for each global handle.
class Node;
@@ -148,6 +155,23 @@
static Node* first_free_;
static Node* first_free() { return first_free_; }
static 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
+ static Node* first_deallocated_;
+ static Node* first_deallocated() { return first_deallocated_; }
+ static void set_first_deallocated(Node* value) {
+ first_deallocated_ = value;
+ }
};