Index: src/heap.cc |
=================================================================== |
--- src/heap.cc (revision 2237) |
+++ src/heap.cc (working copy) |
@@ -502,6 +502,7 @@ |
// maps. |
KeyedLookupCache::Clear(); |
ContextSlotCache::Clear(); |
+ DescriptorLookupCache::Clear(); |
CompilationCache::MarkCompactPrologue(); |
@@ -630,6 +631,9 @@ |
// Implements Cheney's copying algorithm |
LOG(ResourceEvent("scavenge", "begin")); |
+ // Clear descriptor cache. |
+ DescriptorLookupCache::Clear(); |
+ |
// Used for updating survived_since_last_expansion_ at function end. |
int survived_watermark = PromotedSpaceSize(); |
@@ -1392,6 +1396,9 @@ |
// Initialize context slot cache. |
ContextSlotCache::Clear(); |
+ // Initialize descriptor cache. |
+ DescriptorLookupCache::Clear(); |
+ |
// Initialize compilation cache. |
CompilationCache::Clear(); |
@@ -3559,6 +3566,17 @@ |
int KeyedLookupCache::field_offsets_[KeyedLookupCache::kLength]; |
+void DescriptorLookupCache::Clear() { |
+ for (int index = 0; index < kLength; index++) keys_[index].array = NULL; |
+} |
+ |
+ |
+DescriptorLookupCache::Key |
+DescriptorLookupCache::keys_[DescriptorLookupCache::kLength]; |
+ |
+int DescriptorLookupCache::results_[DescriptorLookupCache::kLength]; |
+ |
+ |
#ifdef DEBUG |
bool Heap::GarbageCollectionGreedyCheck() { |
ASSERT(FLAG_gc_greedy); |