Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index cc93bde592a5d7151821892bb084ee5b280f1e44..67184ff06b063b8be8250580231df5b3d8ae230a 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -3921,6 +3921,7 @@ class OrderedHashTable: public FixedArray { |
static const int kNumberOfElementsIndex = kNumberOfBucketsIndex + 1; |
static const int kNumberOfDeletedElementsIndex = kNumberOfElementsIndex + 1; |
static const int kHashTableStartIndex = kNumberOfDeletedElementsIndex + 1; |
+ static const int kNextTableIndex = kNumberOfElementsIndex; |
static const int kNumberOfBucketsOffset = |
kHeaderSize + kNumberOfBucketsIndex * kPointerSize; |
@@ -3930,12 +3931,19 @@ class OrderedHashTable: public FixedArray { |
kHeaderSize + kNumberOfDeletedElementsIndex * kPointerSize; |
static const int kHashTableStartOffset = |
kHeaderSize + kHashTableStartIndex * kPointerSize; |
+ static const int kNextTableOffset = |
+ kHeaderSize + kNextTableIndex * kPointerSize; |
static const int kEntrySize = entrysize + 1; |
static const int kChainOffset = entrysize; |
static const int kLoadFactor = 2; |
+ // NumberOfDeletedElements is set to kClearedTableSentinel when |
+ // the table is cleared, which allows iterator transitions to |
+ // optimize that case. |
+ static const int kClearedTableSentinel = -1; |
+ |
private: |
static Handle<Derived> Rehash(Handle<Derived> table, int new_capacity); |
@@ -3977,7 +3985,6 @@ class OrderedHashTable: public FixedArray { |
return set(kRemovedHolesIndex + index, Smi::FromInt(removed_index)); |
} |
- static const int kNextTableIndex = kNumberOfElementsIndex; |
static const int kRemovedHolesIndex = kHashTableStartIndex; |
static const int kMaxCapacity = |