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

Unified Diff: src/heap.cc

Issue 141038: Implemented a ContextSlotCache for compiled code. (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
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 2226)
+++ src/heap.cc (working copy)
@@ -501,6 +501,7 @@
// At any old GC clear the keyed lookup cache to enable collection of unused
// maps.
KeyedLookupCache::Clear();
+ ContextSlotCache::Clear();
CompilationCache::MarkCompactPrologue();
@@ -1388,6 +1389,9 @@
// Initialize keyed lookup cache.
KeyedLookupCache::Clear();
+ // Initialize context slot cache.
+ ContextSlotCache::Clear();
+
// Initialize compilation cache.
CompilationCache::Clear();
@@ -3514,6 +3518,8 @@
}
+// ------ KeyedLookupCache ------
Mads Ager (chromium) 2009/06/22 08:00:18 We do not have separators like this in the rest of
+
int KeyedLookupCache::Hash(Map* map, String* name) {
// Uses only lower 32 bits if pointers are larger.
uintptr_t addr_hash =
@@ -3548,8 +3554,10 @@
for (int index = 0; index < kLength; index++) keys_[index].map = NULL;
}
+
KeyedLookupCache::Key KeyedLookupCache::keys_[KeyedLookupCache::kLength];
+
int KeyedLookupCache::field_offsets_[KeyedLookupCache::kLength];

Powered by Google App Engine
This is Rietveld 408576698