Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1063)

Unified Diff: src/heap.cc

Issue 141046: Added descriptor lookup cache to eliminate some search overhead.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/heap.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698