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

Unified Diff: src/heap-inl.h

Issue 7879: Introduce a lookup cache class in the runtime system and use it for... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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-inl.h
===================================================================
--- src/heap-inl.h (revision 556)
+++ src/heap-inl.h (working copy)
@@ -165,6 +165,26 @@
}
+Object* Heap::GetKeyedLookupCache() {
+ if (keyed_lookup_cache()->IsUndefined()) {
+ Object* obj = LookupCache::Allocate(4);
+ if (obj->IsFailure()) return obj;
+ keyed_lookup_cache_ = obj;
+ }
bak 2008/10/23 06:08:11 Use keyed_lookup_cache() instead of keyed_lookup_c
+ return keyed_lookup_cache_;
+}
+
+
+void Heap::SetKeyedLookupCache(LookupCache* cache) {
+ keyed_lookup_cache_ = cache;
+}
+
+
+void Heap::ClearKeyedLookupCache() {
+ keyed_lookup_cache_ = undefined_value();
+}
+
+
#define GC_GREEDY_CHECK() \
ASSERT(!FLAG_gc_greedy || v8::internal::Heap::GarbageCollectionGreedyCheck())

Powered by Google App Engine
This is Rietveld 408576698