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

Unified Diff: src/heap/heap-inl.h

Issue 1288413002: Make some foo.h headers usable without foo-inl.h header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 4 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/heap.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap-inl.h
diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
index fbfca6301505b27eaf7aa7c3b1fe2d213967861e..14ffca4147f7a4ebcf5a205eed5e1821f82affb8 100644
--- a/src/heap/heap-inl.h
+++ b/src/heap/heap-inl.h
@@ -17,6 +17,7 @@
#include "src/heap-profiler.h"
#include "src/isolate.h"
#include "src/list-inl.h"
+#include "src/log.h"
#include "src/msan.h"
#include "src/objects.h"
@@ -632,6 +633,27 @@ void ExternalStringTable::ShrinkNewStrings(int position) {
}
+int DescriptorLookupCache::Lookup(Map* source, Name* name) {
+ if (!name->IsUniqueName()) return kAbsent;
+ int index = Hash(source, name);
+ Key& key = keys_[index];
+ if ((key.source == source) && (key.name == name)) return results_[index];
+ return kAbsent;
+}
+
+
+void DescriptorLookupCache::Update(Map* source, Name* name, int result) {
+ DCHECK(result != kAbsent);
+ if (name->IsUniqueName()) {
+ int index = Hash(source, name);
+ Key& key = keys_[index];
+ key.source = source;
+ key.name = name;
+ results_[index] = result;
+ }
+}
+
+
void Heap::ClearInstanceofCache() {
set_instanceof_cache_function(Smi::FromInt(0));
}
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698